I´m working on a simple CMS on Django, I have a model for the articles and use the User Model that django provides.
I have my model with an authors atribute of type User:
class Article(models.Model):
authors = models.ManyToManyField(User)
I added this model to admin panel and what I would like to accomplish is to automatically select the author based on the user that is logged in whenever someone adds a new Article.
Can anyone help me with this?
Thanks in advance.