Changes between Version 1 and Version 3 of Ticket #29431


Ignore:
Timestamp:
05/26/2018 07:52:37 AM (7 months ago)
Author:
Daniel Rios
Comment:

Hi danilovmy,

I'm having trouble reproducing the feature you mention. Could you provide the whole line from django/contrib/admin/templates/admin/edit_inline/stacked.html on which the tag should appear, with the new property?

Second, is this different from turning off the add permission? This method on the Inline removes the blank fields, but also removes the ability to add a blank form with the Add another Item bar below the forms. See: https://docs.djangoproject.com/en/2.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.has_add_permission

def has_add_permission(self, request):
    return False

Please feel free to re-open the ticket with more info.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29431

    • Property Owner changed from nobody to Daniel Rios
    • Property Status changed from new to assigned
  • Ticket #29431 – Description

    v1 v3  
    88
    99
    10 
     10`django/contrib/admin/templates/admin/edit_inline/stacked.html` after `{% for inline_admin_form in inline_admin_formset %}`
    1111{{{
    12 stacked.html after {% for inline_admin_form in inline_admin_formset %} :
    13 {% if opts.can_add_empty or not forloop.last %} - this helped don't call a formset.empty_form, if i dont need it.
     12{% if opts.can_add_empty or not forloop.last %}
    1413}}}
     14this helped don't call a formset.empty_form, if i dont need it.
    1515
    1616but it is better check it already in: InlineAdminFormSet.__iter__(self), last iteration.
Back to Top