I want to allow one user to own(create) multiple things. I’ve tried this in settings.py:
slug = models.SlugField (unique = False)
user = models.OneToOneField(User, blank=True, null=True)
but that broke the app.
Should I remove OneToOneField?
First, I think you mean models.py, not settings?
Second, is the change you made changing SlugField to False? You do want your objects to have unique slugs, so that should be True.
I recommend reading up on modelFields, check out the Django documentation, particularly on ForeignKeys: https://docs.djangoproject.com/en/2.0/ref/models/fields/#foreignkey, which should allow for multiple things with one user.
Yes models.py, sorry.
Will try that.
It worked! Thanks for the solution.
Replaced OneToOneField by ForeignKey .