2010-08-01 21:50:16 +00:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
class Issue(models.Model):
|
|
|
|
title = models.CharField(max_length=255)
|
2010-10-21 16:51:01 +00:00
|
|
|
summary = models.TextField(blank=True, null=True)
|
2010-08-01 21:50:16 +00:00
|
|
|
date = models.DateField()
|
|
|
|
html = models.TextField(blank=True)
|
|
|
|
|
2010-11-09 19:52:52 +00:00
|
|
|
def __unicode__(self):
|
|
|
|
return self.title
|
2010-08-01 21:50:16 +00:00
|
|
|
|
2010-11-09 19:52:52 +00:00
|
|
|
def get_dict(self):
|
|
|
|
#FIXME: return self.date in JSON-friendly way
|
|
|
|
return {
|
|
|
|
'id': self.id,
|
|
|
|
'title': self.title,
|
|
|
|
'summary': self.summary,
|
|
|
|
}
|
2010-08-01 21:50:16 +00:00
|
|
|
|
|
|
|
# Create your models here.
|