I am using Django 1.3.1 and an application contrib.collectstaticto manage my static files.
My project structure
myproject
- settings.py
- static-media
- urls.py
- media
- manage.py
where static-mediais the folder containing the static files for this project. In my settings.py, I have:
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
STATIC_ROOT = os.path.join(PROJECT_PATH, "static")+'/'
STATIC_URL = "/static/"
STATICFILES_DIRS = (
os.path.join(PROJECT_PATH, 'static-media'),
)
I use admin_tools to change the admin layout. However, I want to override a specific css file (theming.css) from admin_tools. Therefore, in my static-media folder, I set admin_tools / css / theming.css. When I first start python manage.py collectstatic, it works as expected, ignoring the default theming.css in admin_tools and using the one I defined in static-media. Unfortunately, if I run the command again, it will override my css and add a default value.
python manage.py findstatic admin_tools/css/theming.css:
Found 'admin_tools/css/theming.css' here:
/home/paulo/Desktop/Projects/zennetwork/prd/zennetwork/static-media/admin_tools/css/theming.css
/home/paulo/Desktop/Projects/zennetwork/prd/lib/python2.7/site-packages/admin_tools/theming/static/admin_tools/css/theming.css
. .