Browse Source

added rest api key module

Apostol Mihai 2 năm trước cách đây
mục cha
commit
a9b7d42638
5 tập tin đã thay đổi với 6 bổ sung6 xóa
  1. 1 1
      .gitignore
  2. 1 1
      elo_api/api_src/serializers.py
  3. BIN
      elo_api/db.sqlite3
  4. 4 4
      elo_api/elo_api/urls.py
  5. BIN
      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):

BIN
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,

BIN
requirements.txt