Thanks Mike and Russell, this is very helpful for starters. Do you have some more verbose code examples I can use as crutches while I hobble along the path of understanding Django? Especially an expansion on something like "All the admin save handlers" would be much appreciated.
For me every change needs to be tracked, not just ones from the admin realm, and the audit trail entry is written by a trigger function which gets the current user name from a variable set for the postgres connection. My quest so far was to find the magical place where I have access to the request (for the username) and the db.connection (for setting the database variable), which – if I understand correctly – does not exist. So right now I was about writing my own middleware class with a process_view. Would that be the right place and how would I introduce the username into the data flow?
Sincerely,
Malte
-- For me every change needs to be tracked, not just ones from the admin realm, and the audit trail entry is written by a trigger function which gets the current user name from a variable set for the postgres connection. My quest so far was to find the magical place where I have access to the request (for the username) and the db.connection (for setting the database variable), which – if I understand correctly – does not exist. So right now I was about writing my own middleware class with a process_view. Would that be the right place and how would I introduce the username into the data flow?
Sincerely,
Malte
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8a7e4caf-1c19-4ec4-a015-08503ba42085%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment