-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from uktrade/DST-225-sanctions-regime-initial-…
…data-load DST-225: Add fixture to load sanction regime data
- Loading branch information
Showing
4 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
# Load all fixtures in one go | ||
|
||
echo "Loading all fixture data" | ||
|
||
python manage.py loaddata report_a_breach/fixtures/*.json | ||
|
||
echo "Fixtures loaded" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[ | ||
{ | ||
"model": "report_a_breach.SanctionsRegime", | ||
"pk": "cf6b54c5-a46b-4b7d-a40d-9f2ed750eb6d", | ||
"fields": { | ||
"short_name": "The Afghanistan", | ||
"full_name": "The Afghanistan (Sanctions) (EU Exit) Regulations 2020", | ||
"date_range": "" | ||
} | ||
}, | ||
{ | ||
"model": "report_a_breach.SanctionsRegime", | ||
"pk": "708e45bf-838b-4efc-b302-6d31d5684e7b", | ||
"fields": { | ||
"short_name": "The Republic of Belarus", | ||
"full_name": "The Republic of Belarus (Sanctions) (EU Exit) Regulations 2019", | ||
"date_range": "" | ||
} | ||
}, | ||
{ | ||
"model": "report_a_breach.SanctionsRegime", | ||
"pk": "10cb44e9-fcdf-4fe5-89e8-798b5192b766", | ||
"fields": { | ||
"short_name": "The Burma", | ||
"full_name": "The Burma (Sanctions) (EU Exit) Regulations 2019", | ||
"date_range": "" | ||
} | ||
}, | ||
{ | ||
"model": "report_a_breach.SanctionsRegime", | ||
"pk": "1f7f89b3-b574-4fd9-9904-d7701865c5a1", | ||
"fields": { | ||
"short_name": "The Democratic People’s Republic of Korea", | ||
"full_name": "The Democratic People’s Republic of Korea (Sanctions) (EU Exit) Regulations 2019", | ||
"date_range": "" | ||
} | ||
}, | ||
{ | ||
"model": "report_a_breach.SanctionsRegime", | ||
"pk": "fef50ac9-ecbc-454b-915f-d5aa4953a2f8", | ||
"fields": { | ||
"short_name": "The Iran", | ||
"full_name": "The Iran Human Rights (Sanctions) (EU Exit) Regulations 2019", | ||
"date_range": "" | ||
} | ||
}, | ||
{ | ||
"model": "report_a_breach.SanctionsRegime", | ||
"pk": "0f3d1e25-638c-41b7-89df-4e569b45297f", | ||
"fields": { | ||
"short_name": "The Russia", | ||
"full_name": "The Russia (Sanctions) (EU Exit) Regulations 2019", | ||
"date_range": "" | ||
} | ||
} | ||
] |
32 changes: 32 additions & 0 deletions
32
report_a_breach/migrations/0003_historicalbreach_what_were_the_goods_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Generated by Django 4.2.10 on 2024-02-20 16:37 | ||
|
||
import django.contrib.postgres.fields.ranges | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("report_a_breach", "0002_breach_what_were_the_goods_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="historicalbreach", | ||
name="what_were_the_goods", | ||
field=models.TextField( | ||
default="", | ||
verbose_name="What were the goods or services, or what was the technological assistance or technology?", | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name="historicalsanctionsregime", | ||
name="date_range", | ||
field=django.contrib.postgres.fields.ranges.DateRangeField(blank=True, null=True), | ||
), | ||
migrations.AddField( | ||
model_name="sanctionsregime", | ||
name="date_range", | ||
field=django.contrib.postgres.fields.ranges.DateRangeField(blank=True, null=True), | ||
), | ||
] |