title: ValueError when I'm trying to implement lost password
body: <p>I was playing around with Python, I'm new in Python Language so I'm trying to reset a lost password but I come across ValueError Exception here's my code:</p>
  
  <p>models.py:</p>
  
  <pre><code>def forgot(request):
      if request.method == 'POST':
          try:
              user = User.objects.get(username=request.POST['username'])
              lostpassword = LostPassword.objects.create(user=user, key=new_key())
              message = 'http://%s:%s/lostpassword/change/%s/' % (
                  request.META['SEVER_NAME'],
                  request.META['SEVER_PORT'],
                  lostpassword.key)
          except User.DoesNotExist:
              message = 'Unknown user'
      else:
          message = ''
      return render_to_response('homepage/forgot.html', {'message': message})
  </code></pre>
  
  <p>forms.py:</p>
  
  <pre><code>  class ForgotForm(forms.Form):
        help_string="Your password will be emailed to you"
        user = forms.CharField()
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>  def forgot(request):
        if request.method == 'POST':
            try:
                user = User.objects.get(username=request.POST['username'])
                lostpassword = LostPassword.objects.create(user=user, key=new_key())
                message = 'http://%s:%s/lostpassword/change/%s/' % (
                    request.META['SEVER_NAME'],
                    request.META['SEVER_PORT'],
                    lostpassword.key)
            except User.DoesNotExist:
                message = 'Unknown user'
        else:
            message = ''
        return render_to_response('homepage/forgot.html', {'message': message})
  
  url.py:
  
       urlpatterns = patterns('blog.apps.homepage.views',
   url(r'^$', 'index', name='homepage_index'),
   url(r'^about/$', 'about', name='homepage_about'),
   url(r'^contact/$', 'contact', name='homepage_contact'),
   url(r'^archive/$', 'archive', name='homepage_archive'),
   url(r'^login/$', 'login', name='homepage_login'),
   url(r'^register/$', 'register', name='homepage_register'),
   url(r'^gallery/$', 'gallery', name='homepage_gallery'),
   url(r'^profile/$', 'profile', name='homepage_profile'),
   url(r'^welcome/$', 'welcome', name='homepage_welcome'),
   url(r'^validation/$', 'validation', name='homepage_welcome'),
   url(r'^success/$', 'success', name='homepage_success'),
   url(r'^add_organisation/$', 'add_organisation', name='homepage_add_organisation'),
   url(r'^hallo/$', 'hallo', name='homepage_hallo'),
   url(r'^editMe/$', 'editMe', name='homepage_editMe'),
       url(r'^forgot/$', 'forgot', 'blog.apps.homepage.views.forgot'),
  
  )
  </code></pre>
  
  <p>forgot.html (template):</p>
  
  <pre><code>&lt;form method="post" action="."&gt;
      Username: &lt;input type"text" name="username" /&gt; &lt;br /&gt;
      &lt;input type="Submit"&gt;
  &lt;/form&gt;
  &lt;p&gt;
      {{ message }}
  &lt;/p&gt;
  </code></pre>
  
  <p>Traceback:</p>
  
  <pre><code>Traceback:
  File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response
  101. request.path_info)
  File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in resolve
  252. sub_match = pattern.resolve(new_path)
  File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in resolve
  252. sub_match = pattern.resolve(new_path)
  File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py" in resolve
  156. kwargs.update(self.default_args)
  
  Exception Type: ValueError at /forgot/ 
  Exception Value: dictionary update sequence element #0 has length 1; 2 is required
  </code></pre>
  
  <p>What is it that I don't do alright?</p>