diff --git a/blogapp/urls.py b/blogapp/urls.py index 9621c2b..cb6429d 100644 --- a/blogapp/urls.py +++ b/blogapp/urls.py @@ -13,7 +13,6 @@ # all_blogger_blogs.register('blogs', OwnerBlogListVSet, 'blogs') - comment_router = NestedDefaultRouter(all_blogger_blogs, 'blog', lookup='blog') comment_router.register('comments', CommentVSet, basename='comments') diff --git a/core/settings/common.py b/core/settings/common.py index a32d4d9..ac434ab 100644 --- a/core/settings/common.py +++ b/core/settings/common.py @@ -63,7 +63,14 @@ ROOT_URLCONF = 'core.urls' -SWAGGER_SETTINGS = {"DEFAULT_AUTO_SCHEMA_CLASS": "blogapp.swagger_schema.CustomAutoSchema"} +SWAGGER_SETTINGS = { + "DEFAULT_AUTO_SCHEMA_CLASS": "blogapp.swagger_schema.CustomAutoSchema", + "LOGIN_URL": 'admin/', + "LOGOUT_URL":'admin/logout', + "OPERATIONS_SORTER":'method', + "TAGS_SORTER":'alpha', + "DOC_EXPANSION":"none", +} TEMPLATES = [ { @@ -135,7 +142,9 @@ ), 'DEFAULT_PERMISSION_CLASSES': [ 'rest_framework.permissions.IsAuthenticatedOrReadOnly', - ] + ], + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', + 'PAGE_SIZE': 5, } SIMPLE_JWT = { diff --git a/core/urls.py b/core/urls.py index 817da00..418b1aa 100644 --- a/core/urls.py +++ b/core/urls.py @@ -28,7 +28,12 @@ openapi.Info( title="Blogapp API", default_version='v1', - description="Test description", + description=""" + # This is the `Blogapp API` documentation + + > ### Here all the api routes are grouped by tags + + """, # terms_of_service="https://www.google.com/policies/terms/", # contact=openapi.Contact(email="pritam.chk98@gmail.com"), # license=openapi.License(name="BSD License"), diff --git a/db.sqlite3 b/db.sqlite3 index ad84aa6..fbd151c 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