X-Git-Url: https://git.mdrn.pl/edumed.git/blobdiff_plain/d1340b5e0beeede44a20a09d6c9f103db6dee9c4..792eb089b2e60783b184c7434890eeaec567e079:/comment/models.py?ds=sidebyside diff --git a/comment/models.py b/comment/models.py index 4cbabfa..38c43d1 100644 --- a/comment/models.py +++ b/comment/models.py @@ -1,13 +1,14 @@ +# -*- coding: utf-8 -*- from django.db import models from django.core.urlresolvers import reverse class CommentDocument(models.Model): - name = models.CharField(max_length = 255, unique = True) - slug = models.SlugField(max_length = 255, unique = True) - comment_id = models.CharField(max_length = 255, unique = True) + name = models.CharField(max_length=255, unique=True) + slug = models.SlugField(max_length=255, unique=True) + comment_id = models.CharField(max_length=255, unique=True) order = models.IntegerField() - language_code = models.CharField(max_length = 2, default = 'pl') + language_code = models.CharField(max_length=2, default='pl') class Meta: ordering = ['order'] @@ -16,4 +17,4 @@ class CommentDocument(models.Model): return self.name def get_absolute_url(self): - return reverse('comment_document', kwargs = dict(slug = self.slug)) + return reverse('comment_document', kwargs={'slug': self.slug})