title: How do I get a default value to display in the template with django?
body: <p>I am using a modelform to extend a user's profile.  I would like previously saved data to show up in the form before the user decides to write over it.  How do I do this in the template with django?</p>
  <h1>model</h1>
  <pre><code>class UserProfile(models.Model):
      user = models.ForeignKey(User, primary_key=True)
      quote = models.CharField('About', max_length =  200, null=True, blank=True)
      website = models.URLField('Personal website/blog', null=True, blank=True)
      
  class UserProfileForm(ModelForm):
      class Meta:
          model = UserProfile
          fields = ('quote', 'website')
          widgets = {
              'quote': Textarea(attrs={'cols': 18, 'rows': 7, 'style': &quot;width: 300px;&quot;}),
          }
  </code></pre>
  <h1>view</h1>
  <pre><code>@login_required 
  def user_profile(request):
      user = User.objects.get(pk=request.user.id)
      if request.method == 'POST':
          upform = UserProfileForm(request.POST)
          if upform.is_valid():
              up = upform.save(commit=False)
              up.user = request.user
              up.save()
              return HttpResponseRedirect('/accounts/profile')
      else:
          upform = UserProfileForm()
      return render_to_response('reserve/templates/edit_profile.html', locals(), context_instance=RequestContext(request))
  </code></pre>
  <h1>template</h1>
  <pre><code>{{ upform.as_p}}
  </code></pre>