summaryrefslogtreecommitdiff
path: root/app/posts/migrations/0022_trip_post_trip.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2023-05-23 14:27:03 -0500
committerluxagraf <sng@luxagraf.net>2023-05-23 14:27:03 -0500
commit32ed4dd4eb76ffc1106b57326614c3b156f41411 (patch)
treef6a0c51d0588ca3fb99b4667b92bcd2666a9471e /app/posts/migrations/0022_trip_post_trip.py
parentba9cf23958df46d8d35e39aef5c43898be87233e (diff)
posts: added a trip model to organize posts by trip
Diffstat (limited to 'app/posts/migrations/0022_trip_post_trip.py')
-rw-r--r--app/posts/migrations/0022_trip_post_trip.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/posts/migrations/0022_trip_post_trip.py b/app/posts/migrations/0022_trip_post_trip.py
new file mode 100644
index 0000000..6f01b0c
--- /dev/null
+++ b/app/posts/migrations/0022_trip_post_trip.py
@@ -0,0 +1,37 @@
+# Generated by Django 4.2.1 on 2023-05-23 15:25
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('media', '0008_auto_20201202_1155'),
+ ('posts', '0021_alter_post_post_type'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Trip',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(max_length=300)),
+ ('subtitle', models.CharField(blank=True, max_length=200)),
+ ('slug', models.SlugField()),
+ ('body_markdown', models.TextField()),
+ ('body_html', models.TextField(blank=True)),
+ ('date_started', models.DateField()),
+ ('date_ended', models.DateField()),
+ ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='media.luximage')),
+ ],
+ options={
+ 'ordering': ('-date_started',),
+ },
+ ),
+ migrations.AddField(
+ model_name='post',
+ name='trip',
+ field=models.ManyToManyField(blank=True, null=True, to='posts.trip'),
+ ),
+ ]