I am using Django and have set up a view that returns a dynamically generated stylesheet to allow for user themes. I link the stylesheet in the head section of my pages with,
<link href="/theme.css" rel="stylesheet">
I can see the request for /theme.css at the server and a successful response. I can also view the source of the page in the browser and it shows the correct contents for the stylesheet.
However, for some reason the styles in theme.css are not applied to the page.
If I place the contents of the dynamically created stylesheet into a static file and change the link like so,
<link href="/static/rml/css/theme.css" rel="stylesheet">
the styles are correctly applied.
I can't see why there is a difference. I have looked for answers and can't find anything relevant.