-
Notifications
You must be signed in to change notification settings - Fork 17
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
- Install Django
- Create Django Project
- Run your project for the first time
- Create a Django App
- Add app to INSTALLED_APPS
- Add the landing page to the app
- Make the landing page fancy with Bootstrap
- Create a machine learning model with the Iris dataset
- Create Django form to take in user input and send back model prediction
- Update model prediction with text and an image
- Define the SQLite Database Schema
- Use admin mode to see edit database
- Save Prediction data to SQLite database