It's not really the right place. Django-dev is for discussing the
development of Django itself; django-users is for discussing how to
use Django itself. In future, please direct user/howto questions
there.
> I have a form instance in the var form.
>
...
> class AdminDateWidget(forms.TextInput):
> class Media:
> js = ('just_testing.js',)
...
> I took this code from the django newforms-admin branch.
> I'm not sure if the class Media is a part of the newforms-admin
> framework or it belongs to newforms.
Media definitions are only available in the newforms-admin branch.
When that branch is merged to trunk, they will become a feature of
newforms. Until then, you can't use Media definitions unless you are
using the newforms-admin branch.
As for rendering - if you just print the widget, you won't get any
javascript. However, if the widget is on a form instance f, and you
pass f to the template, then {{ f.media }} will render as the list of
javascript includes (<script src=""> statements). There is much more
detail in the newforms-admin version of the documentation for
newforms.
Yours,
Russ Magee %-)