Using a template with parameters.

From MyWiki
Revision as of 14:05, 19 March 2021 by George2 (Talk | contribs)

Jump to: navigation, search

Let us modify the views.py from the hello app on line 3
In the hellos application views.py file edit the greet function to look like below:

def greet(request, name):
    return render(request, "hello/greet.html", {
             "name": name.capitalize()
    })