Django - powerful framework, writed in Python for building web-based applications. Django use model-view-control (MVC) software designing pattern. With Django you can develop applications from simple sites to complex high-loaded systems. The most important idea of Django - don’t repeat yourself (DRY) philosophy. Django have a lot of out-of-box classes and functions for building beautiful applications.
This tutorial help you for start working with Django framework: create virtual environment, start new project, run migrations, create superuser and run built-in webserver.
Create virtual environment (VENV). Virtual environment needs for keeping separated dependencied of each project, installed with Python Package Index (PIP). This command creates env named virtual environment (works in Linux and Windows systems):
python -m venv env
source env/bin/activate
.\env\Scripts\activate.bat
pip install django
django-admin startproject yourprojectnameYou must see yourprojectname directory, which contain manage.py script and yourprojectname subdirectory. Inside the nested yourprojectname you should see __init__.py, asgi.py, settings.py, urls.py, wsgi.py files.
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
Open in browser http://127.0.0.1:8000/ url and see Django's welcome page:
Open Admin panel by http://127.0.0.1:8000/admin/ url and auth with early created credentials. Admin panel: