A simple To Do backend application implemented that allows to:
- Add new task
- Edit existing task
- List all tasks
- Delete a task
This is an attempt to reimplement this Ruby on Rails project on Django. Read the Development notes for details on what was accomplished.
The development environment for this app uses pipenv, a virtualenv for Python. Therefore, to get you started you'll need to install pipenv.
From the project root, switch to the api directory:
$ cd api
Then activate a virtual environment:
$ pipenv shell
If this is the first time running the app:
- Apply database migrations
$ ./manage.py migrate todo
- Create a "superuser" account to access the app admin interface
$ ./manage.py createsuperuser
Start the server:
$ ./manage.py runserver
To access the app admin interface, go to:
http://127.0.0.1:8000/admin/
(or whatever URL the server log indicates when starting it) and use the credentials specificied when creating the "superuser" account.
The admin interface also offers a web browsable API for testing request submissions to the endpoints.
The API root is:
http://127.0.0.1:8000/api/v1/
Currently, the only functional endpoint is:
http://127.0.0.1:8000/api/v1/tasks
To run the test cases, execute:
$ ./manage.py test
For coverage an inline report:
$ coverage report
And for an HTML report:
$ coverage html
- Python 3.7.7
- pip 21.0.1 - package installer for Python
- pipenv 2020.11.15 - virtual environments for Python
- Django - a Python web framework
- Django REST Framework - a Django toolkit for building web APIs
This project is an attempt to reimplement this Ruby on Rails (RoR) project on Python + Django. Not all features, funtional and non-functional requirements were reimplemented. Notably, the follow is missing:
The ability to tag tasks were not implemented.
This project doesn't comply with OpenAPI specification as the original RoR project does, therefore the serialization has to be modified accordingly.
Versioning hasn't been implemented, however to maintain compatibility with existing Postman tests, the URL api/v1/ was maintained.
The existing RoR has a companion Postman collection for testing the APIs (included in the RoR project integration tests), however due to missing features described above, the Postman tests fail. Once the features have been implemented and the Postman tests pass, this project will be considered fully reimplemented.