it/itf/erang_organised/models.py
2010-11-10 01:22:52 +05:30

21 lines
465 B
Python

from django.db import models
class Issue(models.Model):
title = models.CharField(max_length=255)
summary = models.TextField(blank=True, null=True)
date = models.DateField()
html = models.TextField(blank=True)
def __unicode__(self):
return self.title
def get_dict(self):
#FIXME: return self.date in JSON-friendly way
return {
'id': self.id,
'title': self.title,
'summary': self.summary,
}
# Create your models here.