forked from fossasia/eventyay-talk-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0001_create_page_model.py
59 lines (53 loc) · 1.86 KB
/
0001_create_page_model.py
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Generated by Django 3.0.3 on 2020-03-01 21:12
import django.core.validators
import django.db.models.deletion
import i18nfield.fields
from django.db import migrations, models
import pretalx.common.mixins.models
class Migration(migrations.Migration):
initial = True
dependencies = [
("event", "0022_auto_20200124_1213"),
]
operations = [
migrations.CreateModel(
name="Page",
fields=[
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False
),
),
(
"slug",
models.CharField(
db_index=True,
max_length=150,
validators=[
django.core.validators.RegexValidator(
message="The slug may only contain letters, numbers, dots and dashes.",
regex="^[a-zA-Z0-9.-]+$",
)
],
),
),
("position", models.IntegerField(default=0)),
("title", i18nfield.fields.I18nCharField()),
("text", i18nfield.fields.I18nTextField()),
("link_in_footer", models.BooleanField(default=False)),
(
"event",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="pages",
to="event.Event",
),
),
],
options={
"ordering": ["position", "title"],
},
bases=(pretalx.common.mixins.models.LogMixin, models.Model),
),
]