This commit is contained in:
jain
2023-06-27 17:27:19 +05:30
parent 8ff142ce2f
commit ad582d77d7
50 changed files with 0 additions and 0 deletions

17
base/routers.py Normal file
View File

@ -0,0 +1,17 @@
"""
Custom routers for job sourcing .
"""
# third party imports
from rest_framework.routers import DefaultRouter
class OptionalSlashRouter(DefaultRouter):
"""
optional slash router class
"""
def __init__(self):
"""
explicitly appending '/' in urls if '/' doesn't exists for making common url patterns .
"""
super(OptionalSlashRouter, self).__init__()
self.trailing_slash = '/?'