Back-end rest api and admin interface for PM. It works with python 3.11.
The main tasks of the service:
- Registration and authorization of users.
- User Token Authentication
- Storing user photos with metadata.
- An authenticated user can only view and edit their own photos and upload new ones.
The first thing to do is to clone the repository:
$ git clone https://github.com/polina-koval/PhotoManager.git
$ cd PhotoManager
By default you'll encounter PostgreSQL database. Follow django documentation to change it.
Create a virtual environment to install dependencies in and activate it:
$ virtualenv venv
$ source venv/bin/activate
Then install the dependencies:
(venv)$ pip install -r requirements.txt
There is a file in the repo ".env.example", this file for use in local development. Duplicate this file as .env in the root of the project and update the environment variables SECRET_KEY, DB secrets etc.
$ cp .env.example .env
Once pip has finished downloading the dependencies and the variable is updated:
Django:
(venv)$ python manage.py migrate
(venv)$ python manage.py createsuperuser
(venv)$ python manage.py runserver
- http://127.0.0.1:8000/admin/ - Admin Area (Convenient data management (viewing, editing, adding new objects);
- http://127.0.0.1:8000/api/ - API (consist tags, applicants and vacancies endpoints);
- http://127.0.0.1:8000/api/swagger/ - Swagger;
- http://127.0.0.1:8000/api/redoc/ - API Documentation;
pytest
- Django - The web framework used.
- Django Rest Framework - The web APIs framework used.
- Django-environ - Used to configure Django app with environment variables.
- Pytest - Tests.