In Django, where to define user

For a site where users host discussions communicate with each other like on X(twitter), using Django, where should i define a user; in the forms.py, models.py or views.py file. This site will work with users data eg. when grading users.

Use the built-in User model. If you need to customize it, do so in model.py: https://docs.djangoproject.com/en/6.0/topics/auth/customizing/#specifying-a-custom-user-model.

Вернуться на верх