Sunday, October 11, 2020

Re: dango admin save_model executing twice

Hi do you hire contract based python/django freelancer?
 We can help you in this and related tasks at fair prices. Reply or send email to divyesh@pythonmate.com
Best Regards, 
Divyesh Khamele,
Pythonmate

On Sun, 4 Oct 2020, 8:28 pm Navneet Pandey, <navneet.pandey@affle.com> wrote:
Hi,

I have a huge model on which i am performing some business logic in admin section.

the problem is when i save the data as per my business logic, in few cases my save_model method is executing twice, causing the success message to appear twice also. not able to understand why this is getting executed twice only in few cases.

here is a demonstration example: 

admin has editable field in list_editable, in which few are columns to select specific action 
whenever any action from action column is selected and saved the code runs twice however for the normal fields which are only text entry it is working fine.

can anyone help on this?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/32e475bd-249d-4b42-a8fd-05aac1987eaan%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAH9mneVGHBAQcuhskO-bWktWQgfx9e6Jki%3DvDCOpD3LM4Wkbgg%40mail.gmail.com.

No comments:

Post a Comment