- Start server:
python manage.py runserver
- Login admin page: http://127.0.0.1:8000/admin
- Check the main page: http://127.0.0.1:8000/home
To update the model (table in database):
- Go to models.py of the app (this example is
home
) and create new class or update class fields
- Update to database
- Run this command
python manage.py startapp {{app_name}}
- Go to settings.py and add name of app config to INSTALLED_APPS
Example new app is demo:
demo.apps.DemoConfig
(or go to apps.py to check the name)
- Update to database
python manage.py makemigrations
python manage.py migrate