On Feb 3, 6:04 am, Marc Aymerich <glicer...@gmail.com> wrote: > On Thu, Feb 3, 2011 at 12:51 PM, Marc Aymerich <glicer...@gmail.com> wrote: > > Hi, > > I just installed the django-admin-tools app but my django installation > > doesn't load the css, js and other static files. > > > in settings.py I have: > > STATIC_ROOT = '/home/ucp/trunk/static/' > > STATIC_URL = '/static/' > > > and when i try to load > >http://localhost:8081/static/admin_tools/css/dashboard.cssI get a > > "page not found" error :( > > > but this file seems to be in the right directory and have read > > permisons for my user! > > /home/ucp/trunk/static/admin_tools/css/dashboard.css > > > what I'm missing? > > I solve it setting staticfiles_dirs var: > > STATICFILES_DIRS = ('/home/ucp/trunk/static/',) >
STATIC_ROOT is the location of where the management command is going to place all the static files it collects. So normally (?) I think you'll want STATIC_ROOT to be a different directory than what you put in STATICFILES_DIRS. Think of it this way: your non-app specific static files will appear in a directory that is listed in STATICFILES_DIRS, your app-specifc files typically would appear under your_app/static, and all of the static files will be copied to STATIC_ROOT after running the management command. In production, you'd likely configure your server to serve files out of STATIC_ROOT. Hope that helps, BN -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.