diff options
author | 2018-10-20 20:09:22 +0100 | |
---|---|---|
committer | 2018-10-20 20:09:22 +0100 | |
commit | 6b8022b0cbc56fa4137666c3c7a2e488df927e56 (patch) | |
tree | cea1a68c258ce447c71181cf4e5ecbed6aba8216 /api | |
parent | merge conflict thing (diff) |
ficksed gramar and kept imports 2 per line
Diffstat (limited to 'api')
-rw-r--r-- | api/migrations/0011_auto_20181020_1904.py | 18 | ||||
-rw-r--r-- | api/models.py | 2 | ||||
-rw-r--r-- | api/serializers.py | 4 | ||||
-rw-r--r-- | api/viewsets.py | 8 |
4 files changed, 25 insertions, 7 deletions
diff --git a/api/migrations/0011_auto_20181020_1904.py b/api/migrations/0011_auto_20181020_1904.py new file mode 100644 index 00000000..bb5a6325 --- /dev/null +++ b/api/migrations/0011_auto_20181020_1904.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.2 on 2018-10-20 19:04 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0010_snakeidiom'), + ] + + operations = [ + migrations.AlterField( + model_name='snakeidiom', + name='idiom', + field=models.CharField(help_text='A saying about a snake.', max_length=140, primary_key=True, serialize=False), + ), + ] diff --git a/api/models.py b/api/models.py index 81cd63aa..bb520f8c 100644 --- a/api/models.py +++ b/api/models.py @@ -79,7 +79,7 @@ class SnakeIdiom(ModelReprMixin, models.Model): idiom = models.CharField( primary_key=True, max_length=140, - help_text="A snake idiom" + help_text="A saying about a snake." ) def __str__(self): diff --git a/api/serializers.py b/api/serializers.py index fae5abd9..add81335 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -4,8 +4,8 @@ from rest_framework_bulk import BulkSerializerMixin from .models import ( DocumentationLink, Member, OffTopicChannelName, Role, - SnakeFact, SnakeIdiom, SnakeName, - Tag + SnakeFact, SnakeIdiom, + SnakeName, Tag ) diff --git a/api/viewsets.py b/api/viewsets.py index e633c8b7..eef0daa0 100644 --- a/api/viewsets.py +++ b/api/viewsets.py @@ -182,7 +182,7 @@ class SnakeFactViewSet(ListModelMixin, GenericViewSet): ## Routes ### GET /bot/snake-facts - Returns a snake fact in the database. + Returns snake facts from the database. #### Response format >>> [ @@ -203,11 +203,11 @@ class SnakeFactViewSet(ListModelMixin, GenericViewSet): class SnakeIdiomViewSet(ListModelMixin, GenericViewSet): """ - View providing snake idioms for the snake cog. + View providing for the snake cog. ## Routes ### GET /bot/snake-idioms - Returns a snake idiom in the database. + Returns snake idioms from the database. #### Response format >>> [ @@ -217,7 +217,7 @@ class SnakeIdiomViewSet(ListModelMixin, GenericViewSet): #### Status codes - 200: returned on success ## Authentication - Requires and API token + Requires an API token """ serializer_class = SnakeIdiomSerializer |