fix contact digest
[edumed.git] / comment / models.py
1 # -*- coding: utf-8 -*-
2 from django.db import models
3 from django.core.urlresolvers import reverse
4
5
6 class CommentDocument(models.Model):
7     name = models.CharField(max_length=255, unique=True)
8     slug = models.SlugField(max_length=255, unique=True)
9     comment_id = models.CharField(max_length=255, unique=True)
10     order = models.IntegerField()
11     language_code = models.CharField(max_length=2, default='pl')
12
13     class Meta:
14         ordering = ['order']
15
16     def __unicode__(self):
17         return self.name
18
19     def get_absolute_url(self):
20         return reverse('comment_document', kwargs={'slug': self.slug})