Having some problems with admin css and such

12 views
Skip to first unread message

Wes Wagner

unread,
Jan 23, 2011, 1:32:34 PM1/23/11
to Django users
I just started building a new app in 1.3 and I am having some static
files problems (I read the new documentation)

I am using pycharm as an IDE.

If I run a collectstatic it will actually dump all the admin static
files into my /static directory under my project but I can't get it so
serve any of them under runserver. (not found)

Thus admin runs without any css or graphics

Settings:
MEDIA_ROOT = ''
MEDIA_URL = ''
STATIC_ROOT = "C:/Users/Wes Wagner/PycharmProjects/APP/static/"
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'

in URLS I added:
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
and to the end of my file:
urlpatterns += staticfiles_urlpatterns()


If I just hit the base directory my urls list looks like this:
Using the URLconf defined in APP.urls, Django tried these URL
patterns, in this order:
^admin/
^static\/

The backslash prior to the / creeps me out a little... this is a
windows 7 x64, python 2.6 using the tarball of 1.3 from today.

So what noobish mistake did I make this time? 8)

-Wes Wagner

Wes Wagner

unread,
Jan 23, 2011, 6:22:39 PM1/23/11
to Django users
Figured it out...

STATICFILES_DIRS = ( STATIC_ROOT,)

Had to add my static root directory to the static files dir...

Am I doing something kludgy or is the current documentation revision
in the SVN wrong?

-Wes
Reply all
Reply to author
Forward
0 new messages