- user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, blank=True, related_name='tokens')
- consumer = models.ForeignKey(Consumer)
-
- def __unicode__(self):
- return u"%s Token %s for %s" % (self.get_token_type_display(), self.key, self.consumer)
+ user = models.ForeignKey(
+ settings.AUTH_USER_MODEL, models.CASCADE,
+ null=True, blank=True, related_name='tokens'
+ )
+ consumer = models.ForeignKey(Consumer, models.CASCADE)
+
+ def __str__(self):
+ return "%s Token %s for %s" % (self.get_token_type_display(), self.key, self.consumer)