title: django : using admin datepicker
body: <p>I'm trying to use the admin datepicker in my own django forms.</p>
  
  <p>Roughly following the discussion here : <a href="http://www.mail-archive.com/django-users@googlegroups.com/msg72138.html" rel="nofollow noreferrer">http://www.mail-archive.com/django-users@googlegroups.com/msg72138.html</a></p>
  
  <p>I've</p>
  
  <p>a) In my forms.py included the line</p>
  
  <pre><code>from django.contrib.admin import widgets
  </code></pre>
  
  <p>b) and used the widget like this :</p>
  
  <pre><code>date = forms.DateTimeField(widget=widgets.AdminDateWidget())
  </code></pre>
  
  <p>c) And in my actual template I've added :</p>
  
  <pre><code>{{form.media}}
  </code></pre>
  
  <p>To include the js / styles etc.</p>
  
  <p>However, when I try to view my form I get no nice widget; just an ordinary text box. And the Firefox javascript error console shows me :</p>
  
  <p>gettext is not defined in calendar.js (line 26)</p>
  
  <p>and </p>
  
  <p>addEvent is not defined in DateTimeShortcuts.js (line 254)</p>
  
  <p>Any suggestions? Is this a bug in Django's own javascript library?</p>
  
  <p>Update : Basically, need to include the core and (or fake) the i18lization</p>
  
  <p>Update 2 : Carl points out this is pretty much a duplicate of <a href="https://stackoverflow.com/questions/38601/using-django-time-date-widgets-in-custom-form/38916#38916">Using Django time/date widgets in custom form</a> (although starting from a different position)</p>