aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-09-23 15:17:09 +0200
committerGravatar Johannes Christ <[email protected]>2018-09-23 15:17:09 +0200
commita6ff19ee302cde67b7941f06b47de998a61655d9 (patch)
treef9c01cdf48bc3203847c80f8550fb6b6ff83342b
parentAdd `__str__` to all API models. (diff)
parentAdd the `Tag` model. (diff)
Merge branch 'django+add-tags-api' into django
-rw-r--r--api/migrations/0006_tag.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/api/migrations/0006_tag.py b/api/migrations/0006_tag.py
new file mode 100644
index 00000000..903f334e
--- /dev/null
+++ b/api/migrations/0006_tag.py
@@ -0,0 +1,25 @@
+# Generated by Django 2.1.1 on 2018-09-01 21:20
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('api', '0005_user'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Tag',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('title', models.CharField(help_text='The title of this tag, displayed in the Embed.', max_length=256, unique=True)),
+ ('content', models.CharField(help_text='The content of this tag, displayed in the Embed.', max_length=2048)),
+ ('image_url', models.URLField(help_text='An optional image to display in the tag embed.', null=True)),
+ ('thumbnail_url', models.URLField(help_text='An optional thumbnail to display in the tag embed.', null=True)),
+ ('author', models.ForeignKey(help_text='The user that originally created this tag.', on_delete=django.db.models.deletion.CASCADE, to='api.Member')),
+ ],
+ ),
+ ]