API to enrich places with weather forecasts.
- Django as main web Framework
- Django Rest Framework as API development tooling
- Postgres for SQL Database
- Redis for caching and memoizations.
- Docker/docke-compose for development and standalone deployments.
- Registration
- Autthentication (JWT Token)
- Accounts (Users)
- Places
You need to have installed git
, docker
, ssh
and a decent terminal
.
make build
build the images for development.make fixtures
load initial data (optional).- Copy the
.env.local
to.env
and fill the required variables. make up
start development server. 5Openlocalhost:8000
in your browser.
make debug
to enabledebug
mode for development.make migrations
run django makemigrations commandmake migrate
run django migrate commandmake superuser
make a superuserfor develoment
make test
run pytest over all test files in the projectmake test ARG=path_to_file
run pytest of a single test file.make coverage
run pytest and generate the coverage report.make isort
Fix posible import issuesmake lint
run flake8 and generate linting report.make report_coverage
serves the coverage report as html atlocalhost:3000
make report_lint
serves the lint report as html atlocalhost:3001
make code_review
run formatting linting and tests in just one command.
make locales
harverst translate string and generate .po files.make compile_locales
compile translation strings.
To configure pre-commit hooks, we need to do this just one time.
brew install pre-commit
installs pre-commitpre-commit install
install hooks in the current repo.pre-commit autoupdate
enables the pre-commit autoupdate.
This project was deployed in Digital Ocean using docker-compose and a nginx reverse proxy in a Ubuntu 22.04 droplet in the domain https://places.codemia.dev.