#33684: Create a default 'users' app when using startproject
-------------------------------------+-------------------------------------
Reporter: Vlad C | Owner: nobody
Type: New | Status: new
feature |
Component: | Version: 4.0
contrib.auth | Keywords: custom user
Severity: Normal | AUTH_USER_MODEL startproject
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
**Feature request to tackle this issue:**
https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-
AUTH_USER_MODEL
{{{
Warning
You cannot change the AUTH_USER_MODEL setting during the lifetime of a
project (i.e. once you have made and migrated models that depend on it)
without serious effort. It is intended to be set at the project start, and
the model it refers to must be available in the first migration of the app
that it lives in. See Substituting a custom User model for more details.
}}}
This is a big issue for developers that don't realize you must create a
custom user before the first migration.
**Solution:**
When first starting a project using
{{{
$ django-admin startproject mysite
}}}
Django should also by default create an app named 'users' that contains a
ready-made User model in **project_folder -> users -> models.py** which
could then be customized there if needed.
And obviously add these default settings to Django **AUTH_USER_MODEL =
'users.User'** and **INSTALLED_APPS = [ 'users' ... ]**
--
Ticket URL: <https://code.djangoproject.com/ticket/33684>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701809ebc7fc5-5e5003b3-2591-45cc-992d-b56ce665418a-000000%40eu-central-1.amazonses.com.