-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Token model and static price redeem
- Loading branch information
Jeremy Kun
committed
Jun 1, 2016
1 parent
cb15dde
commit 87e2a40
Showing
4 changed files
with
69 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from django.db import models | ||
from django.utils import timezone | ||
|
||
|
||
class Token(models.Model): | ||
''' | ||
A model representing a token given to the user. | ||
''' | ||
|
||
created = models.DateTimeField(default=timezone.now) | ||
|
||
''' | ||
The value of the token, given to the user, which is a hashid of the | ||
database id. | ||
''' | ||
value = models.CharField(max_length=100, null=True, default=None) | ||
|
||
''' | ||
True when the token has successfully been redeemed, False otherwise. | ||
''' | ||
redeemed = models.BooleanField(default=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters