目录结构大致如下所示

    1. /apps
    2. /api
    3. /urls.py
    4. /domain
    5. /views.py
    6. /host
    7. /vies.py
    8. /SecurityAssert
    9. /urls.py

    :::info /SecuirtyAssert/urls.py :::

    1. from django.urls import path, include
    2. urlpatterns = [
    3. path('api/', include('apps.api.urls')),
    4. ]

    :::info /apps/api/urls.py :::

    1. from apps.domain import views as domain_views
    2. from apps.host import views as host_views
    3. urlpatterns = [
    4. path('domains/', domain_views.DomainList.as_views()),
    5. path('domains/<int:pk>/', domain_views.DomanDetails.as_views()),
    6. path('hosts/', host_views.HostList.as_views()),
    7. path('hosts/<int:pk>/', host_views.HostDetails.as_views()),
    8. ]