Re: django + fastcgi + lighttpd outlog and errlog not working
So you mean there is no way to get this kind of log with fastcgi mode: Validating models... 0 errors found Django version 1.4.2, using settings 'finderauto_dj.settings' Development server is running at http://127.0.0.1:8080/ Quit the server with CONTROL-C. [04/Dec/2012 23:10:47] "GET /admin/ HTTP/1.1" 200 12256 [04/Dec/2012 23:10:49] "GET /admin/recherches/alert/ HTTP/1.1" 200 4644 [04/Dec/2012 23:10:49] "GET /admin/jsi18n/ HTTP/1.1" 200 5649 [04/Dec/2012 23:10:50] "GET /admin/recherches/alert/4/ HTTP/1.1" 200 11877 [04/Dec/2012 23:10:54] "GET /admin/recherches/alert/3/ HTTP/1.1" 200 11879 [04/Dec/2012 23:10:56] "GET /admin/recherches/alert/2/ HTTP/1.1" 200 11840 [04/Dec/2012 23:10:58] "GET /admin/recherches/alert/1/ HTTP/1.1" 200 11929 [04/Dec/2012 23:11:27] "GET /admin/recherches/alert/4/ HTTP/1.1" 200 11877 [04/Dec/2012 23:11:33] "GET /admin/recherches/alert/ HTTP/1.1" 200 4644 [04/Dec/2012 23:11:35] "GET /admin/recherches/alert/1/ HTTP/1.1" 200 11929 On Wednesday, December 5, 2012 12:49:06 AM UTC+1, Chris Cogdon wrote: > > I believe you only get the per-request logs when you're running the > development server (runserver). When you're running in fastcgi mode (and > its been a while since I have), you'll only get entries in outlog and > errlog if you actually send stuff to stdout and stderr yourself. And THAT > will require fiddling with the LOGGING settings. > > > On Tuesday, December 4, 2012 10:17:59 AM UTC-8, Gontran Magnat wrote: >> >> Hello, >> >> I'm running a django app on lighttpd with fastcgi. >> For debugging matters I would need the output logs that usually are >> displayed on the console. >> Because I run my application in a daemonize mode I tried to use the >> outlog and errlog options but it did not work. >> >> Here is the command I run: >> >> python manage.py runfcgi method=threaded host=127.0.0.1 port=3033 workdir >> =/mydir/finderauto_dj/ outlog=out.log errlog=err.log >> >> >> The out.log and err.log files are created but when I access my website, >> this should produce this kind of logs: >> [03/Dec/2012 23:09:11] "GET /admin/recherches/alert/4/ HTTP/1.1" 200 11844 >> >> However, both out.log and err.log files remain empty. >> >> Then I tried to use the daemonize=false option in order to have directly >> the output: >> >> python manage.py runfcgi method=threaded host=127.0.0.1 port=3033 >> daemonize=false >> >> >> I get nothing either... >> >> Anybody for helping me? >> >> -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/UjKU7yfP2hUJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
django + fastcgi + lighttpd outlog and errlog not working
Hello, I'm running a django app on lighttpd with fastcgi. For debugging matters I would need the output logs that usually are displayed on the console. Because I run my application in a daemonize mode I tried to use the outlog and errlog options but it did not work. Here is the command I run: python manage.py runfcgi method=threaded host=127.0.0.1 port=3033 workdir= /mydir/finderauto_dj/ outlog=out.log errlog=err.log The out.log and err.log files are created but when I access my website, this should produce this kind of logs: [03/Dec/2012 23:09:11] "GET /admin/recherches/alert/4/ HTTP/1.1" 200 11844 However, both out.log and err.log files remain empty. Then I tried to use the daemonize=false option in order to have directly the output: python manage.py runfcgi method=threaded host=127.0.0.1 port=3033 daemonize=false I get nothing either... Anybody for helping me? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/22s3f645uncJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django request with unicode strings wrongly UTF-8 encoded
I'm having some trouble making my website compatible with accented characters (french website). I have a form where some field values can be with accented chars: "Coupé" for instance. My URL looks like this: http://localhost:8080/recherches/s?marque=Audi=A5+Coup%C3%A9 In my django view I do something like this: def search(request): logger = logging.getLogger('custom') criteria_form = CriteriaForm(request.GET or None) logger.debug("search") logger.debug(request.GET) And what I get in my logs is: If I query my database with this variable "modeles", I get an error: >>> mo = u'A5 Coup\xc3\xa9'>>> Vehicule.objects.filter(valid=True, >>> modele=mo)[0].marque.nameTraceback (most recent call last): File "", line 1, in File "/Library/Python/2.7/site-packages/django/db/models/query.py", line 211, in __getitem__ return list(qs)[0]IndexError: list index out of range Things work if I query the database with the utf-8 version: >>> mo = 'A5 Coup\xc3\xa9'>>> Vehicule.objects.filter(valid=True, >>> modele=mo)[0].marque.name u'Audi' So I think (but I might be wrong) that my problem comes from the fact that my variable is utf8 and then encoded with unicode. How comes this is encoded that way? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/qOX6yFHhnaYJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.