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

PHOTO EMBED

Fri Jun 05 2020 23:16:55 GMT+0000 (Coordinated Universal Time)

Saved by @_ferasbaig #django

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


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

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

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