1# start by installing django by typing the following command
2
3python -m pip install Django
4
5# you can check if it worked by typing
6
7python3 -m django --version # for mac
8
9python -m django --version # for windows
10
11# when that works you can start your project by
12
13django-admin startproject your_project_name
14
15# then you can start your first app by
16
17django-admin startapp your_app_name
18
19# before you can run it, you need to add the app to the project
20
21# go to the folder your_project_name and open settings.py and scroll down until you see this
22
23INSTALLED_APPS = [
24 'django.contrib.admin',
25 'django.contrib.auth',
26 'django.contrib.contenttypes',
27 'django.contrib.sessions',
28 'django.contrib.messages',
29 'django.contrib.staticfiles',
30]
31
32# then go to the folder your_app_name and open apps.py and copy the class name
33
34# when you did that, add the following line to installed apps
35
36'your_app_name.apps.the_class_name_you_just_copied'
37
38
39# happy coding!