But how is this related to authentication? On Sunday, 2 December 2012 г. at 18:05, [email protected] wrote:
> Send uWSGI mailing list submissions to > [email protected] (mailto:[email protected]) > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > or, via email, send a message with subject or body 'help' to > [email protected] (mailto:[email protected]) > > You can reach the person managing the list at > [email protected] (mailto:[email protected]) > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of uWSGI digest..." > > > Today's Topics: > > 1. Re: Django authentication does not work by reason of > TemplateDoesNotExist: 500.html (?ukasz Mierzwa) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 2 Dec 2012 15:10:19 +0100 > From: ?ukasz Mierzwa <[email protected] (mailto:[email protected])> > To: uWSGI developers and users list <[email protected] > (mailto:[email protected])> > Subject: Re: [uWSGI] Django authentication does not work by reason of > TemplateDoesNotExist: 500.html > Message-ID: > <cafcbevsjn4dbjwpermsdbdnf8nowakc-hcs7wfufm5gqnpd...@mail.gmail.com > (mailto:cafcbevsjn4dbjwpermsdbdnf8nowakc-hcs7wfufm5gqnpd...@mail.gmail.com)> > Content-Type: text/plain; charset="utf-8" > > Requests for /favicon.ico are going through django and You probably don't > have any urlconf that will handle it, so django tries to display 404.html, > it's missing so it tries to display 500.html, it's normal. > If You have favicon.inco file than just add: > > static-map = /favicon.ico=static/favicon.ico > > to uWSGI ini file. To map /favicon.ico requests to > (appdir)/static/favicon.ico. This way uWSGI will hande those requests > instead, they won't be forwarded to django. > > > 2012/12/2 ???????? <[email protected] (mailto:[email protected])> > > > Hello, > > My browser looks for a favicon at GET /favicon.ico but favicon is not > > there and django(with DEBUG=False) trying to find 500.html: > > > > > django.template.base.TemplateDoesNotExist: 500.html > > > > In theory this should not cause problems, but i can't authenticate into my > > application or django-admin: > > > > > > ------------------------------------------------------------------------------------------------------------------------------------- > > > > > detected number of CPU cores: 2 > > > current working directory: /var/www/garden/test/uwsgi > > > detected binary path: /usr/bin/uwsgi-core > > > your memory page size is 4096 bytes > > > *** WARNING: you have enabled harakiri without post buffering. Slow > > > > > > > upload could be rejected on post-unbuffered webservers *** > > > detected max file descriptor number: 1024 > > > lock engine: pthread robust mutexes > > > uwsgi socket 0 bound to UNIX address > > > > > > > /var/www/garden/test/uwsgi/uwsgi.sock fd 3 > > > Python version: 2.7.2+ (default, Nov 30 2011, 22:33:30) [GCC 4.6.2] > > > *** Python threads support is disabled. You can enable it with > > > > > > > --enable-threads *** > > > Python main interpreter initialized at 0x1a38ca0 > > > your server socket listen backlog is limited to 100 connections > > > *** Operational MODE: single process *** > > > WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x1a38ca0 > > > > > > > pid: 21099 (default app) > > > *** uWSGI is running in multiple interpreter mode *** > > > spawned uWSGI master process (pid: 21099) > > > spawned uWSGI worker 1 (pid: 21100, cores: 1) > > > [pid: 21100|app: 0|req: 1/1] 77.105.184.20 () {48 vars in 1094 bytes} > > > > > > > [Sun Dec 2 17:40:16 2012] GET /admin/ => generated 1957 bytes in 721 msecs > > (HTTP/1.1 200) 7 headers in 438 bytes (1 switches on core 0) > > > WARNING 2012-12-02 17:40:17,444 base 21100 140155857848160 Not Found: > > > > /favicon.ico > > > ERROR 2012-12-02 17:40:17,448 base 21100 140155857848160 Internal Server > > > > Error: /favicon.ico > > > Traceback (most recent call last): > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 150, in get_response > > > response = callback(request, **param_dict) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line > > 91, in _wrapped_view > > > response = view_func(request, *args, **kwargs) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 20, > > in page_not_found > > > t = loader.get_template(template_name) # You need to create a > > > > 404.html template. > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 145, in get_template > > > template, origin = find_template(template_name) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 138, in find_template > > > raise TemplateDoesNotExist(name) > > > TemplateDoesNotExist: 404.html > > > Traceback (most recent call last): > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line > > 241, in __call__ > > > response = self.get_response(request) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 153, in get_response > > > response = self.handle_uncaught_exception(request, resolver, > > > > sys.exc_info()) > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 228, in handle_uncaught_exception > > > return callback(request, **param_dict) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line > > 91, in _wrapped_view > > > response = view_func(request, *args, **kwargs) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 32, > > in server_error > > > t = loader.get_template(template_name) # You need to create a > > > > 500.html template. > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 145, in get_template > > > template, origin = find_template(template_name) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 138, in find_template > > > raise TemplateDoesNotExist(name) > > > django.template.base.TemplateDoesNotExist: 500.html > > > [pid: 21100|app: 0|req: 2/2] 77.105.184.20 () {42 vars in 915 bytes} > > > > > > > [Sun Dec 2 17:40:17 2012] GET /favicon.ico => generated 0 bytes in 19 > > msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0) > > > WARNING 2012-12-02 17:40:17,583 base 21100 140155857848160 Not Found: > > > > /favicon.ico > > > ERROR 2012-12-02 17:40:17,585 base 21100 140155857848160 Internal Server > > > > Error: /favicon.ico > > > Traceback (most recent call last): > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 150, in get_response > > > response = callback(request, **param_dict) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line > > 91, in _wrapped_view > > > response = view_func(request, *args, **kwargs) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 20, > > in page_not_found > > > t = loader.get_template(template_name) # You need to create a > > > > 404.html template. > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 145, in get_template > > > template, origin = find_template(template_name) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 138, in find_template > > > raise TemplateDoesNotExist(name) > > > TemplateDoesNotExist: 404.html > > > Traceback (most recent call last): > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line > > 241, in __call__ > > > response = self.get_response(request) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 153, in get_response > > > response = self.handle_uncaught_exception(request, resolver, > > > > sys.exc_info()) > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 228, in handle_uncaught_exception > > > return callback(request, **param_dict) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line > > 91, in _wrapped_view > > > response = view_func(request, *args, **kwargs) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 32, > > in server_error > > > t = loader.get_template(template_name) # You need to create a > > > > 500.html template. > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 145, in get_template > > > template, origin = find_template(template_name) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 138, in find_template > > > raise TemplateDoesNotExist(name) > > > django.template.base.TemplateDoesNotExist: 500.html > > > [pid: 21100|app: 0|req: 3/3] 77.105.184.20 () {42 vars in 915 bytes} > > > > > > > [Sun Dec 2 17:40:17 2012] GET /favicon.ico => generated 0 bytes in 16 > > msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0) > > > [pid: 21100|app: 0|req: 4/4] 77.105.184.20 () {52 vars in 1191 bytes} > > > > [Sun Dec 2 17:40:29 2012] POST /admin/ => generated 0 bytes in 317 msecs > > (HTTP/1.1 302) 7 headers in 358 bytes (1 switches on core 0) > > > [pid: 21100|app: 0|req: 5/5] 77.105.184.20 () {48 vars in 1094 bytes} > > > > [Sun Dec 2 17:40:29 2012] GET /admin/ => generated 1957 bytes in 59 msecs > > (HTTP/1.1 200) 7 headers in 438 bytes (1 switches on core 0) > > > WARNING 2012-12-02 17:40:29,999 base 21100 140155857848160 Not Found: > > > > /favicon.ico > > > ERROR 2012-12-02 17:40:30,000 base 21100 140155857848160 Internal Server > > > > Error: /favicon.ico > > > Traceback (most recent call last): > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 150, in get_response > > > response = callback(request, **param_dict) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line > > 91, in _wrapped_view > > > response = view_func(request, *args, **kwargs) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 20, > > in page_not_found > > > t = loader.get_template(template_name) # You need to create a > > > > 404.html template. > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 145, in get_template > > > template, origin = find_template(template_name) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 138, in find_template > > > raise TemplateDoesNotExist(name) > > > TemplateDoesNotExist: 404.html > > > Traceback (most recent call last): > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line > > 241, in __call__ > > > response = self.get_response(request) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 153, in get_response > > > response = self.handle_uncaught_exception(request, resolver, > > > > sys.exc_info()) > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 228, in handle_uncaught_exception > > > return callback(request, **param_dict) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line > > 91, in _wrapped_view > > > response = view_func(request, *args, **kwargs) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 32, > > in server_error > > > t = loader.get_template(template_name) # You need to create a > > > > 500.html template. > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 145, in get_template > > > template, origin = find_template(template_name) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 138, in find_template > > > raise TemplateDoesNotExist(name) > > > django.template.base.TemplateDoesNotExist: 500.html > > > [pid: 21100|app: 0|req: 6/6] 77.105.184.20 () {42 vars in 915 bytes} > > > > > > > [Sun Dec 2 17:40:29 2012] GET /favicon.ico => generated 0 bytes in 16 > > msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0) > > > WARNING 2012-12-02 17:40:30,117 base 21100 140155857848160 Not Found: > > > > /favicon.ico > > > ERROR 2012-12-02 17:40:30,119 base 21100 140155857848160 Internal Server > > > > Error: /favicon.ico > > > Traceback (most recent call last): > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 150, in get_response > > > response = callback(request, **param_dict) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line > > 91, in _wrapped_view > > > response = view_func(request, *args, **kwargs) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 20, > > in page_not_found > > > t = loader.get_template(template_name) # You need to create a > > > > 404.html template. > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 145, in get_template > > > template, origin = find_template(template_name) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 138, in find_template > > > raise TemplateDoesNotExist(name) > > > TemplateDoesNotExist: 404.html > > > Traceback (most recent call last): > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line > > 241, in __call__ > > > response = self.get_response(request) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 153, in get_response > > > response = self.handle_uncaught_exception(request, resolver, > > > > sys.exc_info()) > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line > > 228, in handle_uncaught_exception > > > return callback(request, **param_dict) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line > > 91, in _wrapped_view > > > response = view_func(request, *args, **kwargs) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 32, > > in server_error > > > t = loader.get_template(template_name) # You need to create a > > > > 500.html template. > > > File > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 145, in get_template > > > template, origin = find_template(template_name) > > > File > > > > > > > "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line > > 138, in find_template > > > raise TemplateDoesNotExist(name) > > > django.template.base.TemplateDoesNotExist: 500.html > > > [pid: 21100|app: 0|req: 7/7] 77.105.184.20 () {42 vars in 915 bytes} > > > > > > > [Sun Dec 2 17:40:30 2012] GET /favicon.ico => generated 0 bytes in 16 > > msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0) > > > > > > ------------------------------------------------------------------------------------------------------------------------------------- > > > > Django-admin form without any errors, i was redirected to authentication > > page: > > https://www.evernote.com/shard/s18/sh/7f37fed7-7784-4183-b45f-c51d49108cf5/609e769674e277d539e143031b601299/res/96542963-6bcb-4b5e-8520-b812f45c48ed/skitch.png > > > > If i create file 500.html or set DEBUG=True everything works as expected > > but is it normal? > > > > > > _______________________________________________ > > uWSGI mailing list > > [email protected] (mailto:[email protected]) > > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > > > > > > -- > ?ukasz Mierzwa > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <http://lists.unbit.it/pipermail/uwsgi/attachments/20121202/b0fe387c/attachment.html> > > ------------------------------ > > _______________________________________________ > uWSGI mailing list > [email protected] (mailto:[email protected]) > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > > > End of uWSGI Digest, Vol 39, Issue 4 > ************************************ > >
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
