I have a database of articles with a
submitter = models.ForeignKey(User, editable=False)
Where User is imported as follows:
from django.contrib.auth.models import User.
I would like to auto insert the current active user to the submitter field when a particular user submits the article.
Anyone have any suggestions?
Just in case anyone is looking for an answer, here is the solution i’ve found here:
http://demongin.org/blog/806/
To summarize:
He had an Essay table as follows:
where multiuser can create essays, so he created a admin.ModelAdmin class as follows: