diff options
author | Sanmugasundaram K | 2015-01-07 19:18:22 +0530 |
---|---|---|
committer | Sanmugasundaram K | 2015-01-07 19:24:11 +0530 |
commit | 2ae49074f030b61088317526b023b9e21124dbfc (patch) | |
tree | 957f0138c0f2a96fd2c818a7035d2bbd48d3400c /spoken_auth | |
parent | 9a5a239295e7aae2d211c07c9fdb117cf8252e99 (diff) | |
download | FOSSEE-Forum-2ae49074f030b61088317526b023b9e21124dbfc.tar.gz FOSSEE-Forum-2ae49074f030b61088317526b023b9e21124dbfc.tar.bz2 FOSSEE-Forum-2ae49074f030b61088317526b023b9e21124dbfc.zip |
drupal auth user id change to spoken auth user id in all old records
Diffstat (limited to 'spoken_auth')
-rw-r--r-- | spoken_auth/models.py | 1 | ||||
-rw-r--r-- | spoken_auth/routers.py | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/spoken_auth/models.py b/spoken_auth/models.py index 1992ed8..b315b2d 100644 --- a/spoken_auth/models.py +++ b/spoken_auth/models.py @@ -8,6 +8,7 @@ from django.contrib.auth.models import ( class Users(AbstractBaseUser): id = models.IntegerField(primary_key=True) username = models.CharField(max_length=100L, unique=True) + email = models.CharField(max_length=100L, unique=True) USERNAME_FIELD = 'username' class Meta: db_table = 'auth_user' diff --git a/spoken_auth/routers.py b/spoken_auth/routers.py index f2d759b..6b6174c 100644 --- a/spoken_auth/routers.py +++ b/spoken_auth/routers.py @@ -2,11 +2,15 @@ class DrupalAuthRouter(object): def db_for_read(self, model, **hints): if model._meta.app_label == 'spoken_auth': return 'spoken' + if model._meta.app_label == 'migrate_spoken': + return 'cdeep' return 'default' def db_for_write(self, model, **hints): if model._meta.app_label == 'spoken_auth': return 'spoken' + if model._meta.app_label == 'migrate_spoken': + return 'cdeep' return 'default' def allow_relation(self, obj1, obj2, **hints): |