1 from django.db import models
2 from django.core.urlresolvers import reverse
5 class CommentDocument(models.Model):
6 name = models.CharField(max_length = 255, unique = True)
7 slug = models.SlugField(max_length = 255, unique = True)
8 comment_id = models.CharField(max_length = 255, unique = True)
9 order = models.IntegerField()
10 language_code = models.CharField(max_length = 2, default = 'pl')
15 def __unicode__(self):
18 def get_absolute_url(self):
19 return reverse('comment_document', kwargs = dict(slug = self.slug))