aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-08-16 21:48:42 +0200
committerGravatar Johannes Christ <[email protected]>2018-08-16 21:48:42 +0200
commit6a18a8dfcf8382b896e28d9bd354196517f654ee (patch)
tree69a1ca363ffeb99ef10afb5dcac399f8f297d5a4
parentAdd a `HealthcheckView`. (diff)
Add the `DocumentationLink` model.
-rw-r--r--api/migrations/0002_documentationlink.py21
-rw-r--r--api/models.py10
2 files changed, 31 insertions, 0 deletions
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)