I'm trying to simply give an app url an option of /headless/
to make it show a different template.
My project/urls.py
has:
urlpatterns = [
url(r'^datastore/', include('datastore.urls')),
]
My app/urls.py
has:
app_name = 'datastore'
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^datastore/(?P<headless>"headless"{1})/$', views.index,name='index'),
]
I'm getting a 404 error with the above.
I've also tried:
url(r'^datastore/(?P<headless>"headless"?)/$',
url(r'^datastore/(?P<headless>\w{1})/$', views.index, name='index'),
url(r'^datastore/(?P<headless>\w+)/$', views.index, name='index'),