mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-11 07:38:56 +00:00
18 lines
440 B
Python
18 lines
440 B
Python
"""
|
|
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 = '/?'
|