Opened 9 years ago

Closed 9 years ago

#11758 closed (invalid)

django.views.generic.list_detail doenst render object list

Reported by: gekis13 Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no



I'm doing at
Django version 1.2 pre-alpha SVN-11474.

In step "Use generic views: Less code is better"
Django iso show Poll list tells: No polls are available.

In debug I saw that Context has Polls objects: Context.dict[4].object_list[0]=mysite.polls.model.Poll.

_resolve_lookup raise KeyError when try to get context[u"latest_poll_list"]. After that I see nothing.
Fix please:)

Stack trace from Wing IDE:, line 11, in <module>

execute_manager(settings), line 362, in execute_manager

utility.execute(), line 303, in execute

self.fetch_command(subcommand).run_from_argv(self.argv), line 195, in run_from_argv

self.execute(*args, options.dict), line 222, in execute

output = self.handle(*args, options), line 84, in handle

inner_run(), line 60, in inner_run

run(addr, int(port), handler), line 698, in run

httpd.serve_forever(), line 226, in serve_forever

self._handle_request_noblock(), line 281, in _handle_request_noblock

self.process_request(request, client_address), line 307, in process_request

self.finish_request(request, client_address), line 320, in finish_request

self.RequestHandlerClass(request, client_address, self), line 560, in init

BaseHTTPRequestHandler.init(self, *args, kwargs), line 615, in init

self.handle(), line 605, in handle, line 279, in run

self.result = application(self.environ, self.start_response), line 651, in call

return self.application(environ, start_response), line 241, in call

response = self.get_response(request), line 92, in get_response

response = callback(request, *callback_args, callback_kwargs), line 101, in object_list

return HttpResponse(t.render(c), mimetype=mimetype), line 178, in render

return self.nodelist.render(context), line 779, in render

bits.append(self.render_node(node, context)), line 71, in render_node

result = node.render(context), line 239, in render

value = bool_expr.resolve(context, True), line 546, in resolve

obj = self.var.resolve(context), line 687, in resolve

value = self._resolve_lookup(context), line 713, in _resolve_lookup

current = current[bit]


Change History (1)

comment:1 Changed 9 years ago by gekis13

Resolution: invalid
Status: newclosed

Im very sorry. Do not change the template: latest_poll_list to object_list.

Note: See TracTickets for help on using tickets.
Back to Top