Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Thread(Document):
- creator = StringField(default='Anon')
- number = IntField(unique=True)
- subject = StringField()
- content = StringField()
- file = ImageField()
- img_width = IntField()
- img_height = IntField()
- thumb_width = IntField()
- thumb_height = IntField()
- img_size = IntField()
- reply = ListField(ReferenceField('Post'))
- pub_date = DateTimeField(default=datetime.now())
- bump_date = DateTimeField(default=datetime.now())
- reply_count = IntField(default=0)
- image_count = IntField(default=0)
- def __unicode__(self):
- return self.subject
- class Post(Document):
- creator = StringField(default='Anon')
- number = IntField(unique=True)
- content = StringField()
- file = ImageField()
- img_width = IntField()
- img_height = IntField()
- thumb_width = IntField()
- thumb_height = IntField()
- img_size = IntField()
- pub_date = DateTimeField(default=datetime.now())
- thread = ReferenceField(Thread, dbref = True)
- def __unicode__(self):
- return self.content
Advertisement
Add Comment
Please, Sign In to add comment