mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 21:59:40 +00:00
Compare commits
9 Commits
sprint6-bu
...
ZBKBCK-49
Author | SHA1 | Date | |
---|---|---|---|
a211baa10a | |||
ec585d35f3 | |||
d62efa2139 | |||
e1ef289c69 | |||
a262b03292 | |||
f7624bc1e7 | |||
a80f9db557 | |||
16d823f97d | |||
3dae22a870 |
@ -1,7 +1,7 @@
|
||||
{% extends "templated_email/email_base.email" %}
|
||||
|
||||
{% block subject %}
|
||||
Support Mail
|
||||
{{subject}}
|
||||
{% endblock %}
|
||||
|
||||
{% block plain %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""Account utils"""
|
||||
from celery import shared_task
|
||||
import random
|
||||
|
||||
"""Import django"""
|
||||
from django.conf import settings
|
||||
from rest_framework import viewsets, status
|
||||
@ -167,7 +167,7 @@ def user_device_details(user, device_id):
|
||||
return False
|
||||
|
||||
|
||||
def send_support_email(name, sender, message):
|
||||
def send_support_email(name, sender, subject, message):
|
||||
"""Send otp on email with template"""
|
||||
to_email = [settings.EMAIL_FROM_ADDRESS]
|
||||
from_email = settings.DEFAULT_ADDRESS
|
||||
@ -179,19 +179,19 @@ def send_support_email(name, sender, message):
|
||||
context={
|
||||
'name': name.title(),
|
||||
'sender': sender,
|
||||
'subject': subject,
|
||||
'message': message
|
||||
}
|
||||
)
|
||||
return name
|
||||
|
||||
|
||||
def custom_response(detail, data=None, total_pages=None, current_page=None, response_status=status.HTTP_200_OK, count=None):
|
||||
def custom_response(detail, data=None, response_status=status.HTTP_200_OK, count=None):
|
||||
"""Custom response code"""
|
||||
if not data:
|
||||
"""when data is none"""
|
||||
data = None
|
||||
return Response({"data": data, "message": detail, "total_pages":total_pages, "current_page":current_page,
|
||||
"status": "success", "code": response_status, "count": count})
|
||||
return Response({"data": data, "message": detail, "status": "success", "code": response_status, "count": count})
|
||||
|
||||
|
||||
def custom_error_response(detail, response_status):
|
||||
@ -288,36 +288,3 @@ def get_user_full_name(user_obj):
|
||||
to get user's full name
|
||||
"""
|
||||
return f"{user_obj.first_name} {user_obj.last_name}" if user_obj.first_name or user_obj.last_name else "User"
|
||||
|
||||
def make_special_password(length=10):
|
||||
# Define character sets
|
||||
lowercase_letters = string.ascii_lowercase
|
||||
uppercase_letters = string.ascii_uppercase
|
||||
digits = string.digits
|
||||
special_characters = '!@#$%^&*()_-+=<>?/[]{}|'
|
||||
|
||||
# Combine character sets
|
||||
all_characters = lowercase_letters + uppercase_letters + digits + special_characters
|
||||
|
||||
# Create a password with random characters
|
||||
password = (
|
||||
random.choice(lowercase_letters) +
|
||||
random.choice(uppercase_letters) +
|
||||
random.choice(digits) +
|
||||
random.choice(special_characters) +
|
||||
''.join(random.choice(all_characters) for _ in range(length - 4))
|
||||
)
|
||||
|
||||
# Shuffle the characters to make it more random
|
||||
password_list = list(password)
|
||||
random.shuffle(password_list)
|
||||
return ''.join(password_list)
|
||||
|
||||
def task_status_fun(status_value):
|
||||
"""task status"""
|
||||
task_status_value = ['1']
|
||||
if str(status_value) == '2':
|
||||
task_status_value = ['2', '4']
|
||||
elif str(status_value) == '3':
|
||||
task_status_value = ['3', '5', '6']
|
||||
return task_status_value
|
||||
|
@ -689,10 +689,11 @@ class SendSupportEmail(views.APIView):
|
||||
def post(self, request):
|
||||
name = request.data.get('name')
|
||||
sender = request.data.get('email')
|
||||
subject = request.data.get('subject')
|
||||
message = request.data.get('message')
|
||||
if name and sender and message:
|
||||
if name and sender and subject and message:
|
||||
try:
|
||||
send_support_email(name, sender, message)
|
||||
send_support_email(name, sender, subject, message)
|
||||
return custom_response(SUCCESS_CODE['3019'], response_status=status.HTTP_200_OK)
|
||||
except Exception as e:
|
||||
return custom_error_response(str(e), response_status=status.HTTP_400_BAD_REQUEST)
|
||||
|
@ -111,10 +111,7 @@ ERROR_CODE = {
|
||||
"2080": "Can not add App version",
|
||||
"2081": "A junior can only be associated with a maximum of 3 guardian",
|
||||
# guardian code not exist
|
||||
"2082": "Guardian code does not exist",
|
||||
"2083": "You can not start this task because guardian is not associate with you",
|
||||
"2084": "You can not complete this task because guardian is not associate with you",
|
||||
"2085": "You can not take action on this task because junior is not associate with you"
|
||||
"2082": "Guardian code does not exist"
|
||||
|
||||
}
|
||||
"""Success message code"""
|
||||
|
46
base/pagination.py
Normal file
46
base/pagination.py
Normal file
@ -0,0 +1,46 @@
|
||||
"""
|
||||
web_admin pagination file
|
||||
"""
|
||||
# third party imports
|
||||
from collections import OrderedDict
|
||||
from rest_framework.pagination import PageNumberPagination
|
||||
|
||||
from account.utils import custom_response
|
||||
from base.constants import NUMBER
|
||||
|
||||
|
||||
class CustomPageNumberPagination(PageNumberPagination):
|
||||
"""
|
||||
custom paginator class
|
||||
"""
|
||||
# Set the desired page size
|
||||
page_size = NUMBER['ten']
|
||||
page_size_query_param = 'page_size'
|
||||
# Set a maximum page size if needed
|
||||
max_page_size = NUMBER['hundred']
|
||||
|
||||
def get_paginated_response(self, data):
|
||||
"""
|
||||
:param data: queryset to be paginated
|
||||
:return: return a OrderedDict
|
||||
"""
|
||||
return custom_response(None, OrderedDict([
|
||||
('count', self.page.paginator.count),
|
||||
('data', data),
|
||||
('current_page', self.page.number),
|
||||
('total_pages', self.page.paginator.num_pages),
|
||||
|
||||
|
||||
]))
|
||||
|
||||
def get_paginated_dict_response(self, data):
|
||||
"""
|
||||
:param data: queryset to be paginated
|
||||
:return: return a simple dict obj
|
||||
"""
|
||||
return {
|
||||
'count': self.page.paginator.count,
|
||||
'data': data,
|
||||
'current_page': self.page.number,
|
||||
'total_pages': self.page.paginator.num_pages,
|
||||
}
|
@ -237,7 +237,6 @@ class TaskSerializer(serializers.ModelSerializer):
|
||||
tasks_created = []
|
||||
|
||||
for junior_id in junior_data:
|
||||
# create task
|
||||
task_data = validated_data.copy()
|
||||
task_data['guardian'] = guardian
|
||||
task_data['default_image'] = images
|
||||
|
@ -1,5 +1,4 @@
|
||||
"""Views of Guardian"""
|
||||
import math
|
||||
|
||||
# django imports
|
||||
# Import IsAuthenticated
|
||||
@ -37,7 +36,7 @@ from .models import Guardian, JuniorTask
|
||||
from junior.models import Junior, JuniorPoints, JuniorGuardianRelationship
|
||||
from account.models import UserEmailOtp, UserNotification, UserDeviceDetails
|
||||
from .tasks import generate_otp
|
||||
from account.utils import custom_response, custom_error_response, send_otp_email, task_status_fun
|
||||
from account.utils import custom_response, custom_error_response, OTP_EXPIRY, send_otp_email
|
||||
from base.messages import ERROR_CODE, SUCCESS_CODE
|
||||
from base.constants import NUMBER, GUARDIAN_CODE_STATUS, GUARDIAN
|
||||
from .utils import upload_image_to_alibaba
|
||||
@ -136,8 +135,7 @@ class TaskListAPIView(viewsets.ModelViewSet):
|
||||
Params
|
||||
status
|
||||
search
|
||||
page
|
||||
junior"""
|
||||
page"""
|
||||
serializer_class = TaskDetailsSerializer
|
||||
permission_classes = [IsAuthenticated]
|
||||
filter_backends = (SearchFilter,)
|
||||
@ -156,23 +154,15 @@ class TaskListAPIView(viewsets.ModelViewSet):
|
||||
def list(self, request, *args, **kwargs):
|
||||
"""Create guardian profile"""
|
||||
status_value = self.request.GET.get('status')
|
||||
current_page = self.request.GET.get('page')
|
||||
junior = self.request.GET.get('junior')
|
||||
queryset = self.get_queryset()
|
||||
task_status = task_status_fun(status_value)
|
||||
if status_value and not junior:
|
||||
queryset = queryset.filter(task_status__in=task_status)
|
||||
elif status_value and junior:
|
||||
queryset = queryset.filter(task_status__in=task_status,junior=int(junior))
|
||||
if status_value and status_value != '0':
|
||||
queryset = queryset.filter(task_status=status_value)
|
||||
paginator = self.pagination_class()
|
||||
total_count = len(queryset)
|
||||
total_pages = math.ceil(total_count/10)
|
||||
# use Pagination
|
||||
paginated_queryset = paginator.paginate_queryset(queryset, request)
|
||||
# use TaskDetailsSerializer serializer
|
||||
serializer = self.serializer_class(paginated_queryset, many=True)
|
||||
return custom_response(None, serializer.data, total_pages=total_pages, current_page=current_page,
|
||||
response_status=status.HTTP_200_OK)
|
||||
return custom_response(None, serializer.data, response_status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
class CreateTaskAPIView(viewsets.ModelViewSet):
|
||||
@ -208,8 +198,7 @@ class CreateTaskAPIView(viewsets.ModelViewSet):
|
||||
else:
|
||||
filename = f"images/{image}"
|
||||
if image and image.size == NUMBER['zero']:
|
||||
return custom_error_response(ERROR_CODE['2035'],
|
||||
response_status=status.HTTP_400_BAD_REQUEST)
|
||||
return custom_error_response(ERROR_CODE['2035'], response_status=status.HTTP_400_BAD_REQUEST)
|
||||
image_url = upload_image_to_alibaba(image, filename)
|
||||
image_data = image_url
|
||||
data.pop('default_image')
|
||||
@ -358,8 +347,6 @@ class ApproveTaskAPIView(viewsets.ModelViewSet):
|
||||
task_queryset = JuniorTask.objects.filter(id=self.request.data.get('task_id'),
|
||||
guardian=guardian,
|
||||
junior=self.request.data.get('junior_id')).last()
|
||||
if task_queryset and guardian.guardian_code not in task_queryset.junior.guardian_code:
|
||||
return custom_error_response(ERROR_CODE['2084'], response_status=status.HTTP_400_BAD_REQUEST)
|
||||
if task_queryset and (task_queryset.junior.is_deleted or not task_queryset.junior.is_active):
|
||||
return custom_error_response(ERROR_CODE['2072'], response_status=status.HTTP_400_BAD_REQUEST)
|
||||
# use ApproveJuniorSerializer serializer
|
||||
|
@ -11,7 +11,7 @@ from django.utils import timezone
|
||||
from rest_framework_simplejwt.tokens import RefreshToken
|
||||
|
||||
# local imports
|
||||
from account.utils import send_otp_email, generate_code, make_special_password
|
||||
from account.utils import send_otp_email, generate_code
|
||||
from junior.models import Junior, JuniorPoints, JuniorGuardianRelationship, JuniorArticlePoints, FAQ
|
||||
from guardian.tasks import generate_otp
|
||||
from base.messages import ERROR_CODE, SUCCESS_CODE
|
||||
@ -297,8 +297,8 @@ class AddJuniorSerializer(serializers.ModelSerializer):
|
||||
user_data = User.objects.create(username=email, email=email,
|
||||
first_name=self.context['first_name'],
|
||||
last_name=self.context['last_name'])
|
||||
special_password = make_special_password()
|
||||
user_data.set_password(special_password)
|
||||
password = User.objects.make_random_password()
|
||||
user_data.set_password(password)
|
||||
user_data.save()
|
||||
junior_data = Junior.objects.create(auth=user_data, gender=validated_data.get('gender'),
|
||||
image=profile_image,
|
||||
@ -321,7 +321,7 @@ class AddJuniorSerializer(serializers.ModelSerializer):
|
||||
# add push notification
|
||||
UserNotification.objects.get_or_create(user=user_data)
|
||||
"""Notification email"""
|
||||
junior_notification_email.delay(email, full_name, email, special_password)
|
||||
junior_notification_email.delay(email, full_name, email, password)
|
||||
# push notification
|
||||
send_notification.delay(ASSOCIATE_JUNIOR, None, None, junior_data.auth.id, {})
|
||||
return junior_data
|
||||
|
@ -12,7 +12,6 @@ import datetime
|
||||
import requests
|
||||
|
||||
from rest_framework.viewsets import GenericViewSet, mixins
|
||||
import math
|
||||
"""Django app import"""
|
||||
from drf_yasg.utils import swagger_auto_schema
|
||||
from drf_yasg import openapi
|
||||
@ -44,7 +43,7 @@ from guardian.models import Guardian, JuniorTask
|
||||
from guardian.serializers import TaskDetailsSerializer, TaskDetailsjuniorSerializer
|
||||
from base.messages import ERROR_CODE, SUCCESS_CODE
|
||||
from base.constants import NUMBER, ARTICLE_STATUS, none, GUARDIAN
|
||||
from account.utils import custom_response, custom_error_response, task_status_fun
|
||||
from account.utils import custom_response, custom_error_response
|
||||
from guardian.utils import upload_image_to_alibaba
|
||||
from .utils import update_positions_based_on_points
|
||||
from notifications.utils import send_notification
|
||||
@ -367,20 +366,15 @@ class JuniorTaskListAPIView(viewsets.ModelViewSet):
|
||||
page=1"""
|
||||
try:
|
||||
status_value = self.request.GET.get('status')
|
||||
current_page = self.request.GET.get('page')
|
||||
queryset = self.get_queryset()
|
||||
task_status = task_status_fun(status_value)
|
||||
if status_value:
|
||||
queryset = queryset.filter(task_status__in=task_status)
|
||||
if status_value and status_value != '0':
|
||||
queryset = queryset.filter(task_status=status_value)
|
||||
paginator = self.pagination_class()
|
||||
total_count = len(queryset)
|
||||
total_pages = math.ceil(total_count / 10)
|
||||
# use Pagination
|
||||
paginated_queryset = paginator.paginate_queryset(queryset, request)
|
||||
# use TaskDetails juniorSerializer serializer
|
||||
serializer = self.serializer_class(paginated_queryset, many=True)
|
||||
return custom_response(None, serializer.data, total_pages=total_pages, current_page=current_page,
|
||||
response_status=status.HTTP_200_OK)
|
||||
return custom_response(None, serializer.data, response_status=status.HTTP_200_OK)
|
||||
except Exception as e:
|
||||
return custom_error_response(str(e), response_status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
@ -409,12 +403,10 @@ class CompleteJuniorTaskAPIView(views.APIView):
|
||||
task_queryset = JuniorTask.objects.filter(id=task_id, junior__auth__email=self.request.user
|
||||
).select_related('guardian', 'junior').last()
|
||||
if task_queryset:
|
||||
if task_queryset.guardian.guardian_code not in task_queryset.junior.guardian_code:
|
||||
return custom_error_response(ERROR_CODE['2085'], response_status=status.HTTP_400_BAD_REQUEST)
|
||||
elif task_queryset.junior.is_deleted or not task_queryset.junior.is_active:
|
||||
if task_queryset.junior.is_deleted or not task_queryset.junior.is_active:
|
||||
return custom_error_response(ERROR_CODE['2074'], response_status=status.HTTP_400_BAD_REQUEST)
|
||||
# use CompleteTaskSerializer serializer
|
||||
elif task_queryset.task_status in [str(NUMBER['four']), str(NUMBER['five'])]:
|
||||
if task_queryset.task_status in [str(NUMBER['four']), str(NUMBER['five'])]:
|
||||
"""Already request send """
|
||||
return custom_error_response(ERROR_CODE['2049'], response_status=status.HTTP_400_BAD_REQUEST)
|
||||
serializer = CompleteTaskSerializer(task_queryset, data={'image': image_url}, partial=True)
|
||||
@ -519,10 +511,7 @@ class StartTaskAPIView(views.APIView):
|
||||
try:
|
||||
task_id = self.request.data.get('task_id')
|
||||
task_queryset = JuniorTask.objects.filter(id=task_id, junior__auth__email=self.request.user).last()
|
||||
print("task_queryset==>",task_queryset)
|
||||
if task_queryset and task_queryset.task_status == str(NUMBER['one']):
|
||||
if task_queryset.guardian.guardian_code not in task_queryset.junior.guardian_code:
|
||||
return custom_error_response(ERROR_CODE['2083'], response_status=status.HTTP_400_BAD_REQUEST)
|
||||
# use StartTaskSerializer serializer
|
||||
serializer = StartTaskSerializer(task_queryset, data=request.data, partial=True)
|
||||
if serializer.is_valid():
|
||||
|
@ -22,7 +22,7 @@ ARTICLE_REWARD_POINTS = 17
|
||||
REMOVE_JUNIOR = 18
|
||||
|
||||
TEST_NOTIFICATION = 99
|
||||
# notification dictionary
|
||||
|
||||
NOTIFICATION_DICT = {
|
||||
REGISTRATION: {
|
||||
"title": "Successfully registered!",
|
||||
|
@ -11,6 +11,7 @@ from rest_framework import viewsets, status, views
|
||||
# local imports
|
||||
from account.utils import custom_response, custom_error_response
|
||||
from base.messages import SUCCESS_CODE, ERROR_CODE
|
||||
from base.pagination import CustomPageNumberPagination
|
||||
from base.tasks import notify_task_expiry, notify_top_junior
|
||||
from notifications.constants import TEST_NOTIFICATION
|
||||
from notifications.serializers import RegisterDevice, NotificationListSerializer, ReadNotificationSerializer
|
||||
@ -33,10 +34,10 @@ class NotificationViewSet(viewsets.GenericViewSet):
|
||||
"""
|
||||
queryset = Notification.objects.filter(notification_to_id=request.auth.payload['user_id']
|
||||
).select_related('notification_to').order_by('-id')
|
||||
paginator = self.pagination_class()
|
||||
paginator = CustomPageNumberPagination()
|
||||
paginated_queryset = paginator.paginate_queryset(queryset, request)
|
||||
serializer = self.serializer_class(paginated_queryset, many=True)
|
||||
return custom_response(None, serializer.data, count=queryset.count())
|
||||
return paginator.get_paginated_response(serializer.data)
|
||||
|
||||
@action(methods=['post'], detail=False, url_path='device', url_name='device', serializer_class=RegisterDevice)
|
||||
def fcm_registration(self, request):
|
||||
|
@ -1,18 +0,0 @@
|
||||
"""
|
||||
web_admin pagination file
|
||||
"""
|
||||
# third party imports
|
||||
from rest_framework.pagination import PageNumberPagination
|
||||
|
||||
from base.constants import NUMBER
|
||||
|
||||
|
||||
class CustomPageNumberPagination(PageNumberPagination):
|
||||
"""
|
||||
custom paginator class
|
||||
"""
|
||||
# Set the desired page size
|
||||
page_size = NUMBER['ten']
|
||||
page_size_query_param = 'page_size'
|
||||
# Set a maximum page size if needed
|
||||
max_page_size = NUMBER['hundred']
|
@ -81,7 +81,7 @@ class ArticleSerializer(serializers.ModelSerializer):
|
||||
meta class
|
||||
"""
|
||||
model = Article
|
||||
fields = ('id', 'title', 'description', 'article_cards', 'article_survey')
|
||||
fields = ('id', 'title', 'description', 'is_published', 'article_cards', 'article_survey')
|
||||
|
||||
def validate(self, attrs):
|
||||
"""
|
||||
|
@ -23,11 +23,11 @@ from django.http import HttpResponse
|
||||
|
||||
# local imports
|
||||
from account.utils import custom_response, get_user_full_name
|
||||
from base.constants import PENDING, IN_PROGRESS, REJECTED, REQUESTED, COMPLETED, EXPIRED, DATE_FORMAT, TASK_STATUS
|
||||
from base.constants import PENDING, IN_PROGRESS, REJECTED, REQUESTED, COMPLETED, EXPIRED, TASK_STATUS
|
||||
from guardian.models import JuniorTask
|
||||
from guardian.utils import upload_excel_file_to_alibaba
|
||||
from junior.models import JuniorPoints
|
||||
from web_admin.pagination import CustomPageNumberPagination
|
||||
from base.pagination import CustomPageNumberPagination
|
||||
from web_admin.permission import AdminPermission
|
||||
from web_admin.serializers.analytics_serializer import LeaderboardSerializer, UserCSVReportSerializer
|
||||
from web_admin.utils import get_dates
|
||||
|
@ -130,6 +130,22 @@ class ArticleViewSet(GenericViewSet, mixins.CreateModelMixin, mixins.UpdateModel
|
||||
return custom_response(SUCCESS_CODE["3029"])
|
||||
return custom_error_response(ERROR_CODE["2041"], status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
@action(methods=['get'], url_name='status-change', url_path='status-change',
|
||||
detail=True)
|
||||
def article_status_change(self, request, *args, **kwargs):
|
||||
"""
|
||||
article un-publish or publish api method
|
||||
:param request: article id
|
||||
:return: success message
|
||||
"""
|
||||
try:
|
||||
article = Article.objects.filter(id=kwargs['pk']).first()
|
||||
article.is_published = False if article.is_published else True
|
||||
article.save(update_fields=['is_published'])
|
||||
return custom_response(SUCCESS_CODE["3038"])
|
||||
except AttributeError:
|
||||
return custom_error_response(ERROR_CODE["2041"], response_status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
@action(methods=['get'], url_name='remove-card', url_path='remove-card',
|
||||
detail=True)
|
||||
def remove_article_card(self, request, *args, **kwargs):
|
||||
|
@ -37,7 +37,17 @@ SECRET_KEY = os.getenv('SECRET_KEY')
|
||||
DEBUG = os.getenv('DEBUG')
|
||||
|
||||
# cors allow setting
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
CORS_ORIGIN_ALLOW_ALL = False
|
||||
|
||||
# Allow specific origins
|
||||
CORS_ALLOWED_ORIGINS = [
|
||||
"https://dev-api.zodqaapp.com",
|
||||
"https://qa-api.zodqaapp.com",
|
||||
"https://stage-api.zodqaapp.com",
|
||||
# Add more trusted origins as needed
|
||||
]
|
||||
# if DEBUG:
|
||||
# CORS_ALLOWED_ORIGINS += ["http://localhost:3000"]
|
||||
|
||||
# allow all host
|
||||
ALLOWED_HOSTS = ['*']
|
||||
@ -53,7 +63,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
# Add Django rest frame work apps here
|
||||
# Add Django rest framework apps here
|
||||
'django_extensions',
|
||||
'storages',
|
||||
'drf_yasg',
|
||||
|
@ -20,12 +20,11 @@ from django.urls import path, include
|
||||
from drf_yasg import openapi
|
||||
from drf_yasg.views import get_schema_view
|
||||
from django.urls import path
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
schema_view = get_schema_view(openapi.Info(title="Zod Bank API", default_version='v1'), public=True, )
|
||||
|
||||
urlpatterns = [
|
||||
path('apidoc/', schema_view.with_ui('swagger', cache_timeout=None), name='schema-swagger-ui'),
|
||||
path('admin/', admin.site.urls),
|
||||
path('', include(('account.urls', 'account'), namespace='account')),
|
||||
path('', include('guardian.urls')),
|
||||
@ -33,3 +32,6 @@ urlpatterns = [
|
||||
path('', include(('notifications.urls', 'notifications'), namespace='notifications')),
|
||||
path('', include(('web_admin.urls', 'web_admin'), namespace='web_admin')),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += [(path('apidoc/', schema_view.with_ui('swagger', cache_timeout=None), name='schema-swagger-ui'))]
|
||||
|
Reference in New Issue
Block a user