daily pastebin goal
81%
SHARE
TWEET

Untitled

a guest Oct 30th, 2014 148 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from django.db import models
  2. from django.contrib.auth.models import User
  3.  
  4. class Secret(models.Model):
  5.         user = models.ForeignKey(User, unique=True)
  6.         active = models.BooleanField(default=True)
  7.  
  8.         def __unicode__ (self):
  9.                 return self.user
  10.  
  11. # Create your models here.
  12. class Secret(models.Model):
  13.         from = models.ForeignKey(User, unique=True)
  14.         to = models.CharField(max_length=120)
  15.         secretmessage = models.TextField(max_length=200)
  16.         expiredtime = models.IntegerField(default=86400)
  17.         readexpiredtime = models.IntegerField(default=10)
  18.         slug = models.SlugField(unique=True, )
  19.         passcode = models.CharField(max_length=4, blank=True, null=True)
  20.         yosecetadmire = models.BooleanField(default=False)
  21.         isread = models.BooleanField(default=False)
  22.         canbedelete = models.BooleanField(default=True)
  23.  
  24.         def __unicode__ (self):
  25.                 return self.from
  26.  
  27. class Follow(models.Model):
  28.         user = models.ForeignKey(User, related_name='user')
  29.         followed_user = models.ForeignKey(User, related_name='followed_user')
  30.  
  31.         def __unicode__ (self):
  32.                 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. OK, I Understand
 
Top