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".
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,
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
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
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',
5 matches
Mail list logo