from django.contrib import admin
from django.urls import include, path
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('testprj.testapp.urls')),
]
from django.conf.urls import url
from django.urls import include, path
from . import views
urlpatterns = [
#develop_log : 正規表現はダメらしい
#develop_log : module 'testprj.testapp.views' has no attribute 'index'
#path('', views.index, name='index'),
path('', include('testprj.testapp.views.urls')),
#develop_log : 下記はなくてもいい。下のディレクトリで定義できる
path('app1/', include('testprj.testapp.views.urls')),
]
from django.conf.urls import url
from django.urls import include, path
from . import views, views2
urlpatterns = [
#develop_log : 正規表現はダメらしい
path('', views.index, name='index'),
#develop_log : pathの最後には'/'が必要
path('app2/', views2.index, name='index'),
]