Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

newforms-admin: Switched edit inline rendering to just use an include…

… instead of a special template tag.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4ccc5ff3e19ce6bb7e1f1cc278a44bc8daee9d85 1 parent d9fb3fe
@jkocherhans jkocherhans authored
View
4 django/contrib/admin/templates/admin/change_form.html
@@ -62,8 +62,8 @@
{% block after_field_sets %}{% endblock %}
-{% for bound_inline in bound_inlines %}
- {% render_inline bound_inline %}
+{% for inline_admin_formset in inline_admin_formsets %}
+ {% include inline_admin_formset.opts.template %}
{% endfor %}
{% block after_related_objects %}{% endblock %}
View
17 django/contrib/admin/templatetags/admin_modify.py
@@ -105,20 +105,3 @@ def field_widget(parser, token):
raise template.TemplateSyntaxError, "%s takes 1 argument" % bits[0]
return FieldWidgetNode(bits[1])
field_widget = register.tag(field_widget)
-
-class InlineNode(template.Node):
- def __init__(self, inline_var):
- self.inline_var = inline_var
-
- def render(self, context):
- inline = context[self.inline_var]
- t = loader.get_template(inline.template)
- output = t.render(context)
- return output
-
-def render_inline(parser, token):
- bits = token.contents.split()
- if len(bits) != 2:
- raise template.TemplateSyntaxError, "%s takes 1 argument" % bits[0]
- return InlineNode(bits[1])
-render_inline = register.tag(render_inline)
Please sign in to comment.
Something went wrong with that request. Please try again.