title: Passing variable from template.html to views.py by URL (using a file input form)
body: <p>Maybe this is a very silly question but I'm new using django. <br />I have a certain django template with a set of properties that can be chosen. On an uploaded file I have to perform a different treatment depending on the chosen property, so I want to pass the chosen property value from the template to the view. Properies are hard coded in view.py and retrieved in the template by getJSON:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(function() {
      $.getJSON('available_properties', function(data) {
          var options = [];
          for(var i in data.properties)
          {
              var prop = data.properties[i];
              options.push('&lt;option value="'+prop+'"&gt;'+prop+'&lt;/option&gt;');         
          }
          $("#properties &gt; select").html(options.join(''));
      }); 
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Then an uploading file form trigger the action:</p>
  
  <pre><code>    &lt;form onsubmit="return checkfile();" prop="return get_prop();" action="calculate/&lt;property_value_goes_here&gt;" enctype="multipart/form-data" method="POST"&gt;
          {% csrf_token %}
          &lt;input type="file" id="uploadfile" name="uploadfile" size="30"&gt;
          &lt;input type="submit" id="calculate" value="Calculate!"&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>How can I pass the property value directly in the URL path that must be called on the submit form?</p>