Browse Source

Removed Python 2 compat.

master
Erik Stein 3 years ago
parent
commit
62e4362abc
  1. 6
      tests/test_app/models.py
  2. 2
      tests/test_app/tests.py

6
tests/test_app/models.py

@ -1,16 +1,11 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.urls import reverse from django.urls import reverse
from django.core.urlresolvers import NoReverseMatch from django.core.urlresolvers import NoReverseMatch
from django.db import models from django.db import models
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import python_2_unicode_compatible
from utils.fields import TranslatableCharField, TranslatableTextField from utils.fields import TranslatableCharField, TranslatableTextField
@python_2_unicode_compatible
class Category(models.Model): class Category(models.Model):
title = TranslatableCharField(_("Title"), max_length=200) title = TranslatableCharField(_("Title"), max_length=200)
@ -22,7 +17,6 @@ class Category(models.Model):
return self.title return self.title
@python_2_unicode_compatible
class Entry(models.Model): class Entry(models.Model):
title = TranslatableCharField( title = TranslatableCharField(
_("Title"), _("Title"),

2
tests/test_app/tests.py

@ -5,7 +5,7 @@ from __future__ import unicode_literals
from django.test import TestCase from django.test import TestCase
from django.utils import translation from django.utils import translation
from main.test_app.models import Entry from app.test_app.models import Entry
translation.activate('de') translation.activate('de')

Loading…
Cancel
Save