SHARE
TWEET
Untitled
a guest
Oct 30th, 2014
148
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- from django.db import models
- from django.contrib.auth.models import User
- class Secret(models.Model):
- user = models.ForeignKey(User, unique=True)
- active = models.BooleanField(default=True)
- def __unicode__ (self):
- return self.user
- # Create your models here.
- class Secret(models.Model):
- from = models.ForeignKey(User, unique=True)
- to = models.CharField(max_length=120)
- secretmessage = models.TextField(max_length=200)
- expiredtime = models.IntegerField(default=86400)
- readexpiredtime = models.IntegerField(default=10)
- slug = models.SlugField(unique=True, )
- passcode = models.CharField(max_length=4, blank=True, null=True)
- yosecetadmire = models.BooleanField(default=False)
- isread = models.BooleanField(default=False)
- canbedelete = models.BooleanField(default=True)
- def __unicode__ (self):
- return self.from
- class Follow(models.Model):
- user = models.ForeignKey(User, related_name='user')
- followed_user = models.ForeignKey(User, related_name='followed_user')
- def __unicode__ (self):
- return self.user
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
