Inform about zero selected answers in closed part of a question
[edumed.git] / comment / models.py
1 from django.db import models
2 from django.core.urlresolvers import reverse
3
4
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')
11
12     class Meta:
13         ordering = ['order']
14
15     def __unicode__(self):
16         return self.name
17
18     def get_absolute_url(self):
19         return reverse('comment_document', kwargs = dict(slug = self.slug))