Re: directory name with space

2009-10-13 Thread Михаил Лукин
You're definitely right, that's why I mentioned additional tests in view function. I'm not sure about win and NTFS, but on *nix os.path.exists() will likely return False on such weird things as '\x01\x02', while whitelisting characters may lead to problems with internationalization (or we'll get a

Re: directory name with space

2009-10-13 Thread Tim Chase
Михаил Лукин wrote: > Well, I don't know what is under scarico/(\d+)/ - single file or a directory > tree. > > In case of directory tree ".+" seems to be the best way, which is also > documented at > http://docs.djangoproject.com/en/dev/howto/static-files/ > > In case of single file "[^/]+" inst

Re: directory name with space

2009-10-13 Thread Михаил Лукин
Well, I don't know what is under scarico/(\d+)/ - single file or a directory tree. In case of directory tree ".+" seems to be the best way, which is also documented at http://docs.djangoproject.com/en/dev/howto/static-files/ In case of single file "[^/]+" instead of ".+" can be used. I think ther

Re: directory name with space

2009-10-13 Thread Tim Chase
>> Hello i have a small application where in the urls i have >> this : >> >> (r'^scarico/(\d+)/(\w+)/$', >> 'sitonorme.gestnorme.views.scarico'), >> >> the problem is that in the \w+ sometimes i have name with >> space li dir one that i can't rename. > > Maybe you should try smth like this: > >

Re: directory name with space

2009-10-13 Thread Михаил Лукин
Maybe you should try smth like this: (r'^scarico/(\d+)/(.+)/$', 'sitonorme.gestnorme.views.scarico'), On Tue, Oct 13, 2009 at 7:59 PM, luca72 wrote: > > Hello i have a small application where in the urls i have this : > > (r'^scarico/(\d+)/(\w+)/$', 'sitonorme.gestnorme.views.scarico'), > > the

directory name with space

2009-10-13 Thread luca72
Hello i have a small application where in the urls i have this : (r'^scarico/(\d+)/(\w+)/$', 'sitonorme.gestnorme.views.scarico'), the problem is that in the \w+ sometimes i have name with space li dir one that i can't rename. the folder that i pass for example is this: Request URL: http://12