Hello,

First post to the group, and sorry it's on this common subject!  I
have tried to read every post on this and cannot seem to get it.  I'm
using Django 1.2.3, and therefore believe the instructions here apply:

http://docs.djangoproject.com/en/1.2/howto/static-files/

My project is in folder 'MCOd' and I have created a folder 'static'
under that into which I have placed my CSS files and images (images in
another subfolder).  To urls.py I have added:

urlpatterns += patterns('',
    (r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_DOC_ROOT}),
    (r'^admin/', include(admin.site.urls)),
)

To settings.py I have added:

STATIC_DOC_ROOT = '/Users/jonno/django_projects/MCOd/static'

This is what it says to do in the above referenced Django
documentation.  Nothing is mentioned about MEDIA_ROOT or MEDIA_URL, so
I have left them intact ('').  Many posts mention putting paths there,
but not the Django doc.  I didn't want to try the django-staticfiles
packages as I understand this is folded into newer versions, so I'll
deal with changes in an upgrade.  I'm really only trying to add a
little Django functionality to an existing static site, so dealing
with my vast number of static files easily is crucial.  Of course, my
plan is to generate more of my site dynamically over time.  I just
can't get past this point!  Thanks for any help -- Jon.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to