name conflicts in static files

50 views
Skip to first unread message

dmitry b

unread,
Oct 18, 2011, 1:31:42 AM10/18/11
to Django users
Hi,

With the new way of handling static files in Django 1.3 what would
happen if two applications have identically named static files? E.g.:


<project>
|___ app1
| |____ static
| |_____ styles.css
|___ app2
|____ static
|_____ styles.css


Thanks
Dmitry

SmileyChris

unread,
Oct 18, 2011, 4:28:21 AM10/18/11
to django...@googlegroups.com
The first app in INSTALLED_APPS wins, just like how name conflicts with templates work.

You can use the following command to check what static file gets picked:

creecode

unread,
Oct 18, 2011, 5:35:02 AM10/18/11
to django...@googlegroups.com
Just a general tip for folks.  Always namespace your template and static files to avoid problems.

Toodle-loooooooooooooo..........
creecode
Reply all
Reply to author
Forward
0 new messages