|
|
@ -27,6 +27,7 @@ Including another URLconf
|
|
|
|
1. Import the include() function: from django.urls import include, path
|
|
|
|
1. Import the include() function: from django.urls import include, path
|
|
|
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
|
|
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
from django.urls import include, path, re_path
|
|
|
|
from django.urls import include, path, re_path
|
|
|
|
from django.contrib import admin
|
|
|
|
from django.contrib import admin
|
|
|
|
from django.views.generic import TemplateView
|
|
|
|
from django.views.generic import TemplateView
|
|
|
@ -54,3 +55,8 @@ urlpatterns = [
|
|
|
|
path('admin/', admin.site.urls),
|
|
|
|
path('admin/', admin.site.urls),
|
|
|
|
path('', TemplateView.as_view(template_name='success.html')),
|
|
|
|
path('', TemplateView.as_view(template_name='success.html')),
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if settings.DEBUG:
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
|
|
|
|
path('reset/', views.reset, name='reset_debug'),
|
|
|
|
|
|
|
|
] + urlpatterns
|
|
|
|