Skip to content

Commit

Permalink
added rest framework settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bugraahmetcaglar committed Apr 7, 2024
1 parent a6e4fb9 commit ea7456f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions skillforge/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@

LOCAL_APPS = [
"core.blog",
"core.question",
"core.support",
# "core.question",
# "core.support",
"core.user",
"core.video",
# "core.video",
]

if DEBUG:
Expand Down Expand Up @@ -292,6 +292,26 @@
"SECURITY_DEFINITIONS": {"api_key": {"type": "apiKey", "in": "header", "name": "Authorization"}},
}

REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
"PAGE_SIZE": 10,
"DEFAULT_RENDERER_CLASSES": [
"rest_framework.renderers.JSONRenderer",
],
"DEFAULT_PARSER_CLASSES": [
"rest_framework.parsers.JSONParser",
],
"DEFAULT_PERMISSION_CLASSES": [
"rest_framework.permissions.IsAdminUser",
],
"DEFAULT_AUTHENTICATION_CLASSES": [
"rest_framework_jwt.authentication.JSONWebTokenAuthentication",
"rest_framework.authentication.BasicAuthentication",
"rest_framework.authentication.SessionAuthentication",
"rest_framework.authentication.TokenAuthentication",
],
}

JWT_AUTH = {
"JWT_ENCODE_HANDLER": "rest_framework_jwt.utils.jwt_encode_handler",
"JWT_DECODE_HANDLER": "rest_framework_jwt.utils.jwt_decode_handler",
Expand Down
Empty file removed tests/conftest.py
Empty file.

0 comments on commit ea7456f

Please sign in to comment.