Saturday, February 26, 2011

serving static files

I admit that I am not so sure about how regular expressions work, I
need to spend some time on these.

I was trying to follow http://docs.djangoproject.com/en/1.2/howto/static-files/

I did everything that the page said to no avail, in the end I changed

(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': '/path/to/media'}),


to

(r'site_media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': '/path/to/media'}),

i mean i removed starting ^ in hope that the regular expression will
ignore if something is extra in the start and it worked.

Can somebody explain to point to somewhere that explains?

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment