﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
11678	ValueError when passing an extra parameter in URL	 	nobody	"Django.contrib.admin produces a ValueError when passing an extra parameter to the URL.
Example: 
The edit page for the model 'deelnemer' is: http://localhost:8000/admin/aanmelden/deelnemer/1/
When typing an extra 'a' behind the url (http://localhost:8000/admin/aanmelden/deelnemer/1/a/) a ValueError occurs

Wouldn't it be better for production environments to produce a 404?

Traceback:
{{{
Environment:

Request Method: GET
Request URL: http://localhost:8000/admin/aanmelden/deelnemer/1/a/
Django Version: 1.1
Python Version: 2.5.1
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'skievent.aanmelden']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File ""/Library/Python/2.5/site-packages/django/core/handlers/base.py"" in get_response
  92.                 response = callback(request, *callback_args, **callback_kwargs)
File ""/Library/Python/2.5/site-packages/django/contrib/admin/sites.py"" in root
  490.                 return self.model_page(request, *url.split('/', 2))
File ""/Library/Python/2.5/site-packages/django/views/decorators/cache.py"" in _wrapped_view_func
  44.         response = view_func(request, *args, **kwargs)
File ""/Library/Python/2.5/site-packages/django/contrib/admin/sites.py"" in model_page
  509.         return admin_obj(request, rest_of_url)
File ""/Library/Python/2.5/site-packages/django/contrib/admin/options.py"" in __call__
  1098.             return self.change_view(request, unquote(url))
File ""/Library/Python/2.5/site-packages/django/db/transaction.py"" in _commit_on_success
  240.                 res = func(*args, **kw)
File ""/Library/Python/2.5/site-packages/django/contrib/admin/options.py"" in change_view
  793.             obj = self.queryset(request).get(pk=unquote(object_id))
File ""/Library/Python/2.5/site-packages/django/db/models/query.py"" in get
  299.         clone = self.filter(*args, **kwargs)
File ""/Library/Python/2.5/site-packages/django/db/models/query.py"" in filter
  498.         return self._filter_or_exclude(False, *args, **kwargs)
File ""/Library/Python/2.5/site-packages/django/db/models/query.py"" in _filter_or_exclude
  516.             clone.query.add_q(Q(*args, **kwargs))
File ""/Library/Python/2.5/site-packages/django/db/models/sql/query.py"" in add_q
  1675.                             can_reuse=used_aliases)
File ""/Library/Python/2.5/site-packages/django/db/models/sql/query.py"" in add_filter
  1614.                 connector)
File ""/Library/Python/2.5/site-packages/django/db/models/sql/where.py"" in add
  56.                 obj, params = obj.process(lookup_type, value)
File ""/Library/Python/2.5/site-packages/django/db/models/sql/where.py"" in process
  269.                 params = self.field.get_db_prep_lookup(lookup_type, value)
File ""/Library/Python/2.5/site-packages/django/db/models/fields/__init__.py"" in get_db_prep_lookup
  210.             return [self.get_db_prep_value(value)]
File ""/Library/Python/2.5/site-packages/django/db/models/fields/__init__.py"" in get_db_prep_value
  361.         return int(value)

Exception Type: ValueError at /admin/aanmelden/deelnemer/1/a/
Exception Value: invalid literal for int() with base 10: '1/a'
}}}

Thanks,

Kevin
"		closed	contrib.admin	1.1		duplicate	ValueError, django.contrib.admin		Unreviewed	0	0	0	0	0	0
