forked from mdn/content
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change UserModel to User for the model (follow same convention as res…
…t of tutorial)
- Loading branch information
1 parent
4c18bda
commit 85bfc7f
Showing
2 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,10 +86,10 @@ Our superuser is already authenticated and has all permissions, so we'll need to | |
> ```python | ||
> # Get current user model from settings | ||
> from django.contrib.auth import get_user_model | ||
> UserModel = get_user_model() | ||
> User = get_user_model() | ||
> | ||
> # Create user from model and save to the database | ||
> user = UserModel.objects.create_user('myusername', '[email protected]', 'mypassword') | ||
> user = User.objects.create_user('myusername', '[email protected]', 'mypassword') | ||
> | ||
> # Update fields and then save again | ||
> user.first_name = 'Tyrone' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters