<html>
<head>
</head>
<body>
    {% if age > 18 %}
    <h1>Eligible to vote</h1>
    {% else%}
    <h1>Not eligible to vote</h1>
    {% endif %}
</body>
</html>









from django.http  import HttpResponse
from django.shortcuts import render

# Create your views here.
def home(request):
    return render(request, "FirstTemplate.html",{"age":17})    










Posted By  -  Karan Gupta
 
Posted On  -  Friday, June 14, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250