aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework
diff options
context:
space:
mode:
authorMjumbe Wawatu Poe2012-09-07 16:19:15 -0400
committerMjumbe Wawatu Poe2012-09-07 16:19:15 -0400
commit8df71f4d1d9a8a3df8e053d99340fbe5bf78b8ad (patch)
tree3a467bdd50bea4772c38887deb4694e444f244d7 /djangorestframework
parentf741cdae44bc455089a5ed7e1dbea4760ca97b85 (diff)
downloaddjango-rest-framework-8df71f4d1d9a8a3df8e053d99340fbe5bf78b8ad.tar.bz2
Get rid of the BaseToken abstract model
Diffstat (limited to 'djangorestframework')
-rw-r--r--djangorestframework/tokenauth/models.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/djangorestframework/tokenauth/models.py b/djangorestframework/tokenauth/models.py
index 81d98863..f289b0fd 100644
--- a/djangorestframework/tokenauth/models.py
+++ b/djangorestframework/tokenauth/models.py
@@ -1,25 +1,15 @@
import uuid
from django.db import models
-class BaseToken(models.Model):
+class BasicToken(models.Model):
"""
- The base abstract authorization token model class.
+ The default authorization token model class.
"""
key = models.CharField(max_length=32, primary_key=True, blank=True)
user = models.ForeignKey('auth.User')
revoked = models.BooleanField(default=False)
- class Meta:
- abstract=True
-
def save(self, *args, **kwargs):
if not self.key:
self.key = uuid.uuid4().hex
- return super(BaseToken, self).save(*args, **kwargs)
-
-
-class BasicToken(BaseToken):
- """
- The default authorization token model class.
- """
- pass
+ return super(BasicToken, self).save(*args, **kwargs)