Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 1.59 KB

README.md

File metadata and controls

63 lines (47 loc) · 1.59 KB

Places API


API service for managing places. You can search nearest place by coordinates. If it will two or more places you get all of them.
You can see video presentation by this link

Features:


  • Admin panel: /admin/
  • Documentation is located at: /api/doc/swagger/
  • Managing places
  • Search nearest places by coordinates

Installing using GitHub


Run with docker


Docker should be installed

git clone https://github.com/Terrrya/Places-API
cd Places-API

Create in root directory of project and fill .env file as shown in .env_sample file

docker compose up

Open in browser 127.0.0.1:8000/api/

Filling .env file


To fill .env file you have to use .env_smple as example. To get Django secret key you can use https://djecrety.ir/ Also you can add settings for your database or use default settings from .env_sample

Getting admin access


You can use following:

  • superuser:
    • Username: admin
    • Password: admin12345

Or create another one by yourself:

  • create user via Admin panel /admin/

Places API allows:

  • via /api/admin/ --- Work with admin panel
  • via /api/doc/swagger/ --- Detail api documentation by swagger
  • via [POST] /api/places/ --- Add new place
  • via [GET] /api/places/ --- Places list
  • via [GET] /api/places/?coordinates=12.34,23.56 --- Places list nearest to coordinates = 12.34,23.56
  • via [GET] /api/places/pk/ --- Place detail information
  • via [PUT, PATCH] /api/places/pk/ --- Update place information
  • via [DELETE] /api/places/pk/ --- Delete place