summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikela Clemmons <glassresistor@gmail.com>2014-08-22 21:34:09 (GMT)
committerMikela Clemmons <glassresistor@gmail.com>2014-08-22 21:34:09 (GMT)
commit7ab7a17531e5d9e7e0c32f32723ea62601c9d80a (patch)
treec15fffcb99610a628db11c6b35e9499a7502c67e
parentd2ea6049da361cf186438d53307e5944e1935e1e (diff)
downloaddjango-oauth2-provider-7ab7a17531e5d9e7e0c32f32723ea62601c9d80a.zip
django-oauth2-provider-7ab7a17531e5d9e7e0c32f32723ea62601c9d80a.tar.gz
django-oauth2-provider-7ab7a17531e5d9e7e0c32f32723ea62601c9d80a.tar.bz2
made models use old table names
-rw-r--r--provider/oauth2/models.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/provider/oauth2/models.py b/provider/oauth2/models.py
index 9a6bdf9..17cf486 100644
--- a/provider/oauth2/models.py
+++ b/provider/oauth2/models.py
@@ -81,6 +81,9 @@ class Client(models.Model):
return cls(**kwargs)
+ class Meta:
+ db_table = 'oauth2_client'
+
class Grant(models.Model):
"""
@@ -108,6 +111,9 @@ class Grant(models.Model):
def __unicode__(self):
return self.code
+ class Meta:
+ db_table = 'oauth2_grant'
+
class AccessToken(models.Model):
"""
@@ -165,6 +171,9 @@ class AccessToken(models.Model):
timedelta = expiration - reference
return timedelta.days*86400 + timedelta.seconds
+ class Meta:
+ db_table = 'oauth2_accesstoken'
+
class RefreshToken(models.Model):
"""
@@ -188,3 +197,6 @@ class RefreshToken(models.Model):
def __unicode__(self):
return self.token
+
+ class Meta:
+ db_table = 'oauth2_refreshtoken'