Tag: reference
-
Django Model-Owner
The option to make a model owned by a user is actually documented for the Django Admin app. However, for reference, here are the steps: First, the model you want to have an owner needs to reference “User” as a foreign key: (in models.py) class Website(models.Model): submitted_by = models.ForeignKey(User, on_delete=models.CASCADE) url = models.URLField() Provided you…