Skip to content
This repository was archived by the owner on Nov 24, 2020. It is now read-only.

bagardavidyanisntreal/dashboard_rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

this project is driven by python ^3.5 and pip ^19

  1. git clone https://gitlab.com/DavidBagaryan/dashboard_rest.git your/project/dir
  2. cd your/project/dir
  3. virtualenv venv (install virtenv or analog)
  4. source venv/bin/activate(or analog activation)
  5. pip install -r requirements.txt

then you can run migrations 6. cd dashboard_rest/ 7. python manage.py makemigrations 8. python manage.py migrate

also, you can create superadmin 9. python manage.py createsuperuser and follow the instruction below

available possibility:

  • articles list
  • create the article with associated tags
  • edit article
  • read article
  • delete article
  1. python manage.ry runserver (port number - optional)
  2. copy URL below to test app (http://url:port)
  3. to get articles list to emulate GET request to http://url:port/articles/list/
  4. to create article emulate POST request (Content-Type: application/json) to http://url:port/articles/create/ with params: article: { "title":"test title", "description":"test description", "author_name":"Test Author" } tags(optional, with any amount): [ { "name":"test name 1" }, { "name":"test name 2" }, ... ]
  5. to edit article emulate POST request (Content-Type: application/json) to http://url:port/articles/edit// with the same params as create
  6. to read article emulate get the request to http://url:port/articles/read//
  7. to delete article emulate DELETE request (Content-Type: application/json) to http://url:port/articles/delete// witout params

so, this is it sorry for some shitty constructions in create/update actions actually, this is my first REST API plus first practice with DRF

About

tra-la-la... some REST API without any FE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages