Adrian Holovaty wrote:

I don't see a need to add this functionality for use beyond the scope
of the admin site.

Well... I can recall more than one request in django-users :-). And this feature is pretty commonplace...

The auto_now options aren't coupled to a request,
so they're a special case. Coupling a request's user object to
manipulators is something we shouldn't do.

In fact I was thinking in the lines of decoupling authenticated user from a request too :-). It can be in request.user too but this functionality could work like this:

- auth app using event system hooks to the save event for models
- auth middleware populates request.user and also keeps the user for itself in some warm private place - on model's save it looks in its Meta for fields that should be populated and does it

Thus all the functionality is kept in one app. I didn't look into anything concerning event system but from reading this list I got an impression that it suits naturally for this kind of things.

Reply via email to