mirror of https://github.com/ctk-hq/ctk
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
938 B
Python
25 lines
938 B
Python
from django.urls import include, path
|
|
|
|
from rest_framework_extensions.routers import ExtendedDefaultRouter
|
|
|
|
from .views import project, generate, user, view
|
|
|
|
|
|
class DefaultRouterPlusPlus(ExtendedDefaultRouter):
|
|
"""DefaultRouter with optional trailing slash and drf-extensions nesting."""
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
self.trailing_slash = r"/?"
|
|
|
|
api_urls = [
|
|
path("", view.ViewGenericAPIView.as_view()),
|
|
path("projects/", project.ProjectListCreateAPIView.as_view()),
|
|
path("projects/import/", project.ProjectImportAPIView.as_view()),
|
|
path("projects/<str:uuid>/", project.ProjectGenericAPIView.as_view()),
|
|
path("generate/", generate.GenerateGenericAPIView.as_view()),
|
|
path("auth/self/", user.UserGenericAPIView.as_view()),
|
|
path("auth/", include("dj_rest_auth.urls")),
|
|
path("auth/registration/", include("dj_rest_auth.registration.urls")),
|
|
]
|