Re: optional parameter url

2009-02-27 Thread Adonis
ok, seems i found a quick n dirty way to overcome the broken pipe. I just left it like this, * (r'^appname/mainpage/(.*)/(?P.*)$', 'django.views.static.serve', {'document_root': '/mesa'}) * and it loads the static files EXCEPT some images that where in a separate folder--> "mesa/images/sth.jpg".

Re: optional parameter url

2009-02-26 Thread Adonis
Thank you for your replies, Kevin, Adding a slash does no good when it comes to calling static files using serve(). It works different than the regexp for calling a def from views.py because it searches for directories, file extensions etc. Raffaele, swaping the lines produces an "error 32,

Re: optional parameter url

2009-02-25 Thread Raffaele Salmaso
Adonis wrote: > (r'^appname/mainpage/(?P.*)$', 'django.views.static.serve', > {'document_root': '/mesa'}), this takes *everything* as 'path' > (r'^appname/mainpage/(?P\d+)/(?P.*)$', > 'django.views.static.serve', {'document_root': '/mesa'}), this takes only digits as 'xexe', but it never get

Re: optional parameter url

2009-02-25 Thread Kevin Audleman
I think you're missing the trailing slash in your URL's. Should be: (r'^appname/mainpage/(?P.*)/$', 'django.views.static.serve', {'document_root': '/mesa'}), (r'^appname/mainpage/(?P\d+)/(?P.*)/$', 'django.views.static.serve', {'document_root': '/mesa'}), Mind you, I don't know if this will

optional parameter url

2009-02-25 Thread Adonis
Hello, I am having some trouble serving static files when i try to pass an optional parameter. For url: appname.mainpage/, the static files work fine For url: appname.mainpage/10/, the static files are not read. ** url.py (r'^appname/mainpage/(?P.*)$', 'django.views.static.serve',