Commit 845191001660854263ea1c8f53313292d102b498
1 parent
322a7b57
Exists in
master
and in
13 other branches
Adding accounts app (with auth backend)
Showing
6 changed files
with
31 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,10 @@ |
| 1 | + | |
| 2 | +from django_browserid.auth import BrowserIDBackend | |
| 3 | + | |
| 4 | +class ColabBrowserIDBackend(BrowserIDBackend): | |
| 5 | + def filter_users_by_email(self, email): | |
| 6 | + return self.User.objects.filter(emails__address=email) | |
| 7 | + | |
| 8 | + def authenticate(self, *args, **kw): | |
| 9 | + #import pdb; pdb.set_trace(); | |
| 10 | + return super(ColabBrowserIDBackend, self).authenticate(*args, **kw) | ... | ... |
| ... | ... | @@ -0,0 +1,16 @@ |
| 1 | +""" | |
| 2 | +This file demonstrates writing tests using the unittest module. These will pass | |
| 3 | +when you run "manage.py test". | |
| 4 | + | |
| 5 | +Replace this with more appropriate tests for your application. | |
| 6 | +""" | |
| 7 | + | |
| 8 | +from django.test import TestCase | |
| 9 | + | |
| 10 | + | |
| 11 | +class SimpleTest(TestCase): | |
| 12 | + def test_basic_addition(self): | |
| 13 | + """ | |
| 14 | + Tests that 1 + 1 always equals 2. | |
| 15 | + """ | |
| 16 | + self.assertEqual(1 + 1, 2) | ... | ... |
| ... | ... | @@ -0,0 +1 @@ |
| 1 | +# Create your views here. | ... | ... |