Hi Daniel ,
you asked me copy and paste the error i got. In dealing of poll app
part 4 help me to find a way to solve the problem in dealing with
results.html and results view .
Before changing results view it's working good. After changing result
view and after creating in results.html . I am getting this problem after
clicking "Vote" buttion on my browser.
python manage.py runserver
Validating models...
0 errors found
April 23, 2014 - 09:20:10
Django version 1.6.2, using settings 'dj_tutorial.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[23/Apr/2014 09:20:15] "GET /poll/ HTTP/1.1" 200 408
[23/Apr/2014 09:20:18] "GET /poll/specifics/7/ HTTP/1.1" 200 599
[23/Apr/2014 09:20:23] "POST /poll/7/votes/ HTTP/1.1" 302 0
Internal Server Error: /poll/7/results/
Traceback (most recent call last):
File
"/root/.virtualenvs/djan/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 114, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/seenu/work/Django_proj/d_tutorial/dj_tutorial/poll/views.py",
line 24, in results
poll = get_object_or_404(Poll, poll_id)
File
"/root/.virtualenvs/djan/local/lib/python2.7/site-packages/django/shortcuts/__init__.py",
line 113, in get_object_or_404
return queryset.get(*args, **kwargs)
File
"/root/.virtualenvs/djan/local/lib/python2.7/site-packages/django/db/models/query.py",
line 298, in get
clone = self.filter(*args, **kwargs)
File
"/root/.virtualenvs/djan/local/lib/python2.7/site-packages/django/db/models/query.py",
line 590, in filter
return self._filter_or_exclude(False, *args, **kwargs)
File
"/root/.virtualenvs/djan/local/lib/python2.7/site-packages/django/db/models/query.py",
line 608, in _filter_or_exclude
clone.query.add_q(Q(*args, **kwargs))
File
"/root/.virtualenvs/djan/local/lib/python2.7/site-packages/django/db/models/sql/query.py",
line 1192, in add_q
if not self.need_having(q_object):
File
"/root/.virtualenvs/djan/local/lib/python2.7/site-packages/django/db/models/sql/query.py",
line 1155, in need_having
return any(self.need_having(c) for c in obj.children)
File
"/root/.virtualenvs/djan/local/lib/python2.7/site-packages/django/db/models/sql/query.py",
line 1155, in <genexpr>
return any(self.need_having(c) for c in obj.children)
File
"/root/.virtualenvs/djan/local/lib/python2.7/site-packages/django/db/models/sql/query.py",
line 1153, in need_having
or (hasattr(obj[1], 'contains_aggregate')
IndexError: string index out of range
[23/Apr/2014 09:20:24] "GET /poll/7/results/ HTTP/1.1" 500 91775
On Wednesday, April 23, 2014 12:58:54 PM UTC+5:30, Daniel Roseman wrote:
>
> Why have you posted screenshots of text to a text-based newsgroup? Please
> copy and paste the relevant text into a message (the Django error page even
> has a special link to go to a copy and paste view).
> --
> DR.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/6439dd90-79d5-4c1a-aeda-3ecc3434f0d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.