Skip to content

PIWEEK/coco-material-back

Repository files navigation

coco-material-back

Backend for CocoMaterial project

Requirements

  • Python3
  • docker (optional, to run Postgresql)

Development environment

  1. Run postgres

    $ docker run -d --name coco -p 5432:5432 -e POSTGRES_USER=coco -e POSTGRES_DB=coco -e POSTGRES_PASSWORD=coco postgres:12.3
  2. Create virtualenv and install dependencies

    $ cd coco-material-back
    $ python -m venv .env --prompt coco-material  # this line only the first time, to create the virtualenv
    $ source .env/bin/activate                    # this line everytime, to activate the virtualenv
    $ pip install -r requirements.txt
  3. Migrate models

    $ python manage.py migrate
  4. Create super user

    $ ./manage.py createsuperuser
  5. It's alive!

    $ python manage.py runserver
  6. Upload vectors Go to http://localhost:8000/admin, log in the system and use the admin to upload new vectors

  7. API Go to http://localhost:8000/api to check the browsable api

    Example:

    curl -X GET http://localhost:8000/api/tags/

About

Backend for CocoMaterial project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages