Django + rest framework + backbone.js = awesome..
So far we’ve got a single-user password storing application. That’s not very secure or useful 🙂 So now we’re going to support multiple users and lock down the app so users must be authenticated. We’ll also lock down the REST API.
There’s now sufficient code that I’ll point you in the direction of certain files in the repository for some of the more standard Django code for things such as user registration.
Supporting multiple users
I created a registration form in `apps/users/forms.py` and updated `urls.py` so the django registration app would use it. The registration form asks for users first and last names, email address, a user name and their password (twice). This is pretty standard stuff.
Now users can register, we need to update the Password model in `apps/passwords/models.py` so passwords are associated with the user that created them. Add a new foreign key to django.contrib.auth.models.User:
View original post 789 more words