Django Level One Flashcards
What 2 major problems can we solve with Django?
- Map a requested URL from a user, to the code written to handle it.
- Create a requested HTML page dynamically using templates that transfer back-end information to the front end.
Why use a venv?
It’s like creating a unique workspace where all things added to it are used for the project, and nothing outside of it is.
Cmd for creating a venv? what if you want to specify a certain version of python?
conda create –name nameOfEnv django
conda create –name nameOfEnv python=3.5
What command returns a list of all the envs installed on your computer?
conda in –envs
Commands to activate and deactivate a venv?
conda activate nameOfEnv
conda deactivate nameOfEnv
command for installing django into a venv?
conda install django
For the command line statements that start with conda, what would they start with if i was not using the conda distribution of python?
pip
What is the command line statement for starting a new django project?
django-admin startproject name_of_project
Command for running the server.
python manage.py runserver
What are migrations?
an automized process of updating database structures, usually done after making changes to an applications models.py file.
Define a Django Project in your own words?
The apps and configurations that make up a purposeful functioning website.
What is a django application in your own words?
A part of your django project with a specific functionality, ex: workout maker app, workout viewer app, etc..
Command for creating a new app:
python manage.py startapp name_of_app
After creating an App using the command, what must the app be added to?
The installed apps list in settings.py
Each view for the application is represented by …
its own function within the views.py file that takes in request as an argument.