Skip to content

About Demo API, written in Python Django, with one route that takes a datetime string and returns a list of open restaurants, if any.

License

Notifications You must be signed in to change notification settings

mrlonis/python-open-restaurant-django

Repository files navigation

python-open-restaurant-django

Demo API using Django with one route that takes a datetime string and returns open restaurants, if any.

The Django project was initialized using the command:

django-admin startproject project .

The api application was created using the command:

python manage.py startapp api

Table of Contents

Pre-requisites

.env File

Create a .env file in the root directory of your project based off of the .env.sample file.

Required Build Packages

sudo apt-get install gcc libpq-dev python3-dev

Docker

Install Docker and run the following command to startup the database/api in Docker:

docker compose up --build --pull postgresql --remove-orphans -V --wait

Migrate the Database

poetry run python manage.py migrate

Linting

To lint the project, run the following commands:

poetry run flake8 api project manage.py
poetry run pylint api project manage.py

Testing

To run the tests, be sure you have ran the Docker Compose Command, then run the following command:

poetry run python manage.py test

About

About Demo API, written in Python Django, with one route that takes a datetime string and returns a list of open restaurants, if any.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published