-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path0017_keyparameter.py
More file actions
127 lines (123 loc) · 5.46 KB
/
0017_keyparameter.py
File metadata and controls
127 lines (123 loc) · 5.46 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
from django.db import migrations, models
import common.fields
class Migration(migrations.Migration):
dependencies = [
("baseline", "0016_alter_livelihoodstrategy_additional_identifier_and_more"),
]
operations = [
migrations.CreateModel(
name="KeyParameter",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
(
"created",
model_utils.fields.AutoCreatedField(
default=django.utils.timezone.now, editable=False, verbose_name="created"
),
),
(
"modified",
model_utils.fields.AutoLastModifiedField(
default=django.utils.timezone.now, editable=False, verbose_name="modified"
),
),
(
"strategy_type",
models.CharField(
choices=[
("MilkProduction", "Milk Production"),
("ButterProduction", "Butter Production"),
("MeatProduction", "Meat Production"),
("LivestockSale", "Livestock Sale"),
("CropProduction", "Crop Production"),
("FoodPurchase", "Food Purchase"),
("PaymentInKind", "Payment in Kind"),
("ReliefGiftOther", "Relief, Gift or Other Food"),
("Hunting", "Hunting"),
("Fishing", "Fishing"),
("WildFoodGathering", "Wild Food Gathering"),
("OtherCashIncome", "Other Cash Income"),
("OtherPurchase", "Other Purchase"),
],
db_index=True,
help_text="The type of livelihood strategy, such as crop production, or wild food gathering.",
max_length=30,
verbose_name="Strategy Type",
),
),
(
"key_parameter_type",
models.CharField(
choices=[("price", "Price"), ("quantity", "Quantity")],
help_text="The type of key parameter, such as quantity or price.",
max_length=30,
verbose_name="Key Parameter Type",
),
),
("name_en", common.fields.NameField(max_length=200, verbose_name="Name")),
("name_fr", common.fields.NameField(blank=True, max_length=200, verbose_name="Name")),
("name_es", common.fields.NameField(blank=True, max_length=200, verbose_name="Name")),
("name_pt", common.fields.NameField(blank=True, max_length=200, verbose_name="Name")),
("name_ar", common.fields.NameField(blank=True, max_length=200, verbose_name="Name")),
(
"description_en",
common.fields.DescriptionField(
blank=True,
help_text="Any extra information or detail that is relevant to the object.",
max_length=2000,
verbose_name="Description",
),
),
(
"description_fr",
common.fields.DescriptionField(
blank=True,
help_text="Any extra information or detail that is relevant to the object.",
max_length=2000,
verbose_name="Description",
),
),
(
"description_es",
common.fields.DescriptionField(
blank=True,
help_text="Any extra information or detail that is relevant to the object.",
max_length=2000,
verbose_name="Description",
),
),
(
"description_pt",
common.fields.DescriptionField(
blank=True,
help_text="Any extra information or detail that is relevant to the object.",
max_length=2000,
verbose_name="Description",
),
),
(
"description_ar",
common.fields.DescriptionField(
blank=True,
help_text="Any extra information or detail that is relevant to the object.",
max_length=2000,
verbose_name="Description",
),
),
(
"livelihood_zone_baseline",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="baseline.livelihoodzonebaseline",
verbose_name="Livelihood Zone Baseline",
),
),
],
options={
"abstract": False,
},
),
]