Skip to content
Snippets Groups Projects
Commit 39f3af76 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'master' into prepare-release-2.0

parents 360375b4 1458b612
No related branches found
No related tags found
No related merge requests found
# Generated by Django 3.2.3 on 2021-05-23 12:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0019_fix_uniqueness_per_site'),
('csv_import', '0002_importjob'),
]
operations = [
migrations.AddConstraint(
model_name='importtemplate',
constraint=models.UniqueConstraint(fields=('site_id', 'name'), name='unique_template_name_per_site'),
),
]
......@@ -27,7 +27,7 @@ class ImportTemplate(ExtensibleModel):
verbose_name=_("Content type"),
limit_choices_to=get_allowed_content_types_query,
)
name = models.CharField(max_length=255, verbose_name=_("Name"), unique=True)
name = models.CharField(max_length=255, verbose_name=_("Name"))
verbose_name = models.CharField(max_length=255, verbose_name=_("Name"))
has_header_row = models.BooleanField(
......@@ -79,6 +79,11 @@ class ImportTemplate(ExtensibleModel):
ordering = ["name"]
verbose_name = _("Import template")
verbose_name_plural = _("Import templates")
constraints = [
models.UniqueConstraint(
fields=("site_id", "name"), name="unique_template_name_per_site"
),
]
class ImportTemplateField(ExtensibleModel):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment