我已经创建了一个名为vsdk的目录,其中包括service_development(语音应用程序)和我新创建的名为dashboard的应用程序。不幸的是,我似乎无法使仪表板的主页正常工作。尝试执行127.0.0.1:8000/dashboard/时,同时执行与service_development类似的操作时,出现404错误。
有人可以帮助我吗?
Vsdk \ settings.py
INSTALLED_APPS = [
'vsdk.service_development.apps.ServiceDevelopmentConfig',
'vsdk.dashboard.apps.DashboardConfig',
'storages',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
Vsdk \ dashboard \ apps.py
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class DashboardConfig(AppConfig):
name = 'vsdk.dashboard'
verbose_name = _("Dashboards")
Vsdk \ urls.py
from django.conf.urls import url, include
from django.contrib import admin
from django.conf.urls.static import static
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.urls import include, path
admin.site.site_header = _("Petrichor Rain Service")
urlpatterns = [
url(r'^', admin.site.urls),
url(r'^vxml/', include('vsdk.service_development.urls')),
url(r'^vxml/', include('vsdk.dashboard.urls')),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Vsdk \ dashboard \ urls.py
from django.shortcuts import render
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]