Skip to content

mrkarezina/backend-challenge-2021

Repository files navigation

Django Photo API

Simple REST API for a photo gallery app. Users can create an account and manage their photo collection.

Installation

Please update docker-compose.yml with AWS credentias for S3 file uploads.

Run locally with Docker Compose:

docker-compose up

Endpoints

Postman collection

JSON Web Token endpoint

Method Endpoint Functionanlity
POST /api-token-auth Request jwt token

User Endpoints

Method Endpoint Functionality
GET /api/user List users
GET /api/user/create Creates a user
GET /api/user/profile/{pk} Retrieve a user
PUT /api/user/update/{pk} Edit a user
DELETE /api/user/destroy/{pk} Delete a user

Image Endpoints

Method Endpoint Functionality
POST /api/user/images/upload Upload an image, image_type private or public.
GET /api/user/images/public List of public image URLs

Utility Commands

After updating the data model, make migrations and migrate.

python manage.py makemigrations && python manage.py migrate

Create super user

python manage.py createsuperuser

Run tests

python manage.py test

Technologies

Resources

The following resources where helpful in making this API:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published