added Document Categories

This commit is contained in:
sanj 2010-03-19 15:00:42 +05:30
parent dc97b6df23
commit 8f20a71564

View File

@ -30,10 +30,20 @@ class Contributor(models.Model):
def __unicode__(self): def __unicode__(self):
return self.name + ": " + self.email return self.name + ": " + self.email
DOC_CATEGORIES = (
('main', 'Main Article'),
('secondary', 'Secondary Article'),
('feedback', 'Feedback'),
('announce', 'Announcements & Reviews'),
('reference', 'Reference'),
('other', 'Other'),
)
class Document(models.Model): class Document(models.Model):
file = models.FileField(upload_to='erang/documents/') file = models.FileField(upload_to='erang/documents/')
title = models.CharField(max_length=500) title = models.CharField(max_length=500)
issue = models.ForeignKey(Issue) issue = models.ForeignKey(Issue)
category = models.CharField(max_length=255, choices=DOC_CATEGORIES, blank=True)
notes = models.TextField(blank=True) notes = models.TextField(blank=True)
contributor = models.ForeignKey(Contributor, blank=True, null=True) contributor = models.ForeignKey(Contributor, blank=True, null=True)
doc_txt = models.TextField(blank=True) doc_txt = models.TextField(blank=True)