-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path0001_add_attestation_table.py
84 lines (78 loc) · 2.77 KB
/
0001_add_attestation_table.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Generated by Django 4.2.11 on 2024-05-09 20:27
import imagekit.models.fields
from django.db import migrations, models
import testimonials.utils
class Migration(migrations.Migration):
initial = True
dependencies = [
("channels", "0005_alter_fieldchannel_configuration"),
]
operations = [
migrations.CreateModel(
name="Attestation",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("created_on", models.DateTimeField(auto_now_add=True, db_index=True)),
("updated_on", models.DateTimeField(auto_now=True)),
(
"attestant_name",
models.CharField(
help_text="The name of the attestant", max_length=200
),
),
(
"title",
models.CharField(help_text="The attestant's title", max_length=255),
),
("quote", models.TextField(help_text="The testimonial attestation")),
(
"publish_date",
models.DateTimeField(
blank=True,
help_text="The datetime to show the testimonial",
null=True,
),
),
(
"avatar",
imagekit.models.fields.ProcessedImageField(
help_text="The attestant's avatar",
max_length=2083,
upload_to=testimonials.utils.avatar_uri,
),
),
(
"cover",
imagekit.models.fields.ProcessedImageField(
blank=True,
help_text=(
"Optional cover image, only used on certain"
" views (homepage)"
),
max_length=2083,
null=True,
upload_to=testimonials.utils.cover_uri,
),
),
(
"channels",
models.ManyToManyField(
help_text="Channels that the testimonial belongs to",
related_name="+",
to="channels.fieldchannel",
),
),
],
options={
"abstract": False,
},
),
]