theCurador / BSN-fantasy-league-

Basketball Fantasy League game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Distika - codename "GameChanger"

Setup Instructions

Configure Python environment

  1. If you do not have Anaconda run this:

    pip install -r requirements.txt

  2. If you do have Anaconda run this:

    conda env create --file environment.yml --prune

Configure SQL environment

  1. If you do have a local MS-SQL instance running, you have two options:

    1. Create an empty database named gamechanger
    2. Change the name in line 80 of distika\distika\settings.py to the name of the database you want to use
  2. 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', }

Setup Django Server

  1. Be sure you are in the distika directory

  2. 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.

  3. 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>

  4. Do a preflight check to debug model dependencies

    python manage.py check

  5. Build the initial bindings of Django only tables to database

    python manage.py migrate

  6. Build the Python driving the custome model objects for tables

    python manage.py makemigrations gamechanger

  7. OPTIONAL Check DDL for tables for the currrent version (0001 is current version number of schema)

    python manage.py sqlmigrate gamechanger <ver_#> > <ver_#>

  8. Connect to database via Django and create tables

    python manage.py migrate

  9. OPTIONAL Build admin login

    Current configuration is :

    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)
  10. If you stopped the Django server, restart the server

    python manage.py runserver 4747

About

Basketball Fantasy League game

License:MIT License


Languages

Language:HTML 32.0%Language:JavaScript 26.4%Language:PHP 18.8%Language:Java 6.8%Language:CSS 5.2%Language:Less 4.6%Language:CoffeeScript 2.5%Language:Blade 1.8%Language:Python 0.9%Language:ActionScript 0.5%Language:Stylus 0.2%Language:Hack 0.2%Language:Shell 0.1%Language:Batchfile 0.0%