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 @@ | @@ -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 @@ | @@ -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 @@ | @@ -0,0 +1 @@ | ||
1 | +# Create your views here. |
src/colab/custom_settings.py
@@ -29,6 +29,7 @@ INSTALLED_APPS = INSTALLED_APPS + ( | @@ -29,6 +29,7 @@ INSTALLED_APPS = INSTALLED_APPS + ( | ||
29 | 'rss', | 29 | 'rss', |
30 | 'colab.deprecated', | 30 | 'colab.deprecated', |
31 | 'planet', | 31 | 'planet', |
32 | + 'accounts', | ||
32 | 33 | ||
33 | # Feedzilla and deps | 34 | # Feedzilla and deps |
34 | 'feedzilla', | 35 | 'feedzilla', |