The error message says it all: it is looking for
testporject.polls.views.django.views.static. Notice the first part. It
means your view function is taken from within testproject.polls.views
(which is probably on top in your patterns declaration).
You should take this declaration out of there and add it seperately,
something like this:

urlpatterns = patterns('testproject.polls.views',

# your patterns here
)

urlpatterns += patterns('',...

# the static view here

)

Koen

On 16 apr, 23:43, "Andre Meyer" <[EMAIL PROTECTED]> wrote:
> hi all
>
> i am new to Django and trying to figure out a few things. so far, everything
> looks very nice.
>
> but now, i am stuck at something very simple: i cannot manage to serve
> static content (images, css, dojo, ...) from Django itself. i have done what
> is described athttp://www.djangoproject.com/documentation/static_files/and
> here is what i get as a response when trying to access some image file from
> the appropriate location.
>
> in urls.py:
> *(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
> {'document_root': 'E:\\projects\\django\\testproject\\media',
> 'show_indexes': True}),
> *http://localhost:8000/site_media/django.gif
> ViewDoesNotExist at /site_media/django.gif Could not import
> testproject.polls.views.django.views.static. Error was: No module named
> django.views.static Request Method: GET  Request 
> URL:http://localhost:8000/site_media/django.gif Exception Type:
> ViewDoesNotExist  Exception Value: Could not import
> testproject.polls.views.django.views.static. Error was: No module named
> django.views.static  Exception Location:
> C:\Python25\Lib\site-packages\django\core\urlresolvers.py
> in _get_callback, line 127
>
> what is wrong with *django.views.static*? are modifications necessary to
> settings.py? i have tried various path syntaxes, but none worked.
>
> please, let me know what is going on
> thanks a lot for your help
> André
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to