A geospatial-enabled Python API for the Hyakumori CRM.
- python >= 3.7
- GEOS >= 3.5
- GDAL >= 2.0
- PROJ.4 >= 4.0
- PostgreSQL >= 9.5+
- PostGIS >= 2.2
The application also expects the following services to be running in tandem with django:
- redis
- geoserver (with the S3 Geotiff plugin)
- mailhog
Each of these can be run locally or from a suitable docker container.
- Copy
.env.example
to.env
and fill necessary variables:
cp .env.example .env
- Install requirements:
Create and active a virtual environment then install requirements:
pip install -r requirements.txt
- Create database and load postgis extension:
createdb -U postgres hyakumori_crm
psql -U postgres hyakumori_crm -c "create extension postgis"
- Perform migrations:
python manage.py makemigrations
python manage.py migrate
- Create a superuser with a password and grant permissions:
python manage.py createsuperuser
python manage.py crm_setup
Important: make sure that geoserver, redis, and mailhog are all running and are accessible at the appropriate ports!
Launch the GeoDjango application with:
python manage.py runserver
To run make and run migrations in the containers:
python manage.py makemigrations
python manage.py migrate
Using django-q
for async task and schedule:
- Run
./manage.py setup_schedule_tasks
to set up schedule tasks - Run
./manage.py qcluster
to start workers - Check info by running
./manage.py qinfo
The Hyakumori Project appreciates any contributions.
The Hyakumori CRM API was developed by the Hyakumori Team with additional contributions from:
This program is free software. See LICENSE for more information.