What is Django?
Django is a high-level Python web framework that encourages clean development and fast, with pragmatic design.
Django was designed to guide developers take projects from intellection to completion as quickly as possible.
Django takes security seriously and helps developers avoid many common security mistakes.
Some of the busiest sites on the web ascendancy Django’s ability to quickly.
Before You Start make sure you have python installed on your computer.
You must have Python installed on your system if you don't have check out link to python.org
Step 1: Installation
pip install django
So step 1, will install django on your system
Step 2: To start a project use this command
django-admin startproject mysitethen
cdto wherever the project folder is in and run this command to create a app
python manage.py startapp sitesto create a app
Project Folder Structure:
mysite/ manage.py mysite/ __init__.py settings.py urls.py asgi.py wsgi.py
App Forlder Structure:
sites/ __init__.py admin.py apps.py migrations/ __init__.py models.py tests.py views.py
for you to make changes in your app folder and for it to work you will have to register your app inside your settings.py like this below
Line 34 in your settings.py file
# Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'your_app_name_here', # your app(s) goes inside this list ]