Django template context won't renderWhat is a “slug” in Django?Django - Set Up A Scheduled Job?How do I do a not equal in Django queryset filtering?Does Django scale?How to debug in Django, the good way?Django - what is the difference between render(), render_to_response() and direct_to_template()?How to check Django versiondifferentiate null=True, blank=True in djangoCannot display HTML stringWhy can't I get the alert to show?

Biological Blimps: Propulsion

Creepy dinosaur pc game identification

250 Floor Tower

How can "mimic phobia" be cured or prevented?

Open a doc from terminal, but not by its name

copy and scale one figure (wheel)

Delivering sarcasm

lightning-datatable row number error

How do I color the graph in datavisualization?

Did arcade monitors have same pixel aspect ratio as TV sets?

What is this called? Old film camera viewer?

Reverse int within the 32-bit signed integer range: [−2^31, 2^31 − 1]

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Non-trope happy ending?

Symbol used to indicate indivisibility

Freedom of speech and where it applies

Is there a name for this algorithm to calculate the concentration of a mixture of two solutions containing the same solute?

When were female captains banned from Starfleet?

How should I respond when I lied about my education and the company finds out through background check?

Not using 's' for he/she/it

L1 and Ln cache: when are they written?

Which one is correct as adjective “protruding” or “protruded”?

Can I sign legal documents with a smiley face?

Loading commands from file



Django template context won't render


What is a “slug” in Django?Django - Set Up A Scheduled Job?How do I do a not equal in Django queryset filtering?Does Django scale?How to debug in Django, the good way?Django - what is the difference between render(), render_to_response() and direct_to_template()?How to check Django versiondifferentiate null=True, blank=True in djangoCannot display HTML stringWhy can't I get the alert to show?













0















Hi I am trying to make a form submission app that just displays the entered information back to the user underneath the form they submitted. Unfortunately, I can't seem to load the context on the front end within the template.



Template:



You'll see under the form there is a for loop that is supposed to iterate the context, but nothing displays. I tried it with just email for now, but it does not work.






<!DOCTYPE html>
<html>
<head>
<title>Form Practice</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>

<div class="container">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<form style="margin-top: 600px;" method="post" action="/form">
% csrf_token %
<div class="form-group row">
<label for="inputEmail3" class="col-sm-2 col-form-label" >Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputEmail3" placeholder="Email" name="email">
</div>
</div>
<div class="form-group row">
<label for="inputPassword3" class="col-sm-2 col-form-label" >Password</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="inputPassword3" name="password" placeholder="Password">
</div>
</div>
<fieldset class="form-group">
<div class="row">
<legend class="col-form-label col-sm-2 pt-0">Radios</legend>
<div class="col-sm-10">
<div class="form-check">
<input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked>
<label class="form-check-label" for="gridRadios1">
First radio
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2">
<label class="form-check-label" for="gridRadios2">
Second radio
</label>
</div>

</div>
</div>
</fieldset>

<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck1" name="check">
<label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
</div>
<select class="custom-select mr-sm-2 custom-select-lg mb-3" name="select" id="inlineFormCustomSelect">
<option selected>Choose...</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>

<div class="custom-control custom-radio">
<input type="radio" id="customRadio1" name="customRadio" class="custom-control-input">
<label class="custom-control-label" for="customRadio1">Toggle this custom radio</label>
</div>
<div class="custom-control custom-radio">
<input type="radio" id="customRadio2" name="customRadio" class="custom-control-input">
<label class="custom-control-label" for="customRadio2">Or toggle this other custom radio</label>
</div>

<div class="custom-file">
<input type="file" class="custom-file-input" name="customFile" id="customFile">
<label class="custom-file-label" for="customFile">Choose file</label>
</div>



<button type="submit" class="btn-block btn btn-primary my-1">Submit</button>
</form>
% for item in context %
<h1> item.email </h1>

% endfor %
</div>
<div class="col-md-2"></div>


</div>
</div>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>





views.py



def index(request):
try:
email = request.POST['email']
print(email)

password = request.POST['password']
print(password)

radio = request.POST['gridRadios']
print(radio)

select = request.POST['select']
print(select)
except:
print("error")

