Added by: Sam Deering
** NEW FEATURE **
I just added my version of how to implement persisted tokens using $cookieStore along side Witold Szczerba's http-auth-interceptor. Every request is checked for authentication, and the login screen is served if the user is not authenticated. Please let me know how you have implemented this in your projects, I don't assume my way is the only or best way out there. THANKS
Seed for a cross domain Angularjs / Django Rest Framework Application
INCLUDED - RESTFUL API service for User and Address models - Login to obtain django token - Http-auth-interceptor and $cookieStore for persisted tokens - Angularjs display of data pulled from Django Rest API
After cloning down the repository:
Bam, you're good to go.
Afterwards, to see it in action, here is a simple way:
Please give feedback, or bug fixes.
NOTES: - I highly suggest using a virtualenv as to not mess with in-built dependencies - It would be a great idea to create a requirements.txt file to document your south, django, djangorestframework, and django-cors-headers versions - Check out 1. http://django-rest-framework.org/ 2. http://angularjs.org/
Module stats last updated: 2017-02-22 16:00:02