django-currentuser
django-currentuser copied to clipboard
Wondering why null=True?
For my purposes I'd rather have null=False and it errors out if the value is None. Wondering the thought process on enforcing null=True?
@ShmuelTreiger My assumption is that you can create objects without having a logged in user. For example, if you run python manage.py createsuperuser there is no logged in user, so the created_by field should be None. Another situation might be for an async task. In essence, the case where created_by=None would be where the system created the object.