Django admin - Insert into another table
I want to insert into another table when saving a record on Django admin panel. For example I have a model named device and I want to create a device and keep it in a table, but whenever I make a change to the device, I want to make a record history of the changes. Is it possible to do so? -- 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 http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Django admin - Insert into another table
Looks promising. Thanks 5 Mart 2013 Salı 15:25:13 UTC+2 tarihinde Shawn Milochik yazdı: > > Sure. Just use the post-save signal: > > https://docs.djangoproject.com/en/1.5/ref/signals/#post-save > -- 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 http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Debugging admin site
I'm using the admin site for editing a model. One of the fields in the model is readonly when editing. But when try to save the model while editing django gives the error "Please correct error below" and does not give a clue about where the error happens. I know the cause is the readonly field because when I disable the readonly option, I can save the model and because the error happens on the template level, the save function of the model does not get called. How can I debug 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.