feat: migrate parser data to source records
This commit is contained in:
@@ -4,7 +4,6 @@ URL Configuration for the project.
|
||||
The `urlpatterns` list routes URLs to views.
|
||||
"""
|
||||
|
||||
from apps.parsers.views import ParserDashboardPageView
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
@@ -13,12 +12,10 @@ from drf_yasg import openapi
|
||||
from drf_yasg.views import get_schema_view
|
||||
from rest_framework import permissions
|
||||
|
||||
# Swagger schema view
|
||||
schema_view = get_schema_view(
|
||||
openapi.Info(
|
||||
title="Mostovik API",
|
||||
default_version="v1",
|
||||
description="""
|
||||
api_info = openapi.Info(
|
||||
title="Mostovik API",
|
||||
default_version="v1",
|
||||
description="""
|
||||
## API документация для проекта Mostovik
|
||||
|
||||
### Авторизация
|
||||
@@ -33,9 +30,13 @@ schema_view = get_schema_view(
|
||||
API предоставляет только чтение данных (GET, GET list).
|
||||
Добавление и удаление записей происходит через парсеры и админку.
|
||||
""",
|
||||
contact=openapi.Contact(email="contact@mostovik.local"),
|
||||
license=openapi.License(name="BSD License"),
|
||||
),
|
||||
contact=openapi.Contact(email="contact@mostovik.local"),
|
||||
license=openapi.License(name="BSD License"),
|
||||
)
|
||||
|
||||
# Swagger schema view
|
||||
schema_view = get_schema_view(
|
||||
api_info,
|
||||
public=True,
|
||||
permission_classes=(permissions.AllowAny,),
|
||||
)
|
||||
@@ -46,28 +47,6 @@ urlpatterns = [
|
||||
schema_view.with_ui("swagger", cache_timeout=0),
|
||||
name="schema-swagger-ui",
|
||||
),
|
||||
path("dashboard", ParserDashboardPageView.as_view(), name="dashboard"),
|
||||
path("dashboard/", ParserDashboardPageView.as_view(), name="dashboard-slash"),
|
||||
path(
|
||||
"dashboard/<str:source_key>",
|
||||
ParserDashboardPageView.as_view(),
|
||||
name="dashboard-source",
|
||||
),
|
||||
path(
|
||||
"dashboard/<str:source_key>/",
|
||||
ParserDashboardPageView.as_view(),
|
||||
name="dashboard-source-slash",
|
||||
),
|
||||
path(
|
||||
"dashboard/<str:source_key>/<int:item_id>",
|
||||
ParserDashboardPageView.as_view(),
|
||||
name="dashboard-source-item",
|
||||
),
|
||||
path(
|
||||
"dashboard/<str:source_key>/<int:item_id>/",
|
||||
ParserDashboardPageView.as_view(),
|
||||
name="dashboard-source-item-slash",
|
||||
),
|
||||
path("admin/", admin.site.urls),
|
||||
path("health/", include("apps.core.urls")),
|
||||
path("api/v1/", include("core.api_v1_urls", namespace="api_v1")),
|
||||
|
||||
Reference in New Issue
Block a user