summaryrefslogtreecommitdiff
path: root/archaeological_operations/migrations/0070_auto_20190923_1408.py
blob: 13e1ac7d4ab6fc4b9f8b328c470ce726c7c012df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-09-23 14:08
from __future__ import unicode_literals

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import ishtar_common.models
import re


class Migration(migrations.Migration):

    dependencies = [
        ('archaeological_operations', '0069_auto_20190918_1520'),
    ]

    operations = [
        migrations.CreateModel(
            name='CulturalAttributionType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.TextField(verbose_name='Label')),
                ('txt_idx', models.TextField(help_text='The slug is the standardized version of the name. It contains only lowercase letters, numbers and hyphens. Each slug must be unique.', unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')], verbose_name='Textual ID')),
                ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')),
                ('available', models.BooleanField(default=True, verbose_name='Available')),
                ('order', models.IntegerField(verbose_name='Order')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='archaeological_operations.CulturalAttributionType', verbose_name='Parent')),
            ],
            options={
                'ordering': ('order',),
                'verbose_name_plural': 'Cultural attribution types',
                'verbose_name': 'Cultural attribution type',
            },
            bases=(ishtar_common.models.Cached, models.Model),
        ),
        migrations.AddField(
            model_name='archaeologicalsite',
            name='cultural_attributions',
            field=models.ManyToManyField(blank=True, to='archaeological_operations.CulturalAttributionType', verbose_name='Cultural attribution'),
        ),
    ]