Code

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#242 closed defect (fixed)

Traceback when viewing tag docs.

Reported by: mmarshall Owned by: jacob
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

going to /admin/doc/tags/ results in the following traceback:

There's been an error:

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 63, in get_response
    return callback(request, **param_dict)

  File "/usr/lib/python2.4/site-packages/django/views/decorators/cache.py", line 27, in _check_cache
    response = view_func(request, *args, **kwargs)

  File "/usr/lib/python2.4/site-packages/django/views/admin/doc.py", line 71, in template_tag_index
    return HttpResponse(t.render(c))

  File "/usr/lib/python2.4/site-packages/django/core/template.py", line 116, in render
    return self.nodelist.render(context)

  File "/usr/lib/python2.4/site-packages/django/core/template.py", line 437, in render
    bits.append(node.render(context))

  File "/usr/lib/python2.4/site-packages/django/core/template_loader.py", line 97, in render
    return compiled_parent.render(context)

  File "/usr/lib/python2.4/site-packages/django/core/template.py", line 116, in render
    return self.nodelist.render(context)

  File "/usr/lib/python2.4/site-packages/django/core/template.py", line 437, in render
    bits.append(node.render(context))

  File "/usr/lib/python2.4/site-packages/django/core/template_loader.py", line 79, in render
    compiled_parent = self.get_parent(context)

  File "/usr/lib/python2.4/site-packages/django/core/template_loader.py", line 74, in get_parent
    return get_template_from_string(load_template_source(parent, self.template_dirs))

  File "/usr/lib/python2.4/site-packages/django/core/template_loader.py", line 20, in get_template_from_string
    return template.Template(source)

  File "/usr/lib/python2.4/site-packages/django/core/template.py", line 107, in __init__
    self.nodelist = compile_string(template_string)

  File "/usr/lib/python2.4/site-packages/django/core/template.py", line 122, in compile_string
    return parser.parse()

  File "/usr/lib/python2.4/site-packages/django/core/template.py", line 220, in parse
    nodelist.append(registered_tags[command](self, token))

  File "/usr/lib/python2.4/site-packages/django/core/template_loader.py", line 115, in do_block
    nodelist = parser.parse(('endblock',))

  File "/usr/lib/python2.4/site-packages/django/core/template.py", line 222, in parse
    raise TemplateSyntaxError, "Invalid block tag: '%s'" % command

TemplateSyntaxError: Invalid block tag: 'admin_media_prefix'

Attachments (0)

Change History (7)

comment:1 Changed 9 years ago by jacob

  • Owner changed from adrian to jacob

comment:2 Changed 9 years ago by jacob

  • Status changed from new to assigned

comment:3 Changed 9 years ago by adrian

  • milestone set to Version 1.0

comment:4 Changed 9 years ago by jacob

  • Resolution set to worksforme
  • Status changed from assigned to closed

I can't reproduce this, but it sounds like you're missing a {% load adminmedia %} somewhere; have you updated your code lately?

comment:5 Changed 9 years ago by jacob

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Wait, I just got the error myself.

comment:6 Changed 9 years ago by jacob

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [390]) Fixed a subtle bug with the {% load %} tag: if a tag/filter was removed from template.registered_tags/filters, {% load %} would fail (since module-level code is only run on an initial import). {% load %} now reloads the module, which makes sure that the tag always works even when someone's been doing something screwy. This fixes #242 (and wouldn't had been found without it, so much thanks).

comment:7 Changed 7 years ago by anonymous

  • milestone Version 1.0 deleted

Milestone Version 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.