request.user.username (or probably better, use a
foreign key reference to User in the record you are
saving and say something like:
product.created_by = request.user
Only the id of the user record will be saved, but you
can access any user information anytime you look
at the record, e.g.;
p
Hi, this is the order of events I am trying to solve:
An user gets authenticated with the Admin of dJango
Enters an option to add new products to the database
It is needed to automatically save the user who added the product to
the database
That is why I was thinking it would be best to override t
2 matches
Mail list logo