Skip to content
Microservice boilerplate for Django Rest Framework
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Some fixes. Apr 29, 2019
django_service_blueprint Some fixes. Apr 29, 2019
requirements Added pytest support. Apr 29, 2019
scripts Initialize repository Feb 19, 2019
tests Added pytest support. Apr 29, 2019
.coveragerc Initialize repository Feb 19, 2019
.dockerignore Initialize repository Feb 19, 2019
.drone.yml Added pytest support. Apr 29, 2019
.flake8 Initialize repository Feb 19, 2019
.gitignore
Dockerfile Initialize repository Feb 19, 2019
Dockerfile.nginx Initialize repository Feb 19, 2019
LICENSE Create LICENSE Feb 28, 2019
README.md README update Mar 28, 2019
docker-compose.yml Refactor docker compose and added command in dev entrypoint. Apr 29, 2019
docker-entrypoint-dev.sh Refactor docker compose and added command in dev entrypoint. Apr 29, 2019
docker-entrypoint.sh configure entrypoint and drone Feb 27, 2019
manage.py rename to blueprint Feb 20, 2019

README.md

+++ title = "Service blueprint (Django)" +++

Service blueprint (Django)

Summary

This is a blueprint service written in Django. You should change this summary to describe your service. Some points to address:

  • What feature(s) does this service provide for a Walhall app?
  • What kinds of data models does this service provide for an app?
  • An overview of how the data models work together.

REST data models

[Model 1]

A [model 1] has the following properties:

  • [Property]: One-sentence description of the property.
  • [Property]: One-sentence description of the property.
  • [Property]: One-sentence description of the property.

Endpoints

  • GET /{model1}/{property}/: Retrieves a ____.
  • POST /{model1}/{property}/: Creates a ____.
  • PATCH /{model1}/{property}/: Updates a ____.
  • DELETE /{model1}/{property}/: Deletes a ____.

Click here for the full API documentation.

[Model 2]

A [model 2] has the following properties:

  • [Property]: One-sentence description of the property.
  • [Property]: One-sentence description of the property.
  • [Property]: One-sentence description of the property.

Endpoints

  • GET /{model2}/{property}/: Retrieves a ____.
  • POST /{model2}/{property}/: Creates a ____.
  • PATCH /{model2}/{property}/: Updates a ____.
  • DELETE /{model2}/{property}/: Deletes a ____.

Click here for the full API documentation.

Non-REST endpoints

This is a section where you would document endpoints that are not related to a data model, e.g., with the search service.

For each of these endpoints, a more in-depth explanation is necessary.

Local development

Here are some instructions for developing this service locally:

Prerequisites

You must have Docker installed.

Build & run service locally

Build the Docker image:

docker-compose build

Run a web server with this service:

docker-compose up

Now, open your browser and go to http://localhost:8080.

For the admin panel, go to http://localhost:8080/admin (user: admin, password: admin).

Run tests

To run the tests once:

docker-compose run --rm --entrypoint 'bash scripts/run-tests.sh' {name-of-service}

To run the tests and leave bash open inside the container so that it's possible to re-run the tests faster again using bash scripts/run-tests.sh [--keepdb]:

docker-compose run --rm --entrypoint 'bash scripts/run-tests.sh --bash-on-finish' {name-of-service}

To run bash:

docker-compose run --rm --entrypoint 'bash' {name-of-service}

API documentation (Swagger)

Click here to go to the full API documentation.

License

Copyright ©2019 Humanitec GmbH.

This code is released under the Humanitec Affero GPL.

You can’t perform that action at this time.