diff options
Diffstat (limited to 'docs/topics/auth')
| -rw-r--r-- | docs/topics/auth/customizing.txt | 5 | ||||
| -rw-r--r-- | docs/topics/auth/default.txt | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index 8dd938e59a..d12fa6a212 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -971,9 +971,10 @@ authentication app:: Creates and saves a superuser with the given email, date of birth and password. """ - user = self.create_user(email, + user = self.create_user( + email, password=password, - date_of_birth=date_of_birth + date_of_birth=date_of_birth, ) user.is_admin = True user.save(using=self._db) diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index 7e6794a97b..12a5602b5a 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -249,9 +249,11 @@ in ``myapp``:: from django.contrib.contenttypes.models import ContentType content_type = ContentType.objects.get_for_model(BlogPost) - permission = Permission.objects.create(codename='can_publish', - name='Can Publish Posts', - content_type=content_type) + permission = Permission.objects.create( + codename='can_publish', + name='Can Publish Posts', + content_type=content_type, + ) The permission can then be assigned to a :class:`~django.contrib.auth.models.User` via its ``user_permissions`` |
