A Complete Beginner's guide to django Part 1 Flashcards
Django is a … written in Python
Web framework
A Web framework is …
a software that supports the development of dynamic Web sites, applications, and services.
It provides a set of tools and functionalities that solves many common problems associated with Web development, such as security features, database access, sessions, template processing, URL routing, internationalization, localization, and much more.
Using a Web framework, such as Django, enables us to develop …
secure and reliable Web applications very quickly in a standardized way, without having to reinvent the wheel.
The development of Django is supported by the …
Django Software Foundation.
Among the biggest Web sites using Django we have: are …
Instagram, Mozilla, National Geographic.
The basic setup for django development consists of installing …
Python, Virtualenv, and Django.
What is the name of the virtual environment we use with django?
Virtualenv
What command do you use to create the virtual environment?
Inside the your project folder (higher level folder):
virtualenv venv.
How do you activate the virtual environment Virtualenv?
Inside the your project folder (higher level folder):
venv\Scripts\activate
How do you deactivate the virtual environment Virtualenv?
venv\Scripts\deactivate.bat
What comman do you use to generate a new django project?
Inside the your project folder (higher level folder):
django-admin startproject projectName
How does the folder structure of a django project look?
project/
is the higher level folder and it contains the djengo project folder (project/) and the virtual environment folder (venv/)
project/project/
is the django project folder and it conains all the apps including the main app (porject/) and the manage.py file
project/project/project
is the folder that contains the django settings and stuff. It contains __init__.py, settings.py, urls.py and wsgi.py
manage.py:
inside django project folder.
a shortcut to use the django-admin command-line utility. It’s used to run management commands related to our project. We will use it to run the development server, run tests, create migrations and much more.
__init__.py:
inside apps and the project folder.
this empty file tells Python that this folder is a Python package.
settings.py:
inside the project folder:
this file contains all the project’s configuration. We will refer to this file all the time!