feat: add api

This commit is contained in:
Herculino Trotta
2024-10-09 22:30:48 -03:00
parent 520645b752
commit a918b4ae7c
3 changed files with 14 additions and 3 deletions

View File

@@ -17,13 +17,24 @@ Including another URLconf
from django.contrib import admin
from django.urls import path, include
from drf_spectacular.views import (
SpectacularAPIView,
SpectacularSwaggerView,
)
urlpatterns = [
path("admin/", admin.site.urls),
path("hijack/", include("hijack.urls")),
path("__debug__/", include("debug_toolbar.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.common.urls")),
path("", include("apps.users.urls")),

View File

@@ -4,6 +4,7 @@ from . import views
urlpatterns = [
path("monthly/", views.index, name="monthly_index"),
path("", views.index, name="monthly_index"),
path(
"monthly/<int:month>/<int:year>/transactions/list/",
views.transactions_list,

View File

@@ -1,6 +1,5 @@
from django.urls import path
from . import views
import apps.transactions.views as views
urlpatterns = [
path(