I have a Django application where, for some reason, I cannot load my URLs without a trailing "/"
I have other Django applications I've made in practice where this hasn't been an issue, and I don't need one when I go to my Admin page, so I can't figure out what's setup wrong here.
Here's my main URLs file:
urlpatterns = [
path('app/', include('app.urls')),
]
Here's my app's URLs file:
urlpatterns = [
path('subapp/', views.subapp, name='subapp'),
]
And my views file:
def subapp(request):
return render(request, 'app/subapp.html', {'title': 'subapp'})
When I enter my URL as "localhost:8000/app/subapp/" it takes me to the correct page.
However, when I enter my URL as "localhost:8000/app/subapp" I get a 404 with the following debug error message: Directory indexes are not allowed here.
What am I doing wrong?