That's so obvious now that you point that out, I don't know how I could have missed that. Really thanks a million Jay! it all works perfectly now.
Allan On 11 Sep 2006, at 18:14, Jay Parlar wrote: > > On 9/11/06, Allan Henderson <[EMAIL PROTECTED]> wrote: >> >> i'll give you the settings file too- here you go! bear in mind i've >> been changing things within so likely has changed from last time. >> Thanks for all this. >> >> //////////////////// >> URLS.PY >> from django.conf.urls.defaults import * >> from django.conf import settings >> >> STATIC_LOC="/django/django_projects/janeraven/static/" >> >> urlpatterns = patterns('myproject.products.views', >> (r'^products/', 'index'), >> (r'^$', 'index'), >> (r'^(?P<product_id>\d+)/$', 'detail'), >> (r'^static/(.*)$', 'django.views.static.serve', >> {'document_root': STATIC_LOC}), >> # Uncomment this for admin: >> (r'^admin/', include('django.contrib.admin.urls')), >> ) > > This is your problem right here. The string at the beginning of > 'patterns' is a helpful shortcut, which *automatically* gets prepended > to all the views listed inside. This means, that instead of using > 'django.views.static.serve' it's trying to use > 'myprojects.products.views.django.views.static.serve', which is *not* > what you want. Try this instead for your urls.py: > > urlpatterns = patterns('myproject.products.views', > (r'^products/', 'index'), > (r'^$', 'index'), > (r'^admin/', include('django.contrib.admin.urls')), > ) > > urlpatterns += patterns('django.views', > (r'^static/(.*)$', 'static.serve', {'document_root': STATIC_LOC}), > ) > > > Jay P. > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---