From 6a18a8dfcf8382b896e28d9bd354196517f654ee Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Thu, 16 Aug 2018 21:48:42 +0200 Subject: Add the `DocumentationLink` model. --- api/migrations/0002_documentationlink.py | 21 +++++++++++++++++++++ api/models.py | 10 ++++++++++ 2 files changed, 31 insertions(+) create mode 100644 api/migrations/0002_documentationlink.py (limited to 'api') diff --git a/api/migrations/0002_documentationlink.py b/api/migrations/0002_documentationlink.py new file mode 100644 index 00000000..5dee679a --- /dev/null +++ b/api/migrations/0002_documentationlink.py @@ -0,0 +1,21 @@ +# Generated by Django 2.1 on 2018-08-16 19:42 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='DocumentationLink', + fields=[ + ('package', models.CharField(max_length=50, primary_key=True, serialize=False)), + ('base_url', models.URLField()), + ('inventory_url', models.URLField()), + ], + ), + ] diff --git a/api/models.py b/api/models.py index 6d07beff..877e3622 100644 --- a/api/models.py +++ b/api/models.py @@ -1,6 +1,16 @@ from django.db import models +class DocumentationLink(models.Model): + """A documentation link used by the `!docs` command of the bot.""" + + package = models.CharField(primary_key=True, max_length=50) + base_url = models.URLField() + inventory_url = models.URLField() + + class SnakeName(models.Model): + """A snake name used by the bot's snake cog.""" + name = models.CharField(primary_key=True, max_length=100) scientific = models.CharField(max_length=150) -- cgit v1.2.3