Re: HttpResponseRedirect and encoding

2009-08-05 Thread alecs
Ticket #11638 ... --~--~-~--~~~---~--~~ 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+un

Re: HttpResponseRedirect and encoding

2009-08-05 Thread alecs
After jumping to sqlite Internal Server Error is not raised, just Environment: Request Method: GET Request URL: http://172.16.23.33/file/2840e589359de657b7275adcb60d4fbea6472e2a7746b3c9d451cb4b Django Version: 1.1 Python Version: 2.6.2 Installed Applications: ['django.contrib.auth', 'django.co

Re: HttpResponseRedirect and encoding

2009-08-05 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-08-05, o godz. 13:29, przez alecs: > The problem happens when django is trying to path.encode('us- > ascii') ... > What can be the reason and how to prepare string to be successfully > processed ? If path is bytestring, calling .encode() will first try to decode i

Re: HttpResponseRedirect and encoding

2009-08-05 Thread alecs
The problem happens when django is trying to path.encode('us- ascii') ... What can be the reason and how to prepare string to be successfully processed ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: HttpResponseRedirect and encoding

2009-08-05 Thread Malcolm Tredinnick
On Wed, 2009-08-05 at 01:32 -0700, alecs wrote: > Sorry :( > > return HttpResponseRedirect(path) brings Internal Server Error: > > > cat /var/log/apache2/error.log [... snip ...] I can't immediately see why Python's urljoin() function is trying to do encoding/decoding at the point this explod

Re: HttpResponseRedirect and encoding

2009-08-05 Thread alecs
Sorry :( return HttpResponseRedirect(path) brings Internal Server Error: cat /var/log/apache2/error.log [Wed Aug 05 11:31:30 2009] [error] [client 172.16.23.33] mod_wsgi (pid=6118): Exception occurred processing WSGI script '/var/www/filez/ apache/apache_django.wsgi'., referer: http://172.16.

Re: HttpResponseRedirect and encoding

2009-08-05 Thread Malcolm Tredinnick
On Wed, 2009-08-05 at 01:12 -0700, alecs wrote: > I'm trying to download via GET a file with name in russian and getting > Internal Server Error: > > upfile = UpFile.objects.get(file_hash=file_hash) > path = os.path.join(settings.UPLOAD_ROOT, request.user.username, > upfile.file_name) > return Ht

HttpResponseRedirect and encoding

2009-08-05 Thread alecs
I'm trying to download via GET a file with name in russian and getting Internal Server Error: upfile = UpFile.objects.get(file_hash=file_hash) path = os.path.join(settings.UPLOAD_ROOT, request.user.username, upfile.file_name) return HttpResponseRedirect(path.decode('utf8')) If filename in Englis