Docker Image and first iteration
This commit is contained in:
1 parent
723b64b1c4
commit
bd9209ebb7
40 files changed
+26643
No files matched your search
@@ -0,0 +1,57 @@
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="Region",
|
||||
fields=[
|
||||
("code", models.CharField(max_length=8, primary_key=True, serialize=False)),
|
||||
("name", models.CharField(max_length=120)),
|
||||
(
|
||||
"level",
|
||||
models.CharField(
|
||||
choices=[("country", "Country"), ("subdivision", "Subdivision")],
|
||||
max_length=16,
|
||||
),
|
||||
),
|
||||
(
|
||||
"parent",
|
||||
models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="subdivisions",
|
||||
to="showcase.region",
|
||||
),
|
||||
),
|
||||
],
|
||||
options={"ordering": ("name",)},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="PortfolioEntry",
|
||||
fields=[
|
||||
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
||||
("entry_type", models.CharField(choices=[("work", "Work"), ("cv", "CV")], max_length=8)),
|
||||
("title", models.CharField(max_length=160)),
|
||||
("organization", models.CharField(blank=True, max_length=160)),
|
||||
("start_date", models.DateField(blank=True, null=True)),
|
||||
("end_date", models.DateField(blank=True, null=True)),
|
||||
("summary", models.TextField()),
|
||||
("url", models.URLField(blank=True)),
|
||||
("is_published", models.BooleanField(default=False)),
|
||||
("display_order", models.PositiveIntegerField(default=0)),
|
||||
("regions", models.ManyToManyField(related_name="entries", to="showcase.region")),
|
||||
],
|
||||
options={
|
||||
"verbose_name_plural": "portfolio entries",
|
||||
"ordering": ("display_order", "-start_date", "title"),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user