In my application I want to intercept changes made through the admin
interface so I can make additional changes based on the changes made by
the user. In other words, if the request has a new value for attribute
'foo', I want to compute a new value for attribute 'bar' and add that to
the request.

Here is what I did:
- In urls.py, redirect the admin change url to my own view
- In my view, if the request is a POST and the field I am interested in
has changed, I
   - copy request.POST
   - update the copy with the additional changes I want
   - replace request.POST with the modified version
   - call the original admin view with the modified request

My questions:
- Is it OK to replace request.POST this way?
- Is there a better way to accomplish this?

BTW the reason I don't just save the new value is, I want the changed 
value to show up in the admin change log.

Thanks,
Kent


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to