From project root folder, do the following setup commands.
On initial setup, first install the project package dependencies with the following commands. Then run the automagic and data migration commands in the following steps.
-
Install project Python package dependencies to virtual environment:
> cd backendInstall the Pipenv library, which is a dependency manager for Python projects:
> pip install pipenvStart a new virtual environment shell to ensure all commands have access to the installed project package dependencies.
> pipenv shellInstall project Python dependencies to the virtual environment.
> pipenv install git+https://github.com/Innovate-Inc/django-agol-oauth2.git@master#egg=django-agol-oauth2 > pipenv install -r requirements.txtIMPORTANT NOTE: You may need to rollback versions of the installed Python package dependencies which have breakings bugs in their most recent releases.
- Presently, the only Python library dependency which latest release has a breaking bug is the pyodbc dependency (version 4.0.28).
- To fix this, rollback the pyodbc dependency back to version
4.0.27.
-
Install project JavaScript package dependencies:
> cd frontend
> npm install
> python manage.py build_data_models --database=scribe_db --owner=sa --path=scribe_models
-
Apply new app registry data model migrations built by the above automagic build_data_models management command
> python manage.py makemigrations > python manage.py makemigrations scribe_models -
Synchronize migrations to the project's default database with Django's default models/migrations. Run manage.py to set the project settings, and have the project’s setting files point to the project's environment (.env) variables:
> python manage.py migrate --database default
These commands start/run the project's local development web servers. From two separate command-line prompts, run these two commands (one to invoke the JS dependencies, and the other to run the local web server).
> cd frontend
> npm run start
> cd backend
> python manage.py runserver