context = 'context': 'email': email, 'password': password, 'radio': radio, 'select': select

print(context)

return render(request, 'form.html', context)









share|improve this question


























    0















    Hi I am trying to make a form submission app that just displays the entered information back to the user underneath the form they submitted. Unfortunately, I can't seem to load the context on the front end within the template.



    Template:



    You'll see under the form there is a for loop that is supposed to iterate the context, but nothing displays. I tried it with just email for now, but it does not work.






    <!DOCTYPE html>
    <html>
    <head>
    <title>Form Practice</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    </head>
    <body>

    <div class="container">
    <div class="row">
    <div class="col-md-2"></div>
    <div class="col-md-8">
    <form style="margin-top: 600px;" method="post" action="/form">
    % csrf_token %
    <div class="form-group row">
    <label for="inputEmail3" class="col-sm-2 col-form-label" >Email</label>
    <div class="col-sm-10">
    <input type="email" class="form-control" id="inputEmail3" placeholder="Email" name="email">
    </div>
    </div>
    <div class="form-group row">
    <label for="inputPassword3" class="col-sm-2 col-form-label" >Password</label>
    <div class="col-sm-10">
    <input type="password" class="form-control" id="inputPassword3" name="password" placeholder="Password">
    </div>
    </div>
    <fieldset class="form-group">
    <div class="row">
    <legend class="col-form-label col-sm-2 pt-0">Radios</legend>
    <div class="col-sm-10">
    <div class="form-check">
    <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked>
    <label class="form-check-label" for="gridRadios1">
    First radio
    </label>
    </div>
    <div class="form-check">
    <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2">
    <label class="form-check-label" for="gridRadios2">
    Second radio
    </label>
    </div>

    </div>
    </div>
    </fieldset>

    <div class="custom-control custom-checkbox">
    <input type="checkbox" class="custom-control-input" id="customCheck1" name="check">
    <label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
    </div>
    <select class="custom-select mr-sm-2 custom-select-lg mb-3" name="select" id="inlineFormCustomSelect">
    <option selected>Choose...</option>
    <option value="1">One</option>
    <option value="2">Two</option>
    <option value="3">Three</option>
    </select>

    <div class="custom-control custom-radio">
    <input type="radio" id="customRadio1" name="customRadio" class="custom-control-input">
    <label class="custom-control-label" for="customRadio1">Toggle this custom radio</label>
    </div>
    <div class="custom-control custom-radio">
    <input type="radio" id="customRadio2" name="customRadio" class="custom-control-input">
    <label class="custom-control-label" for="customRadio2">Or toggle this other custom radio</label>
    </div>

    <div class="custom-file">
    <input type="file" class="custom-file-input" name="customFile" id="customFile">
    <label class="custom-file-label" for="customFile">Choose file</label>
    </div>



    <button type="submit" class="btn-block btn btn-primary my-1">Submit</button>
    </form>
    % for item in context %
    <h1> item.email </h1>

    % endfor %
    </div>
    <div class="col-md-2"></div>


    </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
    </body>
    </html>





    views.py



    def index(request):
    try:
    email = request.POST['email']
    print(email)

    password = request.POST['password']
    print(password)

    radio = request.POST['gridRadios']
    print(radio)

    select = request.POST['select']
    print(select)
    except:
    print("error")

    context = 'context': 'email': email, 'password': password, 'radio': radio, 'select': select

    print(context)

    return render(request, 'form.html', context)









    share|improve this question
























      0












      0








      0








      Hi I am trying to make a form submission app that just displays the entered information back to the user underneath the form they submitted. Unfortunately, I can't seem to load the context on the front end within the template.



      Template:



      You'll see under the form there is a for loop that is supposed to iterate the context, but nothing displays. I tried it with just email for now, but it does not work.






      <!DOCTYPE html>
      <html>
      <head>
      <title>Form Practice</title>
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
      </head>
      <body>

      <div class="container">
      <div class="row">
      <div class="col-md-2"></div>
      <div class="col-md-8">
      <form style="margin-top: 600px;" method="post" action="/form">
      % csrf_token %
      <div class="form-group row">
      <label for="inputEmail3" class="col-sm-2 col-form-label" >Email</label>
      <div class="col-sm-10">
      <input type="email" class="form-control" id="inputEmail3" placeholder="Email" name="email">
      </div>
      </div>
      <div class="form-group row">
      <label for="inputPassword3" class="col-sm-2 col-form-label" >Password</label>
      <div class="col-sm-10">
      <input type="password" class="form-control" id="inputPassword3" name="password" placeholder="Password">
      </div>
      </div>
      <fieldset class="form-group">
      <div class="row">
      <legend class="col-form-label col-sm-2 pt-0">Radios</legend>
      <div class="col-sm-10">
      <div class="form-check">
      <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked>
      <label class="form-check-label" for="gridRadios1">
      First radio
      </label>
      </div>
      <div class="form-check">
      <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2">
      <label class="form-check-label" for="gridRadios2">
      Second radio
      </label>
      </div>

      </div>
      </div>
      </fieldset>

      <div class="custom-control custom-checkbox">
      <input type="checkbox" class="custom-control-input" id="customCheck1" name="check">
      <label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
      </div>
      <select class="custom-select mr-sm-2 custom-select-lg mb-3" name="select" id="inlineFormCustomSelect">
      <option selected>Choose...</option>
      <option value="1">One</option>
      <option value="2">Two</option>
      <option value="3">Three</option>
      </select>

      <div class="custom-control custom-radio">
      <input type="radio" id="customRadio1" name="customRadio" class="custom-control-input">
      <label class="custom-control-label" for="customRadio1">Toggle this custom radio</label>
      </div>
      <div class="custom-control custom-radio">
      <input type="radio" id="customRadio2" name="customRadio" class="custom-control-input">
      <label class="custom-control-label" for="customRadio2">Or toggle this other custom radio</label>
      </div>

      <div class="custom-file">
      <input type="file" class="custom-file-input" name="customFile" id="customFile">
      <label class="custom-file-label" for="customFile">Choose file</label>
      </div>



      <button type="submit" class="btn-block btn btn-primary my-1">Submit</button>
      </form>
      % for item in context %
      <h1> item.email </h1>

      % endfor %
      </div>
      <div class="col-md-2"></div>


      </div>
      </div>

      <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
      <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
      </body>
      </html>





      views.py



      def index(request):
      try:
      email = request.POST['email']
      print(email)

      password = request.POST['password']
      print(password)

      radio = request.POST['gridRadios']
      print(radio)

      select = request.POST['select']
      print(select)
      except:
      print("error")

      context = 'context': 'email': email, 'password': password, 'radio': radio, 'select': select

      print(context)

      return render(request, 'form.html', context)









      share|improve this question














      Hi I am trying to make a form submission app that just displays the entered information back to the user underneath the form they submitted. Unfortunately, I can't seem to load the context on the front end within the template.



      Template:



      You'll see under the form there is a for loop that is supposed to iterate the context, but nothing displays. I tried it with just email for now, but it does not work.






      <!DOCTYPE html>
      <html>
      <head>
      <title>Form Practice</title>
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
      </head>
      <body>

      <div class="container">
      <div class="row">
      <div class="col-md-2"></div>
      <div class="col-md-8">
      <form style="margin-top: 600px;" method="post" action="/form">
      % csrf_token %
      <div class="form-group row">
      <label for="inputEmail3" class="col-sm-2 col-form-label" >Email</label>
      <div class="col-sm-10">
      <input type="email" class="form-control" id="inputEmail3" placeholder="Email" name="email">
      </div>
      </div>
      <div class="form-group row">
      <label for="inputPassword3" class="col-sm-2 col-form-label" >Password</label>
      <div class="col-sm-10">
      <input type="password" class="form-control" id="inputPassword3" name="password" placeholder="Password">
      </div>
      </div>
      <fieldset class="form-group">
      <div class="row">
      <legend class="col-form-label col-sm-2 pt-0">Radios</legend>
      <div class="col-sm-10">
      <div class="form-check">
      <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked>
      <label class="form-check-label" for="gridRadios1">
      First radio
      </label>
      </div>
      <div class="form-check">
      <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2">
      <label class="form-check-label" for="gridRadios2">
      Second radio
      </label>
      </div>

      </div>
      </div>
      </fieldset>

      <div class="custom-control custom-checkbox">
      <input type="checkbox" class="custom-control-input" id="customCheck1" name="check">
      <label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
      </div>
      <select class="custom-select mr-sm-2 custom-select-lg mb-3" name="select" id="inlineFormCustomSelect">
      <option selected>Choose...</option>
      <option value="1">One</option>
      <option value="2">Two</option>
      <option value="3">Three</option>
      </select>

      <div class="custom-control custom-radio">
      <input type="radio" id="customRadio1" name="customRadio" class="custom-control-input">
      <label class="custom-control-label" for="customRadio1">Toggle this custom radio</label>
      </div>
      <div class="custom-control custom-radio">
      <input type="radio" id="customRadio2" name="customRadio" class="custom-control-input">
      <label class="custom-control-label" for="customRadio2">Or toggle this other custom radio</label>
      </div>

      <div class="custom-file">
      <input type="file" class="custom-file-input" name="customFile" id="customFile">
      <label class="custom-file-label" for="customFile">Choose file</label>
      </div>



      <button type="submit" class="btn-block btn btn-primary my-1">Submit</button>
      </form>
      % for item in context %
      <h1> item.email </h1>

      % endfor %
      </div>
      <div class="col-md-2"></div>


      </div>
      </div>

      <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
      <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
      </body>
      </html>





      views.py



      def index(request):
      try:
      email = request.POST['email']
      print(email)

      password = request.POST['password']
      print(password)

      radio = request.POST['gridRadios']
      print(radio)

      select = request.POST['select']
      print(select)
      except:
      print("error")

      context = 'context': 'email': email, 'password': password, 'radio': radio, 'select': select

      print(context)

      return render(request, 'form.html', context)





      <!DOCTYPE html>
      <html>
      <head>
      <title>Form Practice</title>
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
      </head>
      <body>

      <div class="container">
      <div class="row">
      <div class="col-md-2"></div>
      <div class="col-md-8">
      <form style="margin-top: 600px;" method="post" action="/form">
      % csrf_token %
      <div class="form-group row">
      <label for="inputEmail3" class="col-sm-2 col-form-label" >Email</label>
      <div class="col-sm-10">
      <input type="email" class="form-control" id="inputEmail3" placeholder="Email" name="email">
      </div>
      </div>
      <div class="form-group row">
      <label for="inputPassword3" class="col-sm-2 col-form-label" >Password</label>
      <div class="col-sm-10">
      <input type="password" class="form-control" id="inputPassword3" name="password" placeholder="Password">
      </div>
      </div>
      <fieldset class="form-group">
      <div class="row">
      <legend class="col-form-label col-sm-2 pt-0">Radios</legend>
      <div class="col-sm-10">
      <div class="form-check">
      <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked>
      <label class="form-check-label" for="gridRadios1">
      First radio
      </label>
      </div>
      <div class="form-check">
      <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2">
      <label class="form-check-label" for="gridRadios2">
      Second radio
      </label>
      </div>

      </div>
      </div>
      </fieldset>

      <div class="custom-control custom-checkbox">
      <input type="checkbox" class="custom-control-input" id="customCheck1" name="check">
      <label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
      </div>
      <select class="custom-select mr-sm-2 custom-select-lg mb-3" name="select" id="inlineFormCustomSelect">
      <option selected>Choose...</option>
      <option value="1">One</option>
      <option value="2">Two</option>
      <option value="3">Three</option>
      </select>

      <div class="custom-control custom-radio">
      <input type="radio" id="customRadio1" name="customRadio" class="custom-control-input">
      <label class="custom-control-label" for="customRadio1">Toggle this custom radio</label>
      </div>
      <div class="custom-control custom-radio">
      <input type="radio" id="customRadio2" name="customRadio" class="custom-control-input">
      <label class="custom-control-label" for="customRadio2">Or toggle this other custom radio</label>
      </div>

      <div class="custom-file">
      <input type="file" class="custom-file-input" name="customFile" id="customFile">
      <label class="custom-file-label" for="customFile">Choose file</label>
      </div>



      <button type="submit" class="btn-block btn btn-primary my-1">Submit</button>
      </form>
      % for item in context %
      <h1> item.email </h1>

      % endfor %
      </div>
      <div class="col-md-2"></div>


      </div>
      </div>

      <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
      <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
      </body>
      </html>





      <!DOCTYPE html>
      <html>
      <head>
      <title>Form Practice</title>
      <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
      </head>
      <body>

      <div class="container">
      <div class="row">
      <div class="col-md-2"></div>
      <div class="col-md-8">
      <form style="margin-top: 600px;" method="post" action="/form">
      % csrf_token %
      <div class="form-group row">
      <label for="inputEmail3" class="col-sm-2 col-form-label" >Email</label>
      <div class="col-sm-10">
      <input type="email" class="form-control" id="inputEmail3" placeholder="Email" name="email">
      </div>
      </div>
      <div class="form-group row">
      <label for="inputPassword3" class="col-sm-2 col-form-label" >Password</label>
      <div class="col-sm-10">
      <input type="password" class="form-control" id="inputPassword3" name="password" placeholder="Password">
      </div>
      </div>
      <fieldset class="form-group">
      <div class="row">
      <legend class="col-form-label col-sm-2 pt-0">Radios</legend>
      <div class="col-sm-10">
      <div class="form-check">
      <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios1" value="option1" checked>
      <label class="form-check-label" for="gridRadios1">
      First radio
      </label>
      </div>
      <div class="form-check">
      <input class="form-check-input" type="radio" name="gridRadios" id="gridRadios2" value="option2">
      <label class="form-check-label" for="gridRadios2">
      Second radio
      </label>
      </div>

      </div>
      </div>
      </fieldset>

      <div class="custom-control custom-checkbox">
      <input type="checkbox" class="custom-control-input" id="customCheck1" name="check">
      <label class="custom-control-label" for="customCheck1">Check this custom checkbox</label>
      </div>
      <select class="custom-select mr-sm-2 custom-select-lg mb-3" name="select" id="inlineFormCustomSelect">
      <option selected>Choose...</option>
      <option value="1">One</option>
      <option value="2">Two</option>
      <option value="3">Three</option>
      </select>

      <div class="custom-control custom-radio">
      <input type="radio" id="customRadio1" name="customRadio" class="custom-control-input">
      <label class="custom-control-label" for="customRadio1">Toggle this custom radio</label>
      </div>
      <div class="custom-control custom-radio">
      <input type="radio" id="customRadio2" name="customRadio" class="custom-control-input">
      <label class="custom-control-label" for="customRadio2">Or toggle this other custom radio</label>
      </div>

      <div class="custom-file">
      <input type="file" class="custom-file-input" name="customFile" id="customFile">
      <label class="custom-file-label" for="customFile">Choose file</label>
      </div>



      <button type="submit" class="btn-block btn btn-primary my-1">Submit</button>
      </form>
      % for item in context %
      <h1> item.email </h1>

      % endfor %
      </div>
      <div class="col-md-2"></div>


      </div>
      </div>

      <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
      <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
      </body>
      </html>






      python django






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 7:42









      Adam HowardAdam Howard

      539




      539






















          1 Answer
          1






          active

          oldest

          votes


















          3














          Replace this:



          % for item in context %
          <h1> item.email </h1>
          % endfor %


          To:



          <h1> context.email </h1>





          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55038487%2fdjango-template-context-wont-render%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            Replace this:



            % for item in context %
            <h1> item.email </h1>
            % endfor %


            To:



            <h1> context.email </h1>





            share|improve this answer



























              3














              Replace this:



              % for item in context %
              <h1> item.email </h1>
              % endfor %


              To:



              <h1> context.email </h1>





              share|improve this answer

























                3












                3








                3







                Replace this:



                % for item in context %
                <h1> item.email </h1>
                % endfor %


                To:



                <h1> context.email </h1>





                share|improve this answer













                Replace this:



                % for item in context %
                <h1> item.email </h1>
                % endfor %


                To:



                <h1> context.email </h1>






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 7 at 7:52









                Waket ZhengWaket Zheng

                60928




                60928





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55038487%2fdjango-template-context-wont-render%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    1928 у кіно

                    Захаров Федір Захарович

                    Ель Греко