Skip to content

Latest commit

 

History

History
63 lines (50 loc) · 1.99 KB

README.md

File metadata and controls

63 lines (50 loc) · 1.99 KB

Photo Manager(PM)

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.

Getting Started

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

Main urls

Running the tests

pytest

Built with