Requirements:
- Python 3.6+
- Python Virtualenv.
- PostgresSQL running
- NodeJS installed
Django version: 3.0
Create a Postgres database.
Create a .env project in the root of the project.
Add database information in .env file with information like this:
DATABASE_URL=postgres://example_user:password@localhost:5432/db_name
Where:
User: example_user Password: password Database Name: db_name
# Install JS requirements
yarn
# Run watcher for assets compilation
yarn run watch
pip install -r requirements/local.txt
python manage.py migrate
python manage.py runserver
Requirements:
Clone the repository and run inside the cloned folder this:
npm -g install yarn
yarn
yarn run build
vagrant up
It will create a virtual machine and will run the projects on http://localhost:8000
These checks are required to pass to accept code in the repository
# Unit Testing
pytest
# Static validation
mypy .
# linting validation
black --check .
Webpack was configured to have 2 different main sources depending on the required layout: Dashboard pages and Login pages.
Base template:
app/templates/base.html
JS main file:
app/static/js/index_app_.js
SASS main file:
app/static/sass/index_app_.scss