mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 01:55:21 +00:00
changes
This commit is contained in:
17
base/routers.py
Normal file
17
base/routers.py
Normal 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 = '/?'
|
Reference in New Issue
Block a user