0
私は、各アプリケーションで独自のurlパターンを使用して、include /を使ってメインプロジェクト/アプリケーションに組み込むことができます。同じアプリケーションのurlパターンをグループ化することは可能ですか?django
アプリにいくつかの異なるURLがあるのだろうか、それをグループ化する方法はありますか?例えば
urlpatterns = [
url(r'^user/$', hello.asView(),
url(r'^user/hello/$', hello.asView(),
url(r'^user/there/$', hello.asView(),
url(r'^user/here/$', hello.asView(),
url(r'^user/that/$', hello.asView(),
url(r'^user/mini/$', hello.asView(),
url(r'^user/max/$', hello.asView(),
url(r'^bb/$', hello.asView(),
url(r'^bb/hello/$', hello.asView(),
url(r'^bb/there/$', hello.asView(),
url(r'^bb/here/$', hello.asView(),
url(r'^bb/that/$', hello.asView(),
url(r'^bb/mini/$', hello.asView(),
url(r'^bb/max/$', hello.asView(),
]
無視してくださいすべてのhello.asView()
グループ化する方法があります場合、私は疑問に思って、すべてのより多くのURLが存在する場合user
とbb
はそう、私はuser
を入力の上に維持する必要はありません。またはbb
?
ありがとうございました。