Skip to main content
added 214 characters in body
Source Link
crashekar
  • 283
  • 1
  • 7
  • 15

I have a model formset on a model with a couple of date fields - which again is a DateTimeField in the model. But when it displays in the template, it is shown as a text field. How can I show it as a drop down box ?

WFormSet = inlineformset_factory(UserProfile, W, can_delete=False,exclude=[<list of fields to be excluded>], extra=3) 

This is how I am intializing the modelformset.

How do I override these settings

I have a model formset on a model with a couple of date fields - which again is a DateTimeField in the model. But when it displays in the template, it is shown as a text field. How can I show it as a drop down box ?

I have a model formset on a model with a couple of date fields - which again is a DateTimeField in the model. But when it displays in the template, it is shown as a text field. How can I show it as a drop down box ?

WFormSet = inlineformset_factory(UserProfile, W, can_delete=False,exclude=[<list of fields to be excluded>], extra=3) 

This is how I am intializing the modelformset.

How do I override these settings

added 46 characters in body
Source Link
crashekar
  • 283
  • 1
  • 7
  • 15

I have a model formset on a model with a couple of date fields - which again is a DateTimeField in the model. But when it displays in the template, it is shown as a text field. How can I show it as a drop down box ?

I have a model formset on a model with a couple of date fields. But when it displays in the template, it is shown as a text field. How can I show it as a drop down box ?

I have a model formset on a model with a couple of date fields - which again is a DateTimeField in the model. But when it displays in the template, it is shown as a text field. How can I show it as a drop down box ?

Source Link
crashekar
  • 283
  • 1
  • 7
  • 15

Model formsets and Date fields.

I have a model formset on a model with a couple of date fields. But when it displays in the template, it is shown as a text field. How can I show it as a drop down box ?