mirror of
https://github.com/jazzband/django-dbtemplates.git
synced 2026-05-13 01:53:13 +00:00
Merge pull request #89 from m-vdb/mvdb/fix-str-representation
Fix Template string representation for python3
This commit is contained in:
commit
f5b9e36fc7
1 changed files with 3 additions and 1 deletions
|
|
@ -8,10 +8,12 @@ from django.contrib.sites.models import Site
|
|||
from django.db import models
|
||||
from django.db.models import signals
|
||||
from django.template import TemplateDoesNotExist
|
||||
from django.utils.six import python_2_unicode_compatible
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.timezone import now
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Template(models.Model):
|
||||
"""
|
||||
Defines a template model for use with the database template loader.
|
||||
|
|
@ -36,7 +38,7 @@ class Template(models.Model):
|
|||
verbose_name_plural = _('templates')
|
||||
ordering = ('name',)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def populate(self, name=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue