mirror of
https://github.com/jazzband/django-dbtemplates.git
synced 2026-03-16 22:20:28 +00:00
Update models.py
Set Template.name to unique. Templates with duplicate names break the loader.
This commit is contained in:
parent
b371cc6518
commit
f9caea5b63
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ class Template(models.Model):
|
|||
Defines a template model for use with the database template loader.
|
||||
The field ``name`` is the equivalent to the filename of a static template.
|
||||
"""
|
||||
name = models.CharField(_('name'), max_length=100,
|
||||
name = models.CharField(_('name'), max_length=100, unique=True,
|
||||
help_text=_("Example: 'flatpages/default.html'"))
|
||||
content = models.TextField(_('content'), blank=True)
|
||||
sites = models.ManyToManyField(Site, verbose_name=_(u'sites'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue