0
0
Djangoframework~5 mins

Creating a Django project - Quick Revision & Summary

Choose your learning style9 modes available
Recall & Review
beginner
What command do you use to create a new Django project?
You use django-admin startproject projectname to create a new Django project folder with the basic setup.
Click to reveal answer
beginner
What files are created automatically when you start a new Django project?
Django creates manage.py and a project folder containing __init__.py, settings.py, urls.py, and asgi.py and wsgi.py.
Click to reveal answer
beginner
What is the purpose of the manage.py file in a Django project?
manage.py is a command-line utility that helps you interact with your Django project, like running the server or making migrations.
Click to reveal answer
beginner
How do you start the development server after creating a Django project?
Navigate to your project folder and run python manage.py runserver. This starts a local web server you can visit in your browser.
Click to reveal answer
beginner
Why is it important to create a virtual environment before starting a Django project?
A virtual environment keeps your project’s Python packages separate from others, avoiding conflicts and making your setup clean.
Click to reveal answer
Which command creates a new Django project named 'myproject'?
Apython django-admin createproject myproject
Bpython manage.py startproject myproject
Cdjango startproject myproject
Ddjango-admin startproject myproject
What file do you use to run the Django development server?
Asettings.py
Bwsgi.py
Cmanage.py
Durls.py
Which of these files is NOT created automatically when starting a Django project?
Amodels.py
Bsettings.py
C__init__.py
Durls.py
Why should you use a virtual environment for Django projects?
ATo speed up the server
BTo separate project dependencies
CTo make the project public
DTo avoid writing code
After creating a Django project, what is the next step to see it in a browser?
ARun <code>python manage.py runserver</code>
BEdit <code>settings.py</code>
CCreate a virtual environment
DInstall Django again
Describe the steps to create and start a new Django project from scratch.
Think about setting up the environment, creating the project, and running the server.
You got /5 concepts.
    Explain the role of the manage.py file in a Django project.
    Consider what you do with manage.py commands.
    You got /4 concepts.