Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#19628 closed Uncategorized (fixed)

Add to the documentation note about AUTH_USER_MODEL

Reported by: dpravdin Owned by: nobody
Component: Documentation Version: 1.5-beta-1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

It's problem, that if I write the User model striсtly for documentation, I will get a validation error:

auth.user: Model has been swapped out for 'myapp.MyUser' which has not been installed or is abstract.

It's not enough just to set

AUTH_USER_MODEL = 'myapp.MyUser'

Beside that it's necessary add the 'myapp' in INSTALLED_APPS, but it's not specified in the documentation.

Sorry, if it's specified but I didn't find it :)

Change History (4)

comment:1 Changed 2 years ago by jordanmessina

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

One might argue that calling it a 'Django app' implies it's in the INSTALLED_APPS setting. However, I added a small note to the docs and created a pull request:
https://github.com/django/django/pull/658

comment:2 Changed 2 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 0375244eaeae1e2c09cc58c4c62e8f9e951217d0:

Fixed #19628 - Noted that app for custom user model must be in INSTALLED_APPS

Thanks dpravdin and Jordan Messina.

comment:3 Changed 2 years ago by Tim Graham <timograham@…>

In f6257a147df0be2f21c390ad10f6cd724b99cd93:

[1.5.x] Fixed #19628 - Noted that app for custom user model must be in INSTALLED_APPS

Thanks dpravdin and Jordan Messina.

Backport of 0375244eae from master

comment:4 Changed 2 years ago by Tim Graham <timograham@…>

In f6257a147df0be2f21c390ad10f6cd724b99cd93:

[1.5.x] Fixed #19628 - Noted that app for custom user model must be in INSTALLED_APPS

Thanks dpravdin and Jordan Messina.

Backport of 0375244eae from master

Note: See TracTickets for help on using tickets.
Back to Top