Skip to content

killpack/rest-framework-tutorial-with-oso

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST framework tutorial with Oso

This is originally REST framework tutorial by Tom Christie

Source code for the [Django REST framework tutorial + Oso].

I have added support for Django Oso.

@Jorder, I have added

  1. Middleware to load Polar file. Initially I tried without calling load_files method, but somehow policy was not getting apllied. After wasting lot of time I choose this alternative.
  2. /test-oso url + view is added for our testcase.

To Run application, run following commands

  1.  pip install -r requirement.txt
    
  2.  python manage.py migrate
    
  3.  python manage.py runserver
    

To Reproduce error

  1. Without login, go to /test-oso/ path on browser, you will get 403 Forbidden error, which make sense
  2. For login, create superuser using django command
    python manange.py createsuperuser
  1. Use same credentials to login through Rest Framework GUI. Login from right side top link
  2. On successful login, you may redirected to profile page which is not available. Now hit /test-oso/ url from browser

About

The Django REST framework tutorial. 🎓

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.6%
  • Shell 1.2%
  • Procfile 0.2%