#6210 closed (invalid)
ProgrammingError at /admin/redirects/redirect/add/
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Contrib apps | Version: | 0.96 |
Severity: | Keywords: | redirects | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
ProgrammingError at /admin/redirects/redirect/add/
operator does not exist: integer * unknown LINE 1: ...tsite"."id" WHERE ("django_redirectsite"."id" ILIKE '1' ... HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.* unknown LINE 1: ...tsite"."id" WHERE ("django_redirectsite"."id" ILIKE '1' ... HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Request Method: POST
Request URL: http://localhost:8000/admin/redirects/redirect/add/
Exception Type: ProgrammingError
Exception Value: operator does not exist: integer
Exception Location: D:\Python25\Lib\site-packages\django\db\backends\util.py in execute, line 12
Traceback (innermost last)
Switch to copy-and-paste view
- D:\Python25\Lib\site-packages\django\core\handlers\base.py in get_response
- # Apply view middleware
- for middleware_method in self._view_middleware:
- response = middleware_method(request, callback, callback_args, callback_kwargs)
- if response:
- return response 75.
- try:
- response = callback(request, *callback_args, callback_kwargs) ...
- except Exception, e:
- # If the view raised an exception, run it through exception
- # middleware, and if the exception middleware returns a
- # response, use that. Otherwise, reraise the exception.
- for middleware_method in self._exception_middleware:
- response = middleware_method(request, e)
* unknown\nLINE 1: ...tsite"."id" WHERE ("django_redirectsite"."id" ILIKE \'1\' ...\n \nHINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.\n',) exceptions <module 'django.core.exceptions' from 'D:\Python25\lib\site-packages\django\core\exceptions.pyc'> mail_admins <function mail_admins at 0x012754B0> middleware_method <bound method XViewMiddleware.process_view of <django.middleware.doc.XViewMiddleware object at 0x0127B0D0>> request <WSGIRequest GET:<MultiValueDict: {}>, POST:<MultiValueDict: {'new_path': ['/me/'], 'site': ['1'], 'old_path': ['/you/']}>, COOKIES:{'sessionid': 'd1bb80140149ab061927952e4bc3d709'}, META:{'ALLUSERSPROFILE': 'C:
Documents and Settings
All Users', 'APPDATA': 'D:
Documents and Settings
Administrator
Application Data', 'CLIENTNAME': 'Console', 'CLUSTERLOG': 'C:
WINDOWS
Cluster
cluster.log', 'COMMONPROGRAMFILES': 'D:
Program Files
Common Files', 'COMPUTERNAME': 'USER', 'COMSPEC': 'C:
windows
system32
cmd.exe', 'CONTENT_LENGTH': '43', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'DJANGO_SETTINGS_MODULE': 'mysite.settings', 'FP_NO_HOST_CHECK': 'NO', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GTK_BASEPATH': 'D:
PROGRA~1
PyGTK
GTK', 'HOMEDRIVE': 'C:', 'HOMEPATH': '
Documents and Settings
Administrator', 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'gb2312,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'zh-cn,zh;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=d1bb80140149ab061927952e4bc3d709', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_REFERER': 'http://localhost:8000/admin/redirects/redirect/add/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11', 'LANG': 'zh_CN', 'LOGONSERVER': '
USER', 'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH': 'C:
windows
system32;C:
windows;C:
windows
System32
Wbem;D:
Python25;D:
Program Files
Common Files
GTK
2.0
bin;D:
Program Files
Apache Software Foundation
Apache2.2
bin;D:
Program Files
PostgreSQL
8.3-beta2
bin
;D:
Program Files
PostgreSQL
8.3-beta3
bin
;D:
Program Files
PostgreSQL
8.3
bin
;D:
PROGRA~1
PyGTK
GTK
bin;D:
Program Files
StormII
Codec;D:
Program Files
StormII', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH', 'PATH_INFO': '/admin/redirects/redirect/add/', 'PGLOCALEDIR': 'D:
Program Files
PostgreSQL
8.3-beta2
share
locale', 'PROCESSOR_ARCHITECTURE': 'x86', 'PROCESSOR_IDENTIFIER': 'x86 Family 15 Model 3 Stepping 4, GenuineIntel', 'PROCESSOR_LEVEL': '15', 'PROCESSOR_REVISION': '0304', 'PROGRAMFILES': 'D:
Program Files', 'PROMPT': '$P$G', 'PYTHONDOCS': 'D:
Python25
Doc', 'PYTHONPATH': 'E:
python
Django', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'POST', 'RUN_MAIN': 'true', 'SCRIPT_NAME': , 'SERVER_NAME': 'USER', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.1', 'SESSIONNAME': 'Console', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:
windows', 'TEMP': 'd:
TEMP
FileTemp', 'TMP': 'd:
TEMP
FileTemp', 'USERDOMAIN': 'USER', 'USERNAME': 'Administrator', 'USERPROFILE': 'C:
Documents and Settings
Administrator', 'WINDIR': 'C:
windows', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x009CF0B0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x01D10BB0>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}> resolver <django.core.urlresolvers.RegexURLResolver object at 0x01CFBF70> response None self <django.core.handlers.wsgi.WSGIHandler object at 0x00ED2CF0> settings <django.conf.LazySettings object at 0x00AFFD90> urlconf 'mysite.urls' urlresolvers <module 'django.core.urlresolvers' from 'D:\Python25\lib\site-packages\django\core\urlresolvers.pyc'> - D:\Python25\Lib\site-packages\django\contrib\admin\views\decorators.py in _checklogin
- def _checklogin(request, *args, kwargs):
- if request.user.is_authenticated() and request.user.is_staff:
- # The user is valid. Continue to the admin page.
- if request.POST.has_key('post_data'):
- # User must have re-authenticated through a different window
- # or tab.
- request.POST = _decode_post_data(request.POSTpost_data)
- return view_func(request, *args, kwargs) ... 56.
- assert hasattr(request, 'session'), "The Django admin requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.sessions.middleware.SessionMiddleware'." 58.
- # If this isn't already the login page, display it.
- if not request.POST.has_key(LOGIN_FORM_KEY):
- if request.POST:
Documents and Settings
All Users', 'APPDATA': 'D:
Documents and Settings
Administrator
Application Data', 'CLIENTNAME': 'Console', 'CLUSTERLOG': 'C:
WINDOWS
Cluster
cluster.log', 'COMMONPROGRAMFILES': 'D:
Program Files
Common Files', 'COMPUTERNAME': 'USER', 'COMSPEC': 'C:
windows
system32
cmd.exe', 'CONTENT_LENGTH': '43', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'DJANGO_SETTINGS_MODULE': 'mysite.settings', 'FP_NO_HOST_CHECK': 'NO', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GTK_BASEPATH': 'D:
PROGRA~1
PyGTK
GTK', 'HOMEDRIVE': 'C:', 'HOMEPATH': '
Documents and Settings
Administrator', 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'gb2312,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'zh-cn,zh;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=d1bb80140149ab061927952e4bc3d709', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_REFERER': 'http://localhost:8000/admin/redirects/redirect/add/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11', 'LANG': 'zh_CN', 'LOGONSERVER': '
USER', 'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH': 'C:
windows
system32;C:
windows;C:
windows
System32
Wbem;D:
Python25;D:
Program Files
Common Files
GTK
2.0
bin;D:
Program Files
Apache Software Foundation
Apache2.2
bin;D:
Program Files
PostgreSQL
8.3-beta2
bin
;D:
Program Files
PostgreSQL
8.3-beta3
bin
;D:
Program Files
PostgreSQL
8.3
bin
;D:
PROGRA~1
PyGTK
GTK
bin;D:
Program Files
StormII
Codec;D:
Program Files
StormII', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH', 'PATH_INFO': '/admin/redirects/redirect/add/', 'PGLOCALEDIR': 'D:
Program Files
PostgreSQL
8.3-beta2
share
locale', 'PROCESSOR_ARCHITECTURE': 'x86', 'PROCESSOR_IDENTIFIER': 'x86 Family 15 Model 3 Stepping 4, GenuineIntel', 'PROCESSOR_LEVEL': '15', 'PROCESSOR_REVISION': '0304', 'PROGRAMFILES': 'D:
Program Files', 'PROMPT': '$P$G', 'PYTHONDOCS': 'D:
Python25
Doc', 'PYTHONPATH': 'E:
python
Django', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'POST', 'RUN_MAIN': 'true', 'SCRIPT_NAME': , 'SERVER_NAME': 'USER', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.1', 'SESSIONNAME': 'Console', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:
windows', 'TEMP': 'd:
TEMP
FileTemp', 'TMP': 'd:
TEMP
FileTemp', 'USERDOMAIN': 'USER', 'USERNAME': 'Administrator', 'USERPROFILE': 'C:
Documents and Settings
Administrator', 'WINDIR': 'C:
windows', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x009CF0B0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x01D10BB0>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}> view_func <function _wrapped_view_func at 0x01D541B0> - D:\Python25\Lib\site-packages\django\views\decorators\cache.py in _wrapped_view_func
32.
- def never_cache(view_func):
- """
- Decorator that adds headers to a response so that it will
- never be cached.
- """
- def _wrapped_view_func(request, *args, kwargs):
- response = view_func(request, *args, kwargs) ...
- add_never_cache_headers(response)
- return response
- return _wrapped_view_func
▶ Local vars
Variable Value
args
('redirects', 'redirect')
kwargs
{}
request
<WSGIRequest GET:<MultiValueDict: {}>, POST:<MultiValueDict: {'new_path': ['/me/'], 'site': ['1'], 'old_path': ['/you/']}>, COOKIES:{'sessionid': 'd1bb80140149ab061927952e4bc3d709'}, META:{'ALLUSERSPROFILE': 'C:
Documents and Settings
All Users', 'APPDATA': 'D:
Documents and Settings
Administrator
Application Data', 'CLIENTNAME': 'Console', 'CLUSTERLOG': 'C:
WINDOWS
Cluster
cluster.log', 'COMMONPROGRAMFILES': 'D:
Program Files
Common Files', 'COMPUTERNAME': 'USER', 'COMSPEC': 'C:
windows
system32
cmd.exe', 'CONTENT_LENGTH': '43', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'DJANGO_SETTINGS_MODULE': 'mysite.settings', 'FP_NO_HOST_CHECK': 'NO', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GTK_BASEPATH': 'D:
PROGRA~1
PyGTK
GTK', 'HOMEDRIVE': 'C:', 'HOMEPATH': '
Documents and Settings
Administrator', 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'gb2312,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'zh-cn,zh;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=d1bb80140149ab061927952e4bc3d709', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_REFERER': 'http://localhost:8000/admin/redirects/redirect/add/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11', 'LANG': 'zh_CN', 'LOGONSERVER': '
USER', 'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH': 'C:
windows
system32;C:
windows;C:
windows
System32
Wbem;D:
Python25;D:
Program Files
Common Files
GTK
2.0
bin;D:
Program Files
Apache Software Foundation
Apache2.2
bin;D:
Program Files
PostgreSQL
8.3-beta2
bin
;D:
Program Files
PostgreSQL
8.3-beta3
bin
;D:
Program Files
PostgreSQL
8.3
bin
;D:
PROGRA~1
PyGTK
GTK
bin;D:
Program Files
StormII
Codec;D:
Program Files
StormII', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH', 'PATH_INFO': '/admin/redirects/redirect/add/', 'PGLOCALEDIR': 'D:
Program Files
PostgreSQL
8.3-beta2
share
locale', 'PROCESSOR_ARCHITECTURE': 'x86', 'PROCESSOR_IDENTIFIER': 'x86 Family 15 Model 3 Stepping 4, GenuineIntel', 'PROCESSOR_LEVEL': '15', 'PROCESSOR_REVISION': '0304', 'PROGRAMFILES': 'D:
Program Files', 'PROMPT': '$P$G', 'PYTHONDOCS': 'D:
Python25
Doc', 'PYTHONPATH': 'E:
python
Django', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'POST', 'RUN_MAIN': 'true', 'SCRIPT_NAME': , 'SERVER_NAME': 'USER', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.1', 'SESSIONNAME': 'Console', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:
windows', 'TEMP': 'd:
TEMP
FileTemp', 'TMP': 'd:
TEMP
FileTemp', 'USERDOMAIN': 'USER', 'USERNAME': 'Administrator', 'USERPROFILE': 'C:
Documents and Settings
Administrator', 'WINDIR': 'C:
windows', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x009CF0B0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x01D10BB0>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
view_func
<function add_stage at 0x01D54170>
- D:\Python25\Lib\site-packages\django\contrib\admin\views\main.py in add_stage
- manipulator = model.AddManipulator()
- if request.POST:
- new_data = request.POST.copy() 246.
- if opts.has_field_type(models.FileField):
- new_data.update(request.FILES)
249.
- errors = manipulator.get_validation_errors(new_data) ...
- manipulator.do_html2python(new_data) 252.
- if not errors:
- new_object = manipulator.save(new_data)
- pk_value = new_object._get_pk_val()
- LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(model).id, pk_value, str(new_object), ADDITION)
▶ Local vars
Variable Value
app_label
'redirects'
form_url
manipulator
<django.db.models.manipulators.AddManipulator object at 0x01D56150>
model
<class 'django.contrib.redirects.models.Redirect'>
model_name
'redirect'
new_data
<MultiValueDict: {'new_path': ['/me/'], 'site': ['1'], 'old_path': ['/you/']}>
object_id_override
None
opts
<Options for Redirect>
post_url
'../'
post_url_continue
'../%s/'
request
<WSGIRequest GET:<MultiValueDict: {}>, POST:<MultiValueDict: {'new_path': ['/me/'], 'site': ['1'], 'old_path': ['/you/']}>, COOKIES:{'sessionid': 'd1bb80140149ab061927952e4bc3d709'}, META:{'ALLUSERSPROFILE': 'C:
Documents and Settings
All Users', 'APPDATA': 'D:
Documents and Settings
Administrator
Application Data', 'CLIENTNAME': 'Console', 'CLUSTERLOG': 'C:
WINDOWS
Cluster
cluster.log', 'COMMONPROGRAMFILES': 'D:
Program Files
Common Files', 'COMPUTERNAME': 'USER', 'COMSPEC': 'C:
windows
system32
cmd.exe', 'CONTENT_LENGTH': '43', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'DJANGO_SETTINGS_MODULE': 'mysite.settings', 'FP_NO_HOST_CHECK': 'NO', 'GATEWAY_INTERFACE': 'CGI/1.1', 'GTK_BASEPATH': 'D:
PROGRA~1
PyGTK
GTK', 'HOMEDRIVE': 'C:', 'HOMEPATH': '
Documents and Settings
Administrator', 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'gb2312,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'zh-cn,zh;q=0.5', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=d1bb80140149ab061927952e4bc3d709', 'HTTP_HOST': 'localhost:8000', 'HTTP_KEEP_ALIVE': '300', 'HTTP_REFERER': 'http://localhost:8000/admin/redirects/redirect/add/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11', 'LANG': 'zh_CN', 'LOGONSERVER': '
USER', 'NUMBER_OF_PROCESSORS': '1', 'OS': 'Windows_NT', 'PATH': 'C:
windows
system32;C:
windows;C:
windows
System32
Wbem;D:
Python25;D:
Program Files
Common Files
GTK
2.0
bin;D:
Program Files
Apache Software Foundation
Apache2.2
bin;D:
Program Files
PostgreSQL
8.3-beta2
bin
;D:
Program Files
PostgreSQL
8.3-beta3
bin
;D:
Program Files
PostgreSQL
8.3
bin
;D:
PROGRA~1
PyGTK
GTK
bin;D:
Program Files
StormII
Codec;D:
Program Files
StormII', 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH', 'PATH_INFO': '/admin/redirects/redirect/add/', 'PGLOCALEDIR': 'D:
Program Files
PostgreSQL
8.3-beta2
share
locale', 'PROCESSOR_ARCHITECTURE': 'x86', 'PROCESSOR_IDENTIFIER': 'x86 Family 15 Model 3 Stepping 4, GenuineIntel', 'PROCESSOR_LEVEL': '15', 'PROCESSOR_REVISION': '0304', 'PROGRAMFILES': 'D:
Program Files', 'PROMPT': '$P$G', 'PYTHONDOCS': 'D:
Python25
Doc', 'PYTHONPATH': 'E:
python
Django', 'QUERY_STRING': , 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_HOST': , 'REQUEST_METHOD': 'POST', 'RUN_MAIN': 'true', 'SCRIPT_NAME': , 'SERVER_NAME': 'USER', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.5.1', 'SESSIONNAME': 'Console', 'SYSTEMDRIVE': 'C:', 'SYSTEMROOT': 'C:
windows', 'TEMP': 'd:
TEMP
FileTemp', 'TMP': 'd:
TEMP
FileTemp', 'USERDOMAIN': 'USER', 'USERNAME': 'Administrator', 'USERPROFILE': 'C:
Documents and Settings
Administrator', 'WINDIR': 'C:
windows', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x009CF0B0>, 'wsgi.file_wrapper': <class 'django.core.servers.basehttp.FileWrapper'>, 'wsgi.input': <socket._fileobject object at 0x01D10BB0>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
show_delete
False
- D:\Python25\Lib\site-packages\django\oldforms\init.py in get_validation_errors
- field.prepare(new_data) 53.
- def get_validation_errors(self, new_data):
- "Returns dictionary mapping field_names to error-message lists"
- errors = {}
- self.prepare(new_data)
- for field in self.fields:
- errors.update(field.get_validation_errors(new_data)) ...
- val_name = 'validate_%s' % field.field_name
- if hasattr(self, val_name):
- val = getattr(self, val_name)
- try:
- field.run_validator(new_data, val)
- except (validators.ValidationError, validators.CriticalValidationError), e:
- D:\Python25\Lib\site-packages\django\oldforms\init.py in get_validation_errors
- errors = {}
- if self.is_required and not new_data.get(self.field_name, False):
- errors.setdefault(self.field_name, []).append(gettext('This field is required.'))
- return errors
- try:
- for validator in self.validator_list:
- try:
- self.run_validator(new_data, validator) ...
- except validators.ValidationError, e:
- errors.setdefault(self.field_name, []).extend(e.messages)
- # If a CriticalValidationError is raised, ignore any other ValidationErrors
- # for this particular field
- except validators.CriticalValidationError, e:
- errors.setdefault(self.field_name, []).extend(e.messages)
- D:\Python25\Lib\site-packages\django\oldforms\init.py in run_validator
345.
346.
- def run_validator(self, new_data, validator):
- if self.is_required or new_data.get(self.field_name, False) or hasattr(validator, 'always_test'):
- if hasattr(self, 'requires_data_list'):
- validator(new_data.getlist(self.field_name), new_data)
- else:
- validator(new_data.get(self.field_name, ), new_data) ... 353.
- def get_validation_errors(self, new_data):
- errors = {}
- if self.is_required and not new_data.get(self.field_name, False):
- errors.setdefault(self.field_name, []).append(gettext('This field is required.'))
- return errors
▶ Local vars
Variable Value
new_data
<MultiValueDict: {'new_path': ['/me/'], 'site': ['1'], 'old_path': ['/you/']}>
self
FormField "site"
validator
<bound method AddManipulator._curried of <django.db.models.manipulators.AddManipulator object at 0x01D56150>>
- D:\Python25\Lib\site-packages\django\db\models\manipulators.py in manipulator_validator_unique_together
- # doesn't have blank=True.
- return
- if isinstance(f.rel, ManyToOneRel):
- kwargs% f.name = field_val
- else:
- kwargs% f.name = field_val
- try:
- old_obj = self.manager.get(kwargs) ...
- except ObjectDoesNotExist:
- return
- if hasattr(self, 'original_object') and self.original_object._get_pk_val() == old_obj._get_pk_val():
- pass
- else:
- raise validators.ValidationError, _("%(object)s with this %(type)s already exists for the given %(field)s.") % \
- D:\Python25\Lib\site-packages\django\db\models\manager.py in get
- def distinct(self, *args, kwargs):
- return self.get_query_set().distinct(*args, kwargs) 68.
- def extra(self, *args, kwargs):
- return self.get_query_set().extra(*args, kwargs) 71.
- def get(self, *args, kwargs):
- return self.get_query_set().get(*args, kwargs) ... 74.
- def get_or_create(self, kwargs):
- return self.get_query_set().get_or_create(kwargs) 77.
- def create(self, kwargs):
- return self.get_query_set().create(kwargs)
- D:\Python25\Lib\site-packages\django\db\models\query.py in get
243.
- def get(self, *args, kwargs):
- "Performs the SELECT and returns a single object matching the given keyword arguments."
- clone = self.filter(*args, kwargs)
- # clean up SQL by removing unneeded ORDER BY
- if not clone._order_by:
- clone._order_by = ()
- obj_list = list(clone) ...
- if len(obj_list) < 1:
- raise self.model.DoesNotExist, "%s matching query does not exist." % self.model._meta.object_name
- assert len(obj_list) == 1, "get() returned more than one %s -- it returned %s! Lookup parameters were %s" % (self.model._meta.object_name, len(obj_list), kwargs)
- return obj_list[0] 255.
- def create(self, kwargs):
▶ Local vars
Variable Value
args
()
clone
Error in formatting:current transaction is aborted, commands ignored until end of transaction block
kwargs
{'old_pathiexact': '/you/', 'siteidiexact': '1'}
self
Error in formatting:current transaction is aborted, commands ignored until end of transaction block
- D:\Python25\Lib\site-packages\django\db\models\query.py in iter
- def repr(self):
- return repr(self._get_data()) 103.
- def len(self):
- return len(self._get_data()) 106.
- def iter(self):
- return iter(self._get_data()) ... 109.
- def getitem(self, k):
- "Retrieve an item or slice from the set of results."
- if not isinstance(k, (slice, int)):
- raise TypeError
- assert (not isinstance(k, slice) and (k >= 0)) \
- D:\Python25\Lib\site-packages\django\db\models\query.py in _get_data
- if (self._order_by is not None and len(self._order_by) > 0) and \
- (combined._order_by is None or len(combined._order_by) == 0):
- combined._order_by = self._order_by
- return combined 467.
- def _get_data(self):
- if self._result_cache is None:
- self._result_cache = list(self.iterator()) ...
- return self._result_cache 472.
- def _get_sql_clause(self):
- opts = self.model._meta 475.
- # Construct the fundamental parts of the query: SELECT X FROM Y WHERE Z.
- D:\Python25\Lib\site-packages\django\db\models\query.py in iterator
- raise StopIteration 177.
- # self._select is a dictionary, and dictionaries' key order is
- # undefined, so we convert it to a list of tuples.
- extra_select = self._select.items() 181.
- cursor = connection.cursor()
- cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) ...
- fill_cache = self._select_related
- index_end = len(self.model._meta.fields)
- while 1:
- rows = cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)
- if not rows:
- raise StopIteration
- D:\Python25\Lib\site-packages\django\db\backends\util.py in execute
- def init(self, cursor, db):
- self.cursor = cursor
- self.db = db 8.
- def execute(self, sql, params=()):
- start = time()
- try:
- return self.cursor.execute(sql, params) ...
- finally:
- stop = time()
- # If params was a list, convert it to a tuple, because string
- # formatting with '%' only works with tuples or dicts.
- if not isinstance(params, (tuple, dict)):
- params = tuple(params)
▶ Local vars
Variable Value
params
('1', '/you/')
self
<django.db.backends.util.CursorDebugWrapper object at 0x01D813F0>
sql
'SELECT "django_redirect"."id","django_redirect"."site_id","django_redirect"."old_path","django_redirect"."new_path" FROM "django_redirect" INNER JOIN "django_site" AS "django_redirectsite" ON "django_redirect"."site_id" = "django_redirectsite"."id" WHERE ("django_redirectsite"."id" ILIKE %s AND "django_redirect"."old_path" ILIKE %s)'
start
1197611452.984
stop
1197611452.984
Traceback (most recent call last):
File "D:\Python25\Lib\site-packages\django\core\handlers\base.py" in get_response
- response = callback(request, *callback_args, callback_kwargs)
File "D:\Python25\Lib\site-packages\django\contrib\admin\views\decorators.py" in _checklogin
- return view_func(request, *args, kwargs)
File "D:\Python25\Lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func
- response = view_func(request, *args, kwargs)
File "D:\Python25\Lib\site-packages\django\contrib\admin\views\main.py" in add_stage
- errors = manipulator.get_validation_errors(new_data)
File "D:\Python25\Lib\site-packages\django\oldforms\init.py" in get_validation_errors
- errors.update(field.get_validation_errors(new_data))
File "D:\Python25\Lib\site-packages\django\oldforms\init.py" in get_validation_errors
- self.run_validator(new_data, validator)
File "D:\Python25\Lib\site-packages\django\oldforms\init.py" in run_validator
- validator(new_data.get(self.field_name, ), new_data)
File "D:\Python25\Lib\site-packages\django\db\models\manipulators.py" in manipulator_validator_unique_together
- old_obj = self.manager.get(kwargs)
File "D:\Python25\Lib\site-packages\django\db\models\manager.py" in get
- return self.get_query_set().get(*args, kwargs)
File "D:\Python25\Lib\site-packages\django\db\models\query.py" in get
- obj_list = list(clone)
File "D:\Python25\Lib\site-packages\django\db\models\query.py" in iter
- return iter(self._get_data())
File "D:\Python25\Lib\site-packages\django\db\models\query.py" in _get_data
- self._result_cache = list(self.iterator())
File "D:\Python25\Lib\site-packages\django\db\models\query.py" in iterator
- cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params)
File "D:\Python25\Lib\site-packages\django\db\backends\util.py" in execute
- return self.cursor.execute(sql, params)
ProgrammingError at /admin/redirects/redirect/add/
operator does not exist: integer* unknown LINE 1: ...tsite"."id" WHERE ("django_redirectsite"."id" ILIKE '1' ... HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Request information
GET
No GET data
POST
Variable Value
new_path
'/me/'
site
'1'
old_path
'/you/'
COOKIES
Variable Value
sessionid
'd1bb80140149ab061927952e4bc3d709'
META
Variable Value
ALLUSERSPROFILE
'C:
Documents and Settings
All Users'
APPDATA
'D:
Documents and Settings
Administrator
Application Data'
CLIENTNAME
'Console'
CLUSTERLOG
'C:
WINDOWS
Cluster
cluster.log'
COMMONPROGRAMFILES
'D:
Program Files
Common Files'
COMPUTERNAME
'USER'
COMSPEC
'C:
windows
system32
cmd.exe'
CONTENT_LENGTH
'43'
CONTENT_TYPE
'application/x-www-form-urlencoded'
DJANGO_SETTINGS_MODULE
'mysite.settings'
FP_NO_HOST_CHECK
'NO'
GATEWAY_INTERFACE
'CGI/1.1'
GTK_BASEPATH
'D:
PROGRA~1
PyGTK
GTK'
HOMEDRIVE
'C:'
HOMEPATH
'
Documents and Settings
Administrator'
HTTP_ACCEPT
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'
HTTP_ACCEPT_CHARSET
'gb2312,utf-8;q=0.7,*;q=0.7'
HTTP_ACCEPT_ENCODING
'gzip,deflate'
HTTP_ACCEPT_LANGUAGE
'zh-cn,zh;q=0.5'
HTTP_CONNECTION
'keep-alive'
HTTP_COOKIE
'sessionid=d1bb80140149ab061927952e4bc3d709'
HTTP_HOST
'localhost:8000'
HTTP_KEEP_ALIVE
'300'
HTTP_REFERER
'http://localhost:8000/admin/redirects/redirect/add/'
HTTP_USER_AGENT
'Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11'
LANG
'zh_CN'
LOGONSERVER
'
USER'
NUMBER_OF_PROCESSORS
'1'
OS
'Windows_NT'
PATH
'C:
windows
system32;C:
windows;C:
windows
System32
Wbem;D:
Python25;D:
Program Files
Common Files
GTK
2.0
bin;D:
Program Files
Apache Software Foundation
Apache2.2
bin;D:
Program Files
PostgreSQL
8.3-beta2
bin
;D:
Program Files
PostgreSQL
8.3-beta3
bin
;D:
Program Files
PostgreSQL
8.3
bin
;D:
PROGRA~1
PyGTK
GTK
bin;D:
Program Files
StormII
Codec;D:
Program Files
StormII'
PATHEXT
'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PATH_INFO
'/admin/redirects/redirect/add/'
PGLOCALEDIR
'D:
Program Files
PostgreSQL
8.3-beta2
share
locale'
PROCESSOR_ARCHITECTURE
'x86'
PROCESSOR_IDENTIFIER
'x86 Family 15 Model 3 Stepping 4, GenuineIntel'
PROCESSOR_LEVEL
'15'
PROCESSOR_REVISION
'0304'
PROGRAMFILES
'D:
Program Files'
PROMPT
'$P$G'
PYTHONDOCS
'D:
Python25
Doc'
PYTHONPATH
'E:
python
Django'
QUERY_STRING
REMOTE_ADDR
'127.0.0.1'
REMOTE_HOST
REQUEST_METHOD
'POST'
RUN_MAIN
'true'
SCRIPT_NAME
SERVER_NAME
'USER'
SERVER_PORT
'8000'
SERVER_PROTOCOL
'HTTP/1.1'
SERVER_SOFTWARE
'WSGIServer/0.1 Python/2.5.1'
SESSIONNAME
'Console'
SYSTEMDRIVE
'C:'
SYSTEMROOT
'C:
windows'
TEMP
'd:
TEMP
FileTemp'
TMP
'd:
TEMP
FileTemp'
USERDOMAIN
'USER'
USERNAME
'Administrator'
USERPROFILE
'C:
Documents and Settings
Administrator'
WINDIR
'C:
windows'
wsgi.errors
<open file '<stderr>', mode 'w' at 0x009CF0B0>
wsgi.file_wrapper
<class 'django.core.servers.basehttp.FileWrapper'>
wsgi.input
<socket._fileobject object at 0x01D10BB0>
wsgi.multiprocess
False
wsgi.multithread
True
wsgi.run_once
False
wsgi.url_scheme
'http'
wsgi.version
(1, 0)
Settings
Using settings module mysite.settings
Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ADMINS
()
ADMIN_FOR
()
ADMIN_MEDIA_PREFIX
'/media/'
ALLOWED_INCLUDE_ROOTS
()
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',)
AUTH_PROFILE_MODULE
'userreg.models.MySiteProfile'
BANNED_IPS
()
CACHE_BACKEND
'simple://'
CACHE_MIDDLEWARE_KEY_PREFIX
CACHE_MIDDLEWARE_SECONDS
120
COMMENTS_ALLOW_PROFANITIES
False
COMMENTS_BANNED_USERS_GROUP
None
COMMENTS_FIRST_FEW
0
COMMENTS_MODERATORS_GROUP
None
COMMENTS_SKETCHY_USERS_GROUP
None
DATABASE_ENGINE
'postgresql_psycopg2'
DATABASE_HOST
DATABASE_NAME
'mysite'
DATABASE_OPTIONS
{}
DATABASE_PASSWORD
''
DATABASE_PORT
DATABASE_USER
'postgres'
DATETIME_FORMAT
'N j, Y, P'
DATE_FORMAT
'N j, Y'
DEBUG
True
DEFAULT_CHARSET
'utf-8'
DEFAULT_CONTENT_TYPE
'text/html'
DEFAULT_FROM_EMAIL
'webmaster@localhost'
DISALLOWED_USER_AGENTS
()
EMAIL_HOST
'smtp.163.com'
EMAIL_HOST_PASSWORD
''
EMAIL_HOST_USER
EMAIL_PORT
25
EMAIL_SUBJECT_PREFIX
'[Django] '
FIXTURE_DIRS
()
IGNORABLE_404_ENDS
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')
IGNORABLE_404_STARTS
('/cgi-bin/', '/_vti_bin', '/_vti_inf')
INSTALLED_APPS
['userreg', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.flatpages', 'django.contrib.redirects', 'mysite.books', 'temp', 'extend', 'django.contrib.sitemaps', 'frame']
INTERNAL_IPS
()
JING_PATH
'/usr/bin/jing'
LANGUAGES
(('ar', 'Arabic'), ('bn', 'Bengali'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('es', 'Spanish'), ('es_AR', 'Argentinean Spanish'), ('fi', 'Finnish'), ('fr', 'French'), ('gl', 'Galician'), ('hu', 'Hungarian'), ('he', 'Hebrew'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('kn', 'Kannada'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('pl', 'Polish'), ('pt', 'Portugese'), ('pt-br', 'Brazilian'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sr', 'Serbian'), ('sv', 'Swedish'), ('ta', 'Tamil'), ('te', 'Telugu'), ('tr', 'Turkish'), ('uk', 'Ukrainian'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))
LANGUAGES_BIDI
('he', 'ar')
LANGUAGE_CODE
'en-us'
MANAGERS
()
MEDIA_ROOT
'E:
python
Django
mysite
userfiles'
MEDIA_URL
'/dynamic/'
MIDDLEWARE_CLASSES
('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'django.middleware.cache.CacheMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', 'django.contrib.redirects.middleware.RedirectFallbackMiddleware')
MONTH_DAY_FORMAT
'F j'
PREPEND_WWW
False
PROFANITIES_LIST
''
ROOT_URLCONF
'mysite.urls'
SECRET_KEY
''
SEND_BROKEN_LINK_EMAILS
False
SERVER_EMAIL
'root@localhost'
SESSION_COOKIE_AGE
1209600
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_NAME
'sessionid'
SESSION_COOKIE_SECURE
False
SESSION_EXPIRE_AT_BROWSER_CLOSE
True
SESSION_SAVE_EVERY_REQUEST
False
SETTINGS_MODULE
'mysite.settings'
SITE_ID
1
STATIC_DIR
'E:
python
Django
mysite
static'
TEMPLATE_CONTEXT_PROCESSORS
('django.core.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n')
TEMPLATE_DEBUG
True
TEMPLATE_DIRS
('E:
python
Django
mysite
templates',)
TEMPLATE_LOADERS
('django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source')
TEMPLATE_STRING_IF_INVALID
TEST_DATABASE_NAME
None
TEST_RUNNER
'django.test.simple.run_tests'
TIME_FORMAT
'P'
TIME_ZONE
'America/Chicago'
TRANSACTIONS_MANAGED
False
URL_VALIDATOR_USER_AGENT
'Django/0.96.1 (http://www.djangoproject.com)'
USE_ETAGS
False
USE_I18N
True
YEAR_MONTH_FORMAT
'F Y'
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.
Change History (2)
comment:1 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
I just ran into an error that looks a lot like above, using
PostgreSQL 8.3beta2 and the postgresql_psycopg2 engine.
Ticket #1751 ,"unique_together does not work when any
of the listed fields contains a FK" seems to have been
the cause.
I was previously using SQLite, and that didn't have a problem
with a foreign key field being in a 'unique_together' Meta clause.
Please don't just paste a full traceback to a bug report like you did. I am closing this as invalid as you provided no information on why this error is occuring. Please direct question about Django's usage to the django-users mailing list or #django on freenode. Please create a new ticket with a proper bug submission.