encyclopedia/views.py
def entry(request, title):
    """ Function to display all the entries available.""" 

    #Check if the title is present in the entries
    if title in entries: 
        get_md = util.get_entry(title)
        converted_page = markdowner.convert(get_md)

        return render(request, "encyclopedia/entry.html", {
            "converted_page": converted_page,
            "title":title,
        })

    #title not present in entries
    else:
        return render(request, "encyclopedia/error.html", {
            "message": "Sorry, the page you're looking for isn't available."
        })
 Function to display all the entries available.
Function to display all the entries available.
Function to display all the entries available .
def entry(request, title):
    if title in entries: 
        get_md = util.get_entry(title)
        converted_page = markdowner.convert(get_md)
        return render(request, "encyclopedia/entry.html", {
            "converted_page": converted_page,
            "title":title,
        })
    else:
        return render(request, "encyclopedia/error.html", {
            "message": "Sorry, the page you're looking for isn't available."
        })
def entry ( request , title ) : if title in entries : get_md = util . get_entry ( title ) converted_page = markdowner . convert ( get_md ) return render ( request , "encyclopedia/entry.html" , { "converted_page" : converted_page , "title" : title , } ) else : return render ( request , "encyclopedia/error.html" , { "message" : "Sorry, the page you're looking for isn't available." } )
Function to display all the entries available.
Function to display all the entries available .
""" Function to display all the entries available.""" #Check if the title is present in the entries #title not present in entries
request
title