summaryrefslogtreecommitdiff
path: root/app/lib/django_comments/abstracts.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/django_comments/abstracts.py')
-rw-r--r--app/lib/django_comments/abstracts.py31
1 files changed, 15 insertions, 16 deletions
diff --git a/app/lib/django_comments/abstracts.py b/app/lib/django_comments/abstracts.py
index e74ea02..0cf5a69 100644
--- a/app/lib/django_comments/abstracts.py
+++ b/app/lib/django_comments/abstracts.py
@@ -9,7 +9,6 @@ from django.utils.html import mark_safe
from django.db import models
from django.utils import timezone
from six import python_2_unicode_compatible
-from django.utils.translation import ugettext_lazy as _
try:
from django.urls import reverse
except ImportError:
@@ -28,10 +27,10 @@ class BaseCommentAbstractModel(models.Model):
# Content-object field
content_type = models.ForeignKey(ContentType,
- verbose_name=_('content type'),
+ verbose_name=('content type'),
related_name="content_type_set_for_%(class)s",
on_delete=models.CASCADE)
- object_pk = models.TextField(_('object ID'))
+ object_pk = models.TextField(('object ID'))
content_object = GenericForeignKey(ct_field="content_type", fk_field="object_pk")
# Metadata about the comment
@@ -66,25 +65,25 @@ class CommentAbstractModel(BaseCommentAbstractModel):
# Who posted this comment? If ``user`` is set then it was an authenticated
# user; otherwise at least user_name should have been set and the comment
# was posted by a non-authenticated user.
- user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=_('user'),
+ user = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name=('user'),
blank=True, null=True, related_name="%(class)s_comments",
on_delete=models.SET_NULL)
- user_name = models.CharField(_("user's name"), max_length=50, blank=True)
+ user_name = models.CharField(("user's name"), max_length=50, blank=True)
# Explicit `max_length` to apply both to Django 1.7 and 1.8+.
- user_email = models.EmailField(_("user's email address"), max_length=254,
+ user_email = models.EmailField(("user's email address"), max_length=254,
blank=True)
- user_url = models.URLField(_("user's URL"), blank=True)
+ user_url = models.URLField(("user's URL"), blank=True)
- comment = models.TextField(_('comment'), max_length=COMMENT_MAX_LENGTH)
+ comment = models.TextField(('comment'), max_length=COMMENT_MAX_LENGTH)
# Metadata about the comment
- submit_date = models.DateTimeField(_('date/time submitted'), default=None, db_index=True)
- ip_address = models.GenericIPAddressField(_('IP address'), unpack_ipv4=True, blank=True, null=True)
- is_public = models.BooleanField(_('is public'), default=True,
- help_text=_('Uncheck this box to make the comment effectively '
+ submit_date = models.DateTimeField(('date/time submitted'), default=None, db_index=True)
+ ip_address = models.GenericIPAddressField(('IP address'), unpack_ipv4=True, blank=True, null=True)
+ is_public = models.BooleanField(('is public'), default=True,
+ help_text=('Uncheck this box to make the comment effectively '
'disappear from the site.'))
- is_removed = models.BooleanField(_('is removed'), default=False,
- help_text=_('Check this box if the comment is inappropriate. '
+ is_removed = models.BooleanField(('is removed'), default=False,
+ help_text=('Check this box if the comment is inappropriate. '
'A "This comment has been removed" message will '
'be displayed instead.'))
@@ -95,8 +94,8 @@ class CommentAbstractModel(BaseCommentAbstractModel):
abstract = True
ordering = ('submit_date',)
permissions = [("can_moderate", "Can moderate comments")]
- verbose_name = _('comment')
- verbose_name_plural = _('comments')
+ verbose_name = ('comment')
+ verbose_name_plural = ('comments')
def __str__(self):
return "%s: %s..." % (self.name, self.comment[:50])