|
If I add few files in a new skin, like logo and css files. If I run everything under django, well my new media files are preferred over the ones in default skin and everything else is picked from the default skin. Some Python code imports all of that as I have looked. Now the question is, if I get nginx to serve the media files, how would that work? Do I have to manually overwrite the media files I want modified, over top of the existing one? |
|
Apparently, it should work ok, as long as you don't link to those files directly. I think this is how it should work in theory: In your template, you should invoke the inclusion of the css, like this:
And NOT like this:
As long as you use that {% url custom_css %} tag, then the Django that generates the page should automagically choose your skin css file first, if it's available, and then fall back to the default one. NB I haven't checked this. I just copied the whole skin over, and then modified it. But if the above method works, I'd recommend doing that instead. Not the url tag, its media. That custom_css url points to the file generated bases on your custom css setting. Take a look at base_content.html and see for example:
(17 Jul '11, 17:25)
Hernani Cerq... ♦♦
Thanks Hernani - I've corrected my answer accordingly. That might explain a few things - I don't know how my custom skin got de-synced from the trunk - I must have botched one of the merges - but I'll fix my custom skin, and see what happens.
(18 Jul '11, 06:57)
Andrew_S ♦
|
@Valentino Lee, we require all postings to have a clear, specific QUESTION in the title field. Please edit this right away to rephrase the title as a proper question.