Complete the code to include the app URLs with a namespace in the main urls.py.
path('blog/', include(('blog.urls', '[1]'))),
The namespace argument defines the URL namespace for the included app URLs.
Complete the app's urls.py to define the app_name for namespacing.
app_name = '[1]'
The app_name variable sets the namespace label for the app's URLs.
Fix the error in reversing a namespaced URL in a Django template.
{% url '[1]:post_detail' post.id %}The namespace 'blog' must be used before the URL name to reverse correctly.
Fill both blanks to include app URLs with namespace and set app_name in app urls.py.
path('shop/', include(('shop.urls', '[1]'))) app_name = '[2]'
Both the namespace in include() and the app_name in app urls.py should match the app's name.
Fill all three blanks to correctly namespace URLs and reverse a URL in a Django view.
urlpatterns = [
path('', views.index, name='[1]'),
]
app_name = '[2]'
url = reverse('[3]:index')The URL name is 'index', the app_name is 'blog', and the reverse uses 'blog:index'.