Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

698
Visualizações
ManagementForm data is missing or has been tampered with. Missing fields: servicesprice_set-TOTAL_FORMS

When i am changing and saving from Inclusive To Exclusive Django admin give me following error:

(Hidden field TOTAL_FORMS) This field is required.
(Hidden field INITIAL_FORMS) This field is required.

ManagementForm data is missing or has been tampered with. Missing fields: servicesprice_set-TOTAL_FORMS, 
    servicesprice_set-INITIAL_FORMS. You may need to file a bug report if the issue persists.

enter image description here

This is happening after i override inline field. What does this mean?

@admin.register(Services)
class ServicesAdmin(ImportExportModelAdmin, EmptyFieldListFilter):
    ...
    inlines = [
        SubServiceInline,
        ServicePriceInline
    ]

    ExclusiveInlines = [
        ExclusiveServicePriceInline
    ]
    InclusiveInlines = []

    ...
    def get_inlines(self, request, obj):
        if not obj.parent_id:
            return self.inlines
        elif obj.type == 1:
            return self.InclusiveInlines
        else:
            return self.ExclusiveInlines
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I'm rather new here myself, but I've been struggling with the same issue today.

It turns out that MyModelAdmin.get_inline() is called before the MyModel.save() when you're saving via the admin panel like that.

This creates a conflict when you're adding an InlineAdmin for a related model that, in my case, wasn't created until the MyModel.save() function was called.

I hope that helps, and I wish I could explain it better. Just learning all of this, myself. :)

Good luck to you!

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda