Django is a high-level Python web development framework. To put it simply, it eliminates the complexity of building a Python enable website.
Create a directory for the Django project:
Caution: Don’t use
django as the directory name.
mkdir dproject cd dproject
Setup a Python virtual environment:
python -m venv .venv
Activate virtual env:
pip install django
Create a new Django project:
django-admin startproject mysite
Start development server:
cd mysite python manage.py runserver
Test the development server is operating properly:
[email protected]:~ $ elinks -dump http://localhost:8000 django View release notes for Django 3.1 The install worked successfully! Congratulations! You are seeing this page because DEBUG=True is in your settings file and you have not configured any URLs.
Create the first app within the project:
cd myapp ./manage.py startapp myapp
Start writing code…