I'm using Django 1.3.1 and the contrib.collectstatic
app to manage my static files.
My project structure is
myproject
- settings.py
- static-media
- urls.py
- media
- manage.py
where static-media
is a 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'm using admin_tools to change the layout of the admin. However I want to override a specific css file ( theming.css )from admin_tools. So in my static-media folder I put admin_tools/css/theming.css.
When I first run python manage.py collectstatic
, it works as expected by 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 overrides my css and adds the default.
Here's the output for 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
Any help is appreciated. Thanks.