Skip to content

Commit

Permalink
Registration with Phone number (#1662)
Browse files Browse the repository at this point in the history
* Phone registration page, and authentication backend

* Upgrade django-skivvy to 0.1.8

* 100% test coverage

* Minor change to phone validator

* Changes to default.py and tests as addressed by Oliver

* Make all addressed changes

* allow user to authenticate even if the account status is inactive

* add changes addressed to PR

* Minor changes to the code

* Make VerificationDevice OneToOneField and make corresponding changes
Solve migration merge conflicts, and create a new migration file for phone and
 verification device
Pass all tests after rebasing
Make all tests pass

* change logger from info to debug
  • Loading branch information
valaparthvi committed Aug 29, 2017
1 parent 022f7ec commit 93ca36f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class Migration(migrations.Migration):
('verified', models.BooleanField(default=False)),
],
options={
'abstract': False,
'verbose_name': 'Verification Device',
'abstract': False,
},
),
migrations.RemoveField(
Expand Down Expand Up @@ -74,6 +74,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='verificationdevice',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]
1 change: 0 additions & 1 deletion cadasta/accounts/tests/test_urls_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def test_verify_email(self):

def test_signup(self):
assert reverse('account:register') == '/account/signup/'

resolved = resolve('/account/signup/')
assert resolved.func.__name__ == default.AccountRegister.__name__

Expand Down
2 changes: 2 additions & 0 deletions cadasta/accounts/tests/test_views_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
from django.core.urlresolvers import reverse_lazy
from django.test import TestCase
from django.core import mail
from django.conf import settings
from skivvy import ViewTestCase
from unittest import mock

from accounts.tests.factories import UserFactory
from core.tests.utils.cases import UserTestCase
Expand Down

0 comments on commit 93ca36f

Please sign in to comment.