title: How to set width and input limit of NumberInput widget for IntegerField in a Django form
body: <p>I'm looking for a way to change the width of the input box in a Django form.</p>
  <p>The model code for a parameter looks like this:</p>
  <pre><code>my_integer = models.IntegerField('Window', default=50)
  </code></pre>
  <p>And, putting it into a form, the HTML code that is generated is this:</p>
  <pre><code>&lt;input id=&quot;id_my_integer&quot; name=&quot;my_integer&quot; value=&quot;50&quot; type=&quot;number&quot;&gt;
  </code></pre>
  <p>And, the box is quite wide - maybe 20 characters.</p>
  <p>If I add the code in the definition of the form class Meta:</p>
  <pre><code>widgets = {
    'my_integer': forms.TextInput(attrs={'size':'3', 'maxlength':'3'}),
  }
  </code></pre>
  <p>I get a box that is 5-6 characters wide that lets me insert 3 characters and the HTML code changes the type to type='text' and the increment/decrement arrows disappear.</p>
  <p>So, <strong>what I really want is a 3 character wide box, with a 3 character input limit, having the <code>NumberInput</code> widget's increment/decrement arrows. How do I do this?</strong></p>