-
Install requirements or development requirements, based on your preferences.
pip install -r requirements.txt # or pip install -r requirements_dev.txt
-
Create settings file, for example starting from development settings
cp website/settings_dev.py website/settings.py
-
Define a
SECRET_KEY
inwebsite/settings.py
file
-
Apply all missing database migration
python manage.py migrate
-
Collecting all static files (for production purposes only, non required in development mode)
python manage.py collectstatic --noinput
-
Running server
python manage.py runserver
-
Configure a cron job for flushing expired tokens daily
python manage.py flushexpiredtokens
Launch simple tests with python manage.py test
, or launch test with coverage
results with:
coverage run manage.py test --settings=website.settings_test && coverage report -m && coverage html
## Importing data from JSON created in old dotnet version
python manage.py donatori_import_from_dotnet -d mypath
where mypath
is the directory containing
-
sezioni.json
-
statiDonatori.json
-
donatori.json