padmatexts/padmaTexts/texts/models.py

17 lines
404 B
Python
Raw Normal View History

2010-11-11 00:16:21 +00:00
from django.db import models
class PadmaText(models.Model):
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)
html = models.TextField()
def __unicode__(self):
return self.title
def get_absolute_url(self):
return self.slug