Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Having some problems with admin css and such [RSS Feed]

#1 Jan. 23, 2011 18:32:41

Wes W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Having some problems with admin css and such


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

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 23, 2011 23:22:46

Wes W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Having some problems with admin css and such


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


On Jan 23, 10:32 am, Wes Wagner <wes.wag...@gmail.com> wrote:
> 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

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Having some problems with admin css and such [RSS Feed]

Board footer

Moderator control

Enjoy the 21st of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support