How to override the ModelAdmin "change" form ?

2019-02-28 Thread karim . atiki
Hi, I'm currently struggling with a custom ModelAdmin. Considering the following model: # Bloc fonctionnel class Assembly(Item): product = models.ForeignKey(to='ProductFamily', on_delete=models.CASCADE , null=True, verbose_name=_('Famille Produit')) functions = models.ManyToManyField(F

Re: How to override the ModelAdmin "change" form ?

2019-02-28 Thread Nelson Varela
You maybe want a model admin view where you can send the user to and collect the data you want to comare and show warnings -- 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

Re: How to override the ModelAdmin "change" form ?

2019-02-28 Thread Mike Dewhirst
On 28/02/2019 9:46 pm, karim.at...@gmail.com wrote: Hi, I'm currently struggling with a custom ModelAdmin. Karim I haven't tried to fully understand your use case. However, this is what I think your

Re: How to override the ModelAdmin "change" form ?

2019-03-01 Thread karim . atiki
Hi Mike, Thanks a lot for your feedback. Your situation is quiet different from mine, BUT the way you override change_view and the related template will certainly help me to achieve what I need. ...and getting rid of dirty and unnecessary ajax calls. I keep you posted. Thx. Karim Le vendredi

Re: How to override the ModelAdmin "change" form ?

2019-03-01 Thread karim . atiki
Hi Mike, I tried what you wrote by overriding the *self.change_form_template* but the form does not appear. Would you please provide me the content of your model admin *billing_payment_view ?* Thanks. Karim Le vendredi 1 mars 2019 00:06:40 UTC+1, Mike Dewhirst a écrit : > > On 28/02/2019 9:

Re: How to override the ModelAdmin "change" form ?

2019-03-01 Thread Mike Dewhirst
On 2/03/2019 2:08 am, karim.at...@gmail.com wrote: Hi Mike, I tried what you wrote by overriding the *self.change_form_template* but the form does not appear. Would you please provide me the content of your model admin *billing_payment_view ?* Sure. I recently asked for assistance here and p