title: Which Django Form Field can provide me a HTML output of <input type="range" />?
body: <p>I've got a html form with this input:</p>
  
  <pre><code>    &lt;input id="duration_slider" type="range" min="1" max="168" value="48" /&gt;
  </code></pre>
  
  <p>However I'd now like to convert this slider to a django form field, so I can use it in a Django form. The field name is <code>duration</code> so I'll change the <code>id</code> to <code>id=id_duration</code>.</p>
  
  <p>What would my models.py and forms.py looks like for this field?</p>
  
  <p>Currently it's just:</p>
  
  <pre><code>class AdvertisePost(Post):
      ...
      duration = models.IntegerField(default=48)
  
      def __str__(self):
          return self.title
  
  class AdvertisePostForm(forms.ModelForm):
      duration = ?
  
      class Meta:
          model = AdvertisePost
          fields = [
              ...
              #'duration'    
          ]
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p><strong>views</strong></p>
  
  <pre><code>if options_form.is_valid():
      instance = options_form.save(commit=False)
      print(instance.duration) #prints the default value every time
  </code></pre>
  
  <p>form field</p>
  
  <pre><code>duration = forms.IntegerField(widget=forms.NumberInput(attrs={'type':'range', 'step': '1', 'min': '1', 'max': '148'}), required=False)
  </code></pre>