-
If you do not have Anaconda run this:
pip install -r requirements.txt
-
If you do have Anaconda run this:
conda env create --file environment.yml --prune
-
If you do have a local MS-SQL instance running, you have two options:
- Create an empty database named
gamechanger
- Change the name in line 80 of
distika\distika\settings.py
to the name of the database you want to use
- Create an empty database named
-
if you want to use SQLite, remove lines 78-85 and replace with this data:
'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', }
-
Run a sanity check that Django is installed correctly
python manage.py runserver :4747
You shoud be able to navigate to see the Django welcome page
Django automatically updates pages and recompiles production code as you save files, but bad edits may cause a crash.
You can shut down the server by using Ctrl+C on Windows/Linux or Cmd+C on a Mac. -
OPTIONAL If you are changing to a new module name, make a new app and copy files ( and change dependencies)
python manage.py startapp <new_app_name>
-
Do a preflight check to debug model dependencies
python manage.py check
-
Build the initial bindings of Django only tables to database
python manage.py migrate
-
Build the Python driving the custome model objects for tables
python manage.py makemigrations gamechanger
-
OPTIONAL Check DDL for tables for the currrent version (0001 is current version number of schema)
python manage.py sqlmigrate gamechanger <ver_#> > <ver_#>
-
Connect to database via Django and create tables
python manage.py migrate
-
OPTIONAL Build admin login
Current configuration is :
- name: distika
- email address: distika@distika.com
- password: distika
python manage.py createsuperuser
You will receive prompts for:
- a superuser admin's name
- a superuser admin's email address
- a superuser admin's password
- ( you can choose "y" at the end to accept an insecure password for dev purposes)
-
If you stopped the Django server, restart the server
python manage.py runserver 4747