Django Paths/Routes with Function-Based View Rendering / Urls


Fri Jun 05 2020 23:16:55 GMT+0000 (UTC)

Saved by @_ferasbaig #django

# make sure that you save the file when reloading changes in port 8000
# check the path you defined in, and for

# views
def about(request):
    return render(request, 'about.html')
# urls

urlpatterns [
path('', views.index, name='index'),
path('templates/about.html/', views.about, name="about")

If django does not identify the http request, check the routes you defined in function-based view + urls