Skip to content

Commit 2c80dff

Browse files
Update superuser.md
1 parent b62bb1c commit 2c80dff

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

superuser.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,27 @@ Password (again):
5454
Bypass password validation and create user anyway? [y/N]: y
5555
Superuser created successfully.
5656
```
57+
```python
58+
python manage.py shell
5759

60+
```
5861

62+
```python
63+
from django.contrib.auth.models import User
64+
user = User.objects.create_superuser(username='Gurupatil',
65+
email='gurupatil327@gmai.com',
66+
password='ur')
67+
```
68+
```python
69+
user.is_staff
70+
False
71+
user.is_active
72+
True
73+
user.is_superuser
74+
False
5975

6076

61-
62-
63-
64-
65-
77+
```
6678

6779

6880
### makemigrations:

0 commit comments

Comments
 (0)