title: Django passing parameter
body: <p>I have a page which list, a list of volunteers from the volunteer_list table. </p>
  
  <p>Volunteer_list table contains the following fields,
  Voluntter name
  Volunteer position name
  Date created</p>
  
  <p>Now from this page-Mainpage I need to pass the Volunteer position name to the next page-Contactpage.The volunteer position field is 50 byte field.</p>
  
  <p>How do I define my view for the Contactpage and how can I access the passed field in my contactpage?</p>
  
  <p>volunteer_list.html</p>
  
  <pre><code>&lt;tr&gt;
          &lt;th colspan=4 align="left"&gt;&lt;label for="id_Volposition"&gt;Volunteer Position:&lt;/label&gt;&lt;/th&gt;
          &lt;th colspan=.5 align="left"&gt;&lt;a href="/signups/new/{{ v.position }}" class="username" &lt;u&gt;{{ v.volposition }}&lt;/u&gt;&lt;/a&gt;&lt;/th&gt;
  &lt;tr&gt; &lt;td colspan="2" height="2" style="display:none"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>If you notice here, i will be calling the signups/new page, with v.position being passed as the parameter..I need to know the following, 1.How will urls.py be defined for signups/new page to access the v.position parameter 2. How will I access the parameter in signups/new page</p>
  
  <p>My URLS.py</p>
  
  <pre><code>urlpatterns = patterns('',
     (r'^new/$',                           sfp.view),
     (r'^volunteer/$',     volunteer_page),
     (r'^vollist/$', volunteer_list),
     (r'^volcont/$', volunteer_contact)
  )
  </code></pre>
  
  <p>The new/$ calls the sfp.view..Its a function in my views.py..That view will basically render a html page that collects all the information.</p>
  
  <p>I need to know how to pass the parameter "position" to this function?</p>
  
  <p>This is a existing piece of code..</p>
  
  <p>If its a direct call like the one given in the tutorial, I dont have any problems.</p>
  
  <p>def detail(request, poll_id):</p>
  
  <ul>
  <li>Code for sfp.view</li>
  </ul>
  
  <p>views.py</p>
  
  <pre><code>    sfp = SimpleFormProcessing(
          form_class=VolunteerSignupForm,
          form_2_model=volunteersignupform_2_model,
          form_template='signups/create_contact_form.dmpl',
          email_template='signups/response_email.dmpl',
          email_html_template='signups/response_email_html.dmpl',
          email_subject='Vibha Volunteer Signup',
          email_sender='volunteer@vibha.org',
          redirect_url='/signups/thanks/',
          do_captcha=True)
  
  
  
  code for simpleformprocessing:
  
  
      class SimpleFormProcessing:
  
          def __init__(self, form_class, form_2_model, form_template,
                  email_template, email_subject, email_sender, redirect_url,
                  do_captcha=False, record_ip_addr=False, email_html_template=None):
              self.form_class = form_class
              self.form_2_model = form_2_model
              self.form_template = form_template
              self.email_template = email_template
              self.email_html_template = email_html_template
              self.email_subject = email_subject
              self.email_sender = email_sender
              self.redirect_url = redirect_url
              self.do_captcha = do_captcha
              self.record_ip_addr = record_ip_addr
  
          def view(self, request, initial={}):
              Form = self.form_class
              if self.do_captcha:
                  Form = form_with_captcha(Form, request)
              if self.record_ip_addr:
                  Form = form_with_ipaddress(Form, request)
              if request.method == 'POST':
                  # Try processing the form
                  if self.do_captcha and not accepts_cookies(request):
                      return our_flatpage('Please enable cookies and try again.')
                  else:
                      form = Form(request.POST)
                      if form.is_valid():
                          # The form is correct, process it
                          model = self.form_2_model(form)
                          if self.email_template:
                              text_content = render_to_string(self.email_template, {'model': model})
                              recipients = model.emailRecipients()
                              try:
                                  bcc_recipients = model.emailBCCRecipients()
                              except:
                                  bcc_recipients = None
                              msg = EmailMultiAlternatives(self.email_subject, text_content, self.email_sender,
  
                                  recipients, bcc_recipients)
  
                          if self.email_html_template:
                              html_content = render_to_string(self.email_html_template, {'model': model})
                              msg.attach_alternative(html_content, "text/html")
  
                          msg.send()
  
                      return HttpResponseRedirect(self.redirect_url)
                  else:
                      # Show the form with errors
                      return render_to_response(self.form_template, {'form': form})
          else:
              # Show the empty form
              form = Form(initial=initial)
              if self.do_captcha:
  </code></pre>