Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to create a superuser in Django.
Django
python manage.py [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'runserver' instead of 'createsuperuser'.
Typing 'migrate' which is for database setup.
✗ Incorrect
The command createsuperuser is used to create a superuser in Django.
2fill in blank
mediumComplete the prompt to enter the username when creating a superuser.
Django
Username (leave blank to use '[1]'):
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Typing 'root' which is a system user, not Django default.
Using 'superuser' as default username.
✗ Incorrect
The default suggested username is usually admin.
3fill in blank
hardFix the error in the command to create a superuser by completing the missing part.
Django
python manage.py [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the order of words.
Using incomplete or incorrect command names.
✗ Incorrect
The correct Django command is createsuperuser. Other options are invalid.
4fill in blank
hardFill both blanks to complete the command and option to create a superuser with email prompt.
Django
python manage.py [1] --[2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using --username instead of --email for email prompt.
Using wrong command names.
✗ Incorrect
The command is createsuperuser and the option --email prompts for email input.
5fill in blank
hardFill all three blanks to complete the dictionary comprehension that creates a superuser data dictionary.
Django
superuser_data = { [1]: [2] for [3] in ['username', 'email', 'password'] } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'value' which is undefined.
Using 'key.upper()' which changes the key names.
✗ Incorrect
This comprehension asks for input for each key and stores it in the dictionary.