Welcome! This is the repository for the backend of the xCurator.
- General: Django, DRF
- Auth: djangorestframework-simplejwt
- Database: SQLite
- Temporarily - it’s just easier for development
- Eventually, we should switch to Postgres!
- Python 3
- pip
- Create a virtual environment and activate it
- Run
pip install -r requirements.txt
to install the dependencies- On Debian/Ubuntu, you are advised to install the following packages which will install, directly or by dependency, the required geospatial libraries for the GeoDjango framework:
$ sudo apt-get install binutils libproj-dev gdal-bin
- On Debian/Ubuntu, you are advised to install the following packages which will install, directly or by dependency, the required geospatial libraries for the GeoDjango framework:
- Copy
.env.dev.example
to.env
, change values as you see fit - Run
python manage.py migrate
to create/update the DB - Run
python manage.py createsuperuser
to create an admin account - Run
python manage.py runserver
to start the server - Please use a code formatter before committing.
- I run black automatically on each save
- TODO: We should add a pre-commit hook for this at some point
- I run black automatically on each save
scripts/transform_to_unqualified_dc.ipynb can be used to transform data from the Baden State Museum to a .zip that contains
- a file called
dc.json
containing the museum object metadata - a directory called
images
that contains the images associated with the objects
This .zip can be imported into the backend using the command python manage.py import_dc --zip-path <zip_path>
In case you encounter any problems or you have any questions, please raise an issue here on Github.