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
- 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.
/test-osourl + view is added for our testcase.
To Run application, run following commands
-
pip install -r requirement.txt -
python manage.py migrate -
python manage.py runserver
To Reproduce error
- Without login, go to
/test-oso/path on browser, you will get403 Forbidden error, which make sense - For login, create superuser using django command
python manange.py createsuperuser- Use same credentials to login through Rest Framework GUI. Login from right side top link
- On successful login, you may redirected to profile page which is not available. Now hit
/test-oso/url from browser