Skip to content

2. Create Django Project

Katie House edited this page Sep 14, 2020 · 1 revision

A Django Project is a collection of settings for an instance of Django, including database configuration, Django-specific options and application-specific settings. These configurations will be in the /mysite directory. You can change mysite to any project name you'd like. Tip: avoid using project names like test and Django - it might mess things up.

django-admin startproject mysite . 

This creates the following files:

├── manage.py           # How you run Django code
└── mysite
    ├── __init__.py     # Tells Python this is a Python code folder
    ├── asgi.py         # Provides hooks for web servers when Django app is deployed
    ├── settings.py     # Configures the Django project
    ├── urls.py         # Routes web requests based on the URL
    └── wsgi.py         # Provides hooks for web servers when Django app is deployed

🚫 you will rarely edit these files: manage.py ,mysite/__init__.py, mysite/asgi.py, mysite/wsgi.py ✅ you will edit these files: mysite/settings.py, mysite/urls.py

Clone this wiki locally