Get Awsome Refreshing Cocktail Recipes!
License: | MIT |
---|
To create an superuser account, use this command:
$ python manage.py createsuperuser
For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.
Running type checks with mypy:
$ mypy cocktailor
To run the tests, check your test coverage, and generate an HTML coverage report:
$ coverage run -m pytest $ coverage html $ open htmlcov/index.html
$ pytest
The following details how to deploy this application.
$ docker-compose -f local.yml build $ docker-compose -f local.yml up
$ docker-compose -f production.yml build $ docker-compose -f production.yml up
1- create a token using username and password you've created during setup:
$ curl -X POST -d "username=admin&password=admin" http://127.0.0.1:8000/auth-token/
2- use to auth token in response to access endpoints:
$ curl http://127.0.0.1:8000/api/cocktail/ingredients/ -H 'Authorization: Token 00f8cd25a71451799f84cfa637a0ca29c829cea9'