#13710: raw() sql bug when using a model with many fields with long names
---------------------------------------------------+------------------------
Reporter: Renskers | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.2
Resolution: | Keywords: raw sql
joins
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by anonymous):
This problem also presents itself in the admin. When I try to load the
admin page for my model, I get this error:
{{{
Exception Type: TypeError at /admin/biobench/measurement/
Exception Value: __init__() keywords must be strings
}}}
Traceback:
{{{
File
"/opt/APPS/biobench/acc/Biobench/packages/django/core/handlers/base.py" in
get_response
100. response = callback(request, *callback_args,
**callback_kwargs)
File
"/opt/APPS/biobench/acc/Biobench/packages/django/contrib/admin/options.py"
in wrapper
239. return self.admin_site.admin_view(view)(*args,
**kwargs)
File "/opt/APPS/biobench/acc/Biobench/packages/django/utils/decorators.py"
in _wrapped_view
76. response = view_func(request, *args, **kwargs)
File
"/opt/APPS/biobench/acc/Biobench/packages/django/views/decorators/cache.py"
in _wrapped_view_func
69. response = view_func(request, *args, **kwargs)
File
"/opt/APPS/biobench/acc/Biobench/packages/django/contrib/admin/sites.py"
in inner
190. return view(request, *args, **kwargs)
File "/opt/APPS/biobench/acc/Biobench/packages/django/utils/decorators.py"
in _wrapper
21. return decorator(bound_func)(*args, **kwargs)
File "/opt/APPS/biobench/acc/Biobench/packages/django/utils/decorators.py"
in _wrapped_view
76. response = view_func(request, *args, **kwargs)
File "/opt/APPS/biobench/acc/Biobench/packages/django/utils/decorators.py"
in bound_func
17. return func(self, *args2, **kwargs2)
File
"/opt/APPS/biobench/acc/Biobench/packages/django/contrib/admin/options.py"
in changelist_view
1,071. 'selection_note': _('0 of %(cnt)s selected') %
{'cnt': len(cl.result_list)},
File "/opt/APPS/biobench/acc/Biobench/packages/django/db/models/query.py"
in __len__
81. self._result_cache = list(self.iterator())
File "/opt/APPS/biobench/acc/Biobench/packages/django/db/models/query.py"
in iterator
274. only_load=only_load)
File "/opt/APPS/biobench/acc/Biobench/packages/django/db/models/query.py"
in get_cached_row
1,208. obj = klass(**dict(zip(field_names, fields)))
}}}
My model has 175 fields (yeah...), which on average are 40 characters
long.
--
Ticket URL: <http://code.djangoproject.com/ticket/13710#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.