瀏覽代碼

added rest api key module

Apostol Mihai 2 年之前
父節點
當前提交
a9b7d42638
共有 5 個文件被更改,包括 6 次插入6 次删除
  1. 1 1
      .gitignore
  2. 1 1
      elo_api/api_src/serializers.py
  3. 二進制
      elo_api/db.sqlite3
  4. 4 4
      elo_api/elo_api/urls.py
  5. 二進制
      requirements.txt

+ 1 - 1
.gitignore

@@ -52,7 +52,7 @@ coverage.xml
 
 # Django stuff:
 *.log
-
+/elo_api/db.sqlite3
 # Sphinx documentation
 docs/_build/
 

+ 1 - 1
elo_api/api_src/serializers.py

@@ -5,7 +5,7 @@ from rest_framework import serializers
 class UserSerializer(serializers.HyperlinkedModelSerializer):
     class Meta:
         model = User
-        fields = ['url', 'username', 'email', 'groups']
+        fields = ['url', 'username', 'first_name', 'last_name','email', 'groups']
 
 
 class GroupSerializer(serializers.HyperlinkedModelSerializer):

二進制
elo_api/db.sqlite3


+ 4 - 4
elo_api/elo_api/urls.py

@@ -24,11 +24,11 @@ from drf_yasg import openapi
 
 schema_view = get_schema_view(
    openapi.Info(
-      title="Snippets API",
+      title="ELO API Definitions",
       default_version='v1',
-      description="Test description",
-      terms_of_service="https://www.google.com/policies/terms/",
-      contact=openapi.Contact(email="contact@snippets.local"),
+      description="Used by ICI Bucharest",
+      #terms_of_service="Used by ICI Bucharest",
+      contact=openapi.Contact(email="mihai.apostol@ici.ro"),
       license=openapi.License(name="BSD License"),
    ),
    public=True,

二進制
requirements.txt