title: Django - Specifying default attr for Custom widget
body: <p>I have created this widget</p>
  
  <pre><code>class DateTimeWidget(forms.TextInput):
    attr = {'class': 'datetimepicker'}
    class Media:
      js = ('js/jquery-ui-timepicker-addon.js',)
  </code></pre>
  
  <p>Then I use it on my form</p>
  
  <pre><code>class SessionForm(forms.ModelForm):
    class Meta:
      model = Session
    def __init__(self, *args, **kwargs):
      super(SessionForm, self).__init__(*args, **kwargs)
      self.fields['start_time'].widget = DateTimeWidget()
      self.fields['end_time'].widget = DateTimeWidget()
  </code></pre>
  
  <p>No css <code>class</code> is applied to my fields (I'm expecting <em>datetimepicker</em> applied to both <code>start_time</code> &amp; <code>end_time</code>).<br>
  I imagine I have put <code>attr</code> at a wrong location. Where am I supposed to specify it ?</p>