Re: Error while customizing admin/change_form.html
You're getting a recursion error because you're trying to extend admin/
change_form.html with itself. In other words your copy of admin/
change_form.html in the directory location you have is the default
admin/change_form.html template now...
You can either:
1. Copy the entire admin/change_form.html template into your file
(You'll then be replacing the default template with whatever you cook
up), or
2. Override the change_form.html on a per app, or model, basis as per
the admin documentation here: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates
Hope that helps :-)
On Jun 15, 3:37 am, Owais Lone <loneow...@gmail.com> wrote:
> Hey everyone..
>
> I was trying to customize django's admin interface but a problem has
> occurred.
>
> here is my code in change_form.html
>
> {% extends "admin/change_form.html" %}
>
> {% block form_top %}
> <p>Insert meaningful help message here...</p>
> {% endblock %}
>
> and here is the error
>
> TemplateSyntaxError at /admin/blog/entry/add/
>
> Caught RuntimeError while rendering: maximum recursion depth exceeded
> while calling a Python object
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/admin/blog/entry/add/
> Django Version: 1.2.1
> Exception Type: TemplateSyntaxError
> Exception Value:
>
> Caught RuntimeError while rendering: maximum recursion depth exceeded
> while calling a Python object
>
> Exception Location: /usr/local/lib/python2.6/dist-packages/django/
> utils/text.py in unescape_string_literal, line 273
> Python Executable: /usr/bin/python
> Python Version: 2.6.5
>
> Template error
>
> In template /home/owais/Projects/curry/curry/static/templates/admin/
> change_form.html, error at line 1
> Caught RuntimeError while rendering: maximum recursion depth exceeded
> 1 {% extends "admin/change_form.html" %}
> 2
> 3 {% block form_top %}
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home