mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 01:55:21 +00:00
41 lines
1.6 KiB
Python
41 lines
1.6 KiB
Python
""" Urls files"""
|
|
"""Django import"""
|
|
from django.urls import path, include
|
|
from .views import (SignupViewset, UpdateGuardianProfile, AllTaskListAPIView, CreateTaskAPIView, TaskListAPIView,
|
|
SearchTaskListAPIView, TopJuniorListAPIView, ApproveJuniorAPIView)
|
|
"""Third party import"""
|
|
from rest_framework import routers
|
|
|
|
"""Define Router"""
|
|
router = routers.SimpleRouter()
|
|
|
|
# API End points with router
|
|
# in this file
|
|
# we define various api end point
|
|
# that is covered in this guardian
|
|
# section API:- like
|
|
# sign-up, create guardian profile,
|
|
# create-task,
|
|
# all task list, top junior,
|
|
# filter-task"""
|
|
"""Sign up API"""
|
|
router.register('sign-up', SignupViewset, basename='sign-up')
|
|
"""Create guardian profile API"""
|
|
router.register('create-guardian-profile', UpdateGuardianProfile, basename='update-guardian-profile')
|
|
"""Create Task API"""
|
|
router.register('create-task', CreateTaskAPIView, basename='create-task')
|
|
"""All Task list API"""
|
|
router.register('all-task-list', AllTaskListAPIView, basename='all-task-list')
|
|
"""Task list bases on the status API"""
|
|
router.register('task-list', TaskListAPIView, basename='task-list')
|
|
"""Leaderboard API"""
|
|
router.register('top-junior', TopJuniorListAPIView, basename='top-junior')
|
|
"""Search Task list on the bases of status, due date, and task title API"""
|
|
router.register('filter-task', SearchTaskListAPIView, basename='filter-task')
|
|
"""Approve junior API"""
|
|
router.register('approve-junior', ApproveJuniorAPIView, basename='approve-junior')
|
|
"""Define Url pattern"""
|
|
urlpatterns = [
|
|
path('api/v1/', include(router.urls)),
|
|
]
|