#8903: admin.TabularInline creates duplicate pk input boxes
-------------------------------------------+--------------------------------
          Reporter:  Spads                 |         Owner:  Spads              
            Status:  assigned              |     Milestone:                     
         Component:  django.contrib.admin  |       Version:  1.0                
        Resolution:                        |      Keywords:  admin TabularInline
             Stage:  Unreviewed            |     Has_patch:  0                  
        Needs_docs:  0                     |   Needs_tests:  0                  
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Comment (by Spads):

 As a workaround, I have been copying the
 /var/lib/python-
 support/python2.5/django/contrib/admin/templates/admin/edit_inline/tabular.html
 into my templates dir and applying the following ham-fisted patch.  I then
 set
 it as the template for tabular inlines in my admin where the pk is custom,
 but
 leave the others alone.

 {{{
 --- /var/lib/python-
 support/python2.5/django/contrib/admin/templates/admin/edit_inline/tabular.html
 2008-11-19 05:44:27.000000000 +0000
 +++ custompktabular.html        2008-11-26 11:02:25.000000000 +0000
 @@ -26,7 +26,6 @@
            {% if inline_admin_form.original %} {{
 inline_admin_form.original }}{% endif %}
            {% if inline_admin_form.show_url %}<a href="../../../r/{{
 inline_admin_form.original.content_type_id }}/{{
 inline_admin_form.original.id }}/">{% trans "View on site" %}</a>{% endif
 %}
              </p>{% endif %}
 -          {{ inline_admin_form.pk_field.field }} {{
 inline_admin_form.fk_field.field }}
            {% spaceless %}
            {% for fieldset in inline_admin_form %}
              {% for line in fieldset %}
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8903#comment:9>
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to