mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-10 23:02:47 +02:00
feat: add api
This commit is contained in:
+12
-1
@@ -17,13 +17,24 @@ Including another URLconf
|
|||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
from drf_spectacular.views import (
|
||||||
|
SpectacularAPIView,
|
||||||
|
SpectacularSwaggerView,
|
||||||
|
)
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("hijack/", include("hijack.urls")),
|
path("hijack/", include("hijack.urls")),
|
||||||
path("__debug__/", include("debug_toolbar.urls")),
|
path("__debug__/", include("debug_toolbar.urls")),
|
||||||
path("__reload__/", include("django_browser_reload.urls")),
|
path("__reload__/", include("django_browser_reload.urls")),
|
||||||
path("api/", include("rest_framework.urls")),
|
# path("api/", include("rest_framework.urls")),
|
||||||
|
path("api/", include("apps.api.urls")),
|
||||||
|
path("api/schema/", SpectacularAPIView.as_view(), name="schema"),
|
||||||
|
path(
|
||||||
|
"api/docs/",
|
||||||
|
SpectacularSwaggerView.as_view(url_name="schema"),
|
||||||
|
name="swagger-ui",
|
||||||
|
),
|
||||||
path("", include("apps.transactions.urls")),
|
path("", include("apps.transactions.urls")),
|
||||||
path("", include("apps.common.urls")),
|
path("", include("apps.common.urls")),
|
||||||
path("", include("apps.users.urls")),
|
path("", include("apps.users.urls")),
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from . import views
|
|||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("monthly/", views.index, name="monthly_index"),
|
path("monthly/", views.index, name="monthly_index"),
|
||||||
|
path("", views.index, name="monthly_index"),
|
||||||
path(
|
path(
|
||||||
"monthly/<int:month>/<int:year>/transactions/list/",
|
"monthly/<int:month>/<int:year>/transactions/list/",
|
||||||
views.transactions_list,
|
views.transactions_list,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
import apps.transactions.views as views
|
||||||
from . import views
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path(
|
path(
|
||||||
|
|||||||
Reference in New Issue
Block a user