Hello, I'm building a custom admin site with a custom form and the
datetime widget shows up as a text input. When I set the widget for
the date field to textarea I get a textarea, but when I set it to
datetime, I get I text input. I also tried not specifying any widget
and I still get just a text input.

Can some one please tell me why or how to fix it?

Thanks much
--
matthew

from django import forms
from django.contrib import admin
from colorcode.trainertools.models import Workshop


class WorkshopForm(forms.Form):
  name = forms.CharField(max_length=64)
  date = forms.DateTimeField(widget=forms.DateTimeInput())
  code = forms.CharField()


class WorkshopAdmin(admin.ModelAdmin):
  def get_form(self, request, obj=None, **kwargs):
    return WorkshopForm


trainers_admin = admin.sites.AdminSite()
trainers_admin.register(Workshop, WorkshopAdmin)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to