Skip to content

Instantly share code, notes, and snippets.

@pjhoberman
Created August 8, 2011 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjhoberman/1131129 to your computer and use it in GitHub Desktop.
Save pjhoberman/1131129 to your computer and use it in GitHub Desktop.
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/Whiskey/
Django Version: 1.3
Python Version: 2.6.1
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'glasses',
'django.contrib.admin',
'django.contrib.admindocs']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "/Library/Python/2.6/site-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/Users/myname/Sites/glassware/glasses/views.py" in booze
11. booze = get_object_or_404(Booze,Q(pk=booze_q)|Q(name=booze_q))
File "/Library/Python/2.6/site-packages/django/shortcuts/__init__.py" in get_object_or_404
113. return queryset.get(*args, **kwargs)
File "/Library/Python/2.6/site-packages/django/db/models/query.py" in get
341. clone = self.filter(*args, **kwargs)
File "/Library/Python/2.6/site-packages/django/db/models/query.py" in filter
550. return self._filter_or_exclude(False, *args, **kwargs)
File "/Library/Python/2.6/site-packages/django/db/models/query.py" in _filter_or_exclude
568. clone.query.add_q(Q(*args, **kwargs))
File "/Library/Python/2.6/site-packages/django/db/models/sql/query.py" in add_q
1169. self.add_q(child, used_aliases, force_having=force_having)
File "/Library/Python/2.6/site-packages/django/db/models/sql/query.py" in add_q
1172. can_reuse=used_aliases, force_having=force_having)
File "/Library/Python/2.6/site-packages/django/db/models/sql/query.py" in add_filter
1107. connector)
File "/Library/Python/2.6/site-packages/django/db/models/sql/where.py" in add
67. value = obj.prepare(lookup_type, value)
File "/Library/Python/2.6/site-packages/django/db/models/sql/where.py" in prepare
316. return self.field.get_prep_lookup(lookup_type, value)
File "/Library/Python/2.6/site-packages/django/db/models/fields/__init__.py" in get_prep_lookup
292. return self.get_prep_value(value)
File "/Library/Python/2.6/site-packages/django/db/models/fields/__init__.py" in get_prep_value
479. return int(value)
Exception Type: ValueError at /Whiskey/
Exception Value: invalid literal for int() with base 10: 'Whiskey'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment