Skip to content

A simple django rest API, with angular front end nothing exciting, just more of the learning side is my aim

Notifications You must be signed in to change notification settings

ruairidhm98/Django-REST-Angular-Protoype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Django-REST-Protoype

A simple django rest API, nothing exciting. Angular is used for the front end to make the API calls and to make it a single page application

Generating Token key for API

  • There is another way of doing this, which seemed too complicated to do, but this works and provided some form of authentication (and its only a prototype!)
python manage.py createsuperuser
  • Create the superuser for the app
  • Download Postman
  • Open postman
  • Make a POST request to the the url => http://127.0.0.1:8000/snippets/ (make sure the server is running, and insert something like code in the key and print("post") in the value
  • Go to the authorization tab, and select Type Basic Auth and enter username and password for the superuser
  • Click code (this is directly below the save button)
  • You're code will appear as 'Authorization: Basic "the_code"'
  • Use "the_code" to enter in the angular form (the angular code will insert this as a nescessary header)

About

A simple django rest API, with angular front end nothing exciting, just more of the learning side is my aim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published