0
0
Djangoframework~10 mins

Creating a Django project - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new Django project named 'myproject'.

Django
django-admin [1] myproject
Drag options to blanks, or click blank then click option'
Astartproject
Bcreateproject
Cnewproject
Dinitproject
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'createproject' instead of 'startproject'.
Trying to use 'newproject' or 'initproject' which are not valid Django commands.
2fill in blank
medium

Complete the command to run the Django development server inside the project directory.

Django
python manage.py [1]
Drag options to blanks, or click blank then click option'
Astartserver
Brunserver
Claunchserver
Dservestart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'startserver' which is not a Django command.
Trying 'launchserver' or 'servestart' which do not exist.
3fill in blank
hard

Fix the error in the command to create a Django app named 'blog'.

Django
python manage.py [1] blog
Drag options to blanks, or click blank then click option'
Astartapp
Bcreateapp
Cnewapp
Dinitapp
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'createapp' or 'newapp' which are not valid Django commands.
Trying 'initapp' which does not exist.
4fill in blank
hard

Fill both blanks to create a Django project named 'shop' and then navigate into its directory.

Django
django-admin [1] shop
cd [2]
Drag options to blanks, or click blank then click option'
Astartproject
Bstartapp
Cshop
Dmyshop
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'startapp' instead of 'startproject' for the first blank.
Changing directory to a wrong folder name.
5fill in blank
hard

Fill all three blanks to create a Django app named 'store', add it to INSTALLED_APPS, and run migrations.

Django
python manage.py [1] store

# In settings.py add 'store' to [2]

python manage.py [3]
Drag options to blanks, or click blank then click option'
Astartapp
BINSTALLED_APPS
Cmigrate
Drunserver
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to add the app to INSTALLED_APPS.
Running 'runserver' instead of 'migrate' after creating the app.