diff options
author | luxagraf <sng@luxagraf.net> | 2019-09-18 21:14:38 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2019-09-18 21:14:38 -0400 |
commit | 5bc22c064fbc51987007d85fbc8296a998cf6e84 (patch) | |
tree | 7d961ff86c478171ffee14168e9ae3f9d09f1ca5 /app/normalize | |
parent | 9e7aadbcf9bab0ecfcd4afc96f6a09f9fe11a197 (diff) |
added posts, consolidated essays into posts
Diffstat (limited to 'app/normalize')
-rw-r--r-- | app/normalize/__init__.py | 0 | ||||
-rw-r--r-- | app/normalize/migrations/0001_initial.py | 26 | ||||
-rw-r--r-- | app/normalize/migrations/__init__.py | 0 | ||||
-rw-r--r-- | app/normalize/models.py | 12 |
4 files changed, 38 insertions, 0 deletions
diff --git a/app/normalize/__init__.py b/app/normalize/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/normalize/__init__.py diff --git a/app/normalize/migrations/0001_initial.py b/app/normalize/migrations/0001_initial.py new file mode 100644 index 0000000..8dda080 --- /dev/null +++ b/app/normalize/migrations/0001_initial.py @@ -0,0 +1,26 @@ +# Generated by Django 2.1.7 on 2019-09-17 17:54 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('contenttypes', '0002_remove_content_type_name'), + ] + + operations = [ + migrations.CreateModel( + name='RelatedPost', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('entry_id', models.IntegerField()), + ('title', models.CharField(max_length=200)), + ('slug', models.CharField(max_length=50)), + ('model_name', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='contenttypes.ContentType')), + ], + ), + ] diff --git a/app/normalize/migrations/__init__.py b/app/normalize/migrations/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/normalize/migrations/__init__.py diff --git a/app/normalize/models.py b/app/normalize/models.py new file mode 100644 index 0000000..ac36512 --- /dev/null +++ b/app/normalize/models.py @@ -0,0 +1,12 @@ +from django.db import models +from django.contrib.contenttypes.models import ContentType + + +class RelatedPost(models.Model): + model_name = models.ForeignKey(ContentType, null=True, on_delete=models.SET_NULL) + entry_id = models.IntegerField() + title = models.CharField(max_length=200) + slug = models.CharField(max_length=50) + + def __str__(self): + return self.title |