Re: Tracking changes of a model
First, I thought that I don't need all the functionality provided by similar applications but after I spend some hours trying to do it myself not being very successfull, I tried this app and after five minutes all was up and running :) Thanks, Martin On Sat, 30 Oct 2010 15:03:48 +0200, Daniel Rosemanwrote: On Oct 30, 11:15 am, Martin Tiršel wrote: Sounds like django-reversion would fit the bill: http://github.com/etianen/django-reversion -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Tracking changes of a model
Check out http://bitbucket.org/mhall119/django-audit/wiki/Home -- MichaelOn Sat, 2010-10-30 at 12:15 +0200, Martin Tiršel wrote: > Hello, > > I am using Django admin to create/update some records. Now, I need to > track changes. After somebody updates a record, I need to see what was > changed and then create a text log like: > > changed `name`: oldvalue -> newvalue, > changed `email`: o...@mail.xy -> n...@mail.xy > > Where is the right place, where I have access to unchanged model values > and validated values from the submit form? The place before the model is > updated by form values? Another approach would be to save all values into > a dictionary after the model is loaded from database and in save() method > compare old and new values, but I don't know how how to call a code after > load. > > Thanks, > Martin > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Tracking changes of a model
On Oct 30, 11:15 am, Martin Tiršelwrote: > Hello, > > I am using Django admin to create/update some records. Now, I need to > track changes. After somebody updates a record, I need to see what was > changed and then create a text log like: > > changed `name`: oldvalue -> newvalue, > changed `email`: o...@mail.xy -> n...@mail.xy > > Where is the right place, where I have access to unchanged model values > and validated values from the submit form? The place before the model is > updated by form values? Another approach would be to save all values into > a dictionary after the model is loaded from database and in save() method > compare old and new values, but I don't know how how to call a code after > load. > > Thanks, > Martin Sounds like django-reversion would fit the bill: http://github.com/etianen/django-reversion -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Tracking changes of a model
Hi Martin, i think this should give you the basic idea: http://stackoverflow.com/questions/1365963/diff-django-model-objects-with-manytomany-fields Greetings, Andreas On 30 Okt., 12:15, Martin Tiršelwrote: > Hello, > > I am using Django admin to create/update some records. Now, I need to > track changes. After somebody updates a record, I need to see what was > changed and then create a text log like: > > changed `name`: oldvalue -> newvalue, > changed `email`: o...@mail.xy -> n...@mail.xy > > Where is the right place, where I have access to unchanged model values > and validated values from the submit form? The place before the model is > updated by form values? Another approach would be to save all values into > a dictionary after the model is loaded from database and in save() method > compare old and new values, but I don't know how how to call a code after > load. > > Thanks, > Martin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Tracking changes of a model
Hello, I am using Django admin to create/update some records. Now, I need to track changes. After somebody updates a record, I need to see what was changed and then create a text log like: changed `name`: oldvalue -> newvalue, changed `email`: o...@mail.xy -> n...@mail.xy Where is the right place, where I have access to unchanged model values and validated values from the submit form? The place before the model is updated by form values? Another approach would be to save all values into a dictionary after the model is loaded from database and in save() method compare old and new values, but I don't know how how to call a code after load. Thanks, Martin -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.