Thursday, September 27, 2012

last changed by User

Hola,

I wanted to display the user that last changed a model instance.

It's hard to search for because the username/email-as-login makes up the majority of the search results.

Despite this, I've found a couple of pages, with this being the most like what I want:


I like this solution - simple and clean, easy to implement.

My only reservation is that I was under the impression that this information was already being kept and that putting a 

user = ForeignKey("User")

in each model that I want to track is doubling up on the data I'm keeping?

Cheers
L.


--
...we look at the present day through a rear-view mirror. This is something Marshall McLuhan said back in the Sixties, when the world was in the grip of authentic-seeming future narratives. He said, "We look at the present through a rear-view mirror. We march backwards into the future."

http://www.warrenellis.com/?p=14314

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment