Skip to content

Instantly share code, notes, and snippets.

@groovecoder
Created January 27, 2015 16:18
Show Gist options
  • Save groovecoder/3a3e2568f48eb0e36104 to your computer and use it in GitHub Desktop.
Save groovecoder/3a3e2568f48eb0e36104 to your computer and use it in GitHub Desktop.
class Key(models.Model):
"""Authentication key"""
user = models.ForeignKey(User, editable=False, db_index=True, blank=False,
null=False)
key = models.CharField(_("Lookup key"), max_length=64,
editable=False, db_index=True)
hashed_secret = models.CharField(_("Hashed secret"), max_length=128,
editable=False, db_index=False)
description = models.TextField(_("Description of intended use"),
blank=False)
created = models.DateTimeField(auto_now_add=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment