#12694: Adding an object-tool requires template code duplication -------------------------------------------+-------------------------------- Reporter: andybak | Owner: DrMeers Status: assigned | Milestone: 1.3 Component: django.contrib.admin | Version: SVN Resolution: | Keywords: admin, blocks, template, object-tools Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -------------------------------------------+-------------------------------- Changes (by DrMeers):
* owner: nobody => DrMeers * status: new => assigned * has_patch: 0 => 1 * version: 1.1 => SVN * milestone: => 1.3 Comment: This has frustrated me for years also. I've regularly used jQuery to insert list items within the object tools list to stay DRY... Very simple patch attached. I'd prefer to see this single inner-block rather than "pre-" and "post-" blocks because: * It is simpler * You can achieve the same by using `{% block object-tools-items %} BEFORE {{ block.super }} AFTER {% endblock %}` * `pre-object-tools` sounds like it comes ''before'' the `object- tools` block, despite being inside it... -- Ticket URL: <http://code.djangoproject.com/ticket/12694#comment:2> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.