use python_2_unicode_compatible

This commit is contained in:
j 2017-03-03 08:56:35 +01:00
commit f0a4aba751
24 changed files with 130 additions and 53 deletions

View file

@ -1,32 +1,37 @@
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class IDAlias(models.Model):
old = models.CharField(max_length=255, unique=True)
new = models.CharField(max_length=255)
def __unicode__(self):
def __str__(self):
return u"%s=%s" % (self.old, self.new)
@python_2_unicode_compatible
class LayerAlias(models.Model):
old = models.CharField(max_length=255, unique=True)
new = models.CharField(max_length=255)
def __unicode__(self):
def __str__(self):
return u"%s=%s" % (self.old, self.new)
@python_2_unicode_compatible
class ListAlias(models.Model):
old = models.CharField(max_length=255, unique=True)
new = models.CharField(max_length=255)
def __unicode__(self):
def __str__(self):
return u"%s=%s" % (self.old, self.new)
@python_2_unicode_compatible
class Alias(models.Model):
url = models.CharField(max_length=255, unique=True)
target = models.CharField(max_length=255)
def __unicode__(self):
def __str__(self):
return u"%s=%s" % (self.url, self.target)