On Tue, Jan 16, 2018 at 6:15 PM, Matemática A3K <matematica....@gmail.com>
wrote:

> According to https://code.djangoproject.com/ticket/15910:
> "When adding a form to an inline formset in the admin interface it has a
> nice "Remove" link added automatically. These links are however missing
> from empty rows that have been created as a result from the "extra" option.
> They are also removed when the form is saved and validation of the form as
> a whole fails"
>
> Could be that something is invalid and you are not rendering errors in the
> template?
>
This is unlikely, you are not overriding the admin's template, right?



>
> On Sat, Jan 13, 2018 at 11:12 AM, FernandoJMM <ferna...@lagunadeduero.com>
> wrote:
>
>> Good Morning,
>>
>> I'm customizing the ModelAdmin class inlines attribute. The code is this.
>>
>> class NaveInline(admin.TabularInline):
>>     model = Nave
>>     fields = ['codigoNave', 'nave', 'tipoPuesta']
>>     ordering = ['codigoNave']
>>     extra = 1
>>
>>
>> class GranjaAdmin(admin.ModelAdmin):
>>     fieldsets = [
>>         (None, {'fields': [('codigoGranja', 'granja'), ('empresa',
>> 'tipoGranja'), ('regimen')]}),
>>         ('Datos adicionales', {'fields': [('direccion', 'localidad',
>> 'codigoPostal',
>>         'provincia', 'region', 'pais', 'telefonoPrincipal',
>> 'telefonoMovil',
>>         'fax', 'email', 'ceence','cea', 'maquina',
>> 'clasificacionZootecnica',
>>         'formaDeCria', 'notas')], 'classes': ['collapse']}),
>>     ]
>>
>>     inlines = [NaveInline]
>>
>>
>>
>> . . . . . .
>>
>>
>>
>> Everything works perfectly, I can add granjas / naves, edit granjas /
>> naves, and clear granjas. . but I can not do it is to delete naves that in
>> this case are the lines (inlines).
>>
>> I do not get any errors, I can see the line selection check but the line
>> deletion button DOES NOT APPEAR.
>>
>> Thanks for your help,
>> Fernando
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/c21e2ff0-a1d0-4f83-b6c9-bc91a8d1e7e2%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/c21e2ff0-a1d0-4f83-b6c9-bc91a8d1e7e2%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BFDnhKpHvZ7S1be6AaY0D-NaGnB4%2BjcqO8aVKb7aS_oS2GSww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to