Issue #2 resolved

Nonexisten themes raise error.

pi11 NA
repo owner created an issue

need to fix view with something like get_object_or_404

Traceback (most recent call last):

File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/", line 111, in get_response response = callback(request, callback_args, *callback_kwargs)

File "./flash/", line 22, in wrapper output = func(request, args, *kw)

File "./flash/", line 87, in theme theme = Theme.objects.get(url__exact=theme_url)

File "/usr/local/lib/python2.6/dist-packages/django/db/models/", line 132, in get return self.get_query_set().get(args, *kwargs)

File "/usr/local/lib/python2.6/dist-packages/django/db/models/", line 349, in get % self.model._meta.object_name)

DoesNotExist: Theme matching query does not exist.

<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{}, META:{'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'CSRF_COOKIE': '98f0c07ace933e392e61eb0f039672d7', 'DOCUMENT_ROOT': '/var/www/dorgen/data/www/', 'HTTP_ACCEPT': '/', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_COOKIE': '', 'HTTP_HOST': '', 'HTTP_REFERER': '', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv: Gecko/20101203 Firefox/3.6.13', 'PATH_INFO': u'/theme/pornholio/', 'QUERY_STRING': '', 'REMOTE_ADDR': '', 'REMOTE_PORT': '7932', 'REQUEST_METHOD': 'HEAD', 'REQUEST_URI': '/theme/pornholio/', 'SCRIPT_NAME': u'', 'SERVER_NAME': '', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'uwsgi.core': 1, 'uwsgi.version': '', 'wsgi.errors': <open file 'wsgi_input', mode 'w' at 0x1ba4ed0>, 'wsgi.file_wrapper': <built-in function uwsgi_sendfile>, 'wsgi.input': <open file 'wsgi_input', mode 'r' at 0x1ba4c00>, 'wsgi.multiprocess': True, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>

Comments (1)

  1. Log in to comment