padmatexts/padmaTexts/texts/models.py

23 lines
805 B
Python
Raw Normal View History

2010-11-11 00:16:21 +00:00
from django.db import models
class PadmaText(models.Model):
2010-12-30 14:58:15 +00:00
date = models.DateField(null=True)
2010-11-11 00:16:21 +00:00
title = models.CharField(max_length=512)
2010-11-11 00:26:15 +00:00
slug = models.SlugField()
2010-11-11 00:16:21 +00:00
author = models.CharField(max_length=512, blank=True)
author_bio = models.TextField(blank=True)
abstract = models.TextField(blank=True)
2010-12-09 19:26:47 +00:00
left_bar = models.TextField(blank=True)
2010-12-30 08:48:14 +00:00
view = models.CharField(max_length=128, choices=(('sidebar', 'Sidebar'),), default='sidebar')
2010-11-11 00:16:21 +00:00
html = models.TextField()
2010-12-09 19:26:47 +00:00
show_users = models.CharField(max_length=512, blank=True, help_text="Comma separated usernames")
show_layers = models.CharField(max_length=256, blank=True, help_text="Comma separated - for eg. transcript, description")
2010-11-11 00:16:21 +00:00
def __unicode__(self):
return self.title
def get_absolute_url(self):
return self.slug