Code

Opened 15 months ago

Closed 15 months ago

Last modified 15 months 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 :)

Attachments (0)

Change History (4)

comment:1 Changed 15 months 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 15 months 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 15 months 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 15 months 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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.