title: Print the values of a model in a form and edit them Django
body: <p>Started of learning Django python a week or two ago, so please keep this in mind.</p>
  
  <p>What I want is for data to be displayed in forms and it will be edited with in the same forms, for example:</p>
  
  <p><a href="http://i.stack.imgur.com/qyXCP.png" rel="nofollow">enter image description here</a></p>
  
  <p>Where it says:
  First Name
  Last Name
  email</p>
  
  <p>I would like it to pull the data from the database and have it written out inside of forms.</p>
  
  <p>First Name Kevin
  Last Name Clark
  email Kevin.clark@gmail.com</p>
  
  <p>and so on for each entry.
  Like it is written down bellow where it says you created these.
  So one editing form with values written out for each set of entry's.</p>
  
  <p>I hope that I have managed to pose a clear question and I do not believe to the best of my knowledge that it is a duplicate, if it is I am so sorry.</p>
  
  <p>OS:Fedora
  IDE:Eclipse
  Django Python</p>
  
  <p>views.py</p>
  
  <pre><code>def edit(request):
      instance = New.objects.all()
      data = { "firstName" : "Clark",
                    "lastName": "Kevin"}
      form = NewForm(request.POST) #instance=instance)
      print form.instance.firstName
  
      if(form.is_valid()):
          instance = form.save(commit=False)
          instance.save()
  
      context = {
                 "object_list" : instance,
                 "formset" : form,
                 "instance" : instance
      }
  
      return render(request, "secondTry/new.html", context)
  </code></pre>
  
  <p>models.py</p>
  
  <pre><code>class New(models.Model):
  firstName = models.CharField(max_length=50, null=True)
  lastName = models.CharField(max_length=50, null=True)
  email = models.EmailField()
  timestamp = models.DateTimeField(auto_now_add=True, auto_now=False)
  updated = models.DateTimeField(auto_now_add=False, auto_now=True)
  </code></pre>
  
  <p>forms.py</p>
  
  <pre><code>class NewForm(ModelForm):
  class Meta:
      model = New
      fields = [
                "firstName", 
                "lastName", 
                "email"
                ]
  </code></pre>
  
  <p>html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
  
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;h1&gt;Create a New One&lt;/h1&gt;
              &lt;form method='post' action=""&gt; {% csrf_token %}
                  &lt;table&gt;
                      {{ formset }}
                  &lt;/table&gt;
                  &lt;input type='submit' value="Submit"&gt;
              &lt;/form&gt;
  
              {{ instance }} {% csrf_token %}
  
              &lt;h2&gt;You Created These&lt;/h2&gt;
              {% for obj in object_list %}
                      {{ obj.firstName }} 
                      {{ obj.lastName }} 
                      {{ obj.email }} &lt;br/&gt;&lt;br/&gt;
                  {% endfor %}
  
  
  
  
  
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Note, I am not using all the variables in def edit as I am going back and forth trying to figure this out so it might be a bit messy. </p>
  
  <p>Thank you all so much for your time.</p>