FileField empty after form validation

2010-08-23 Thread josephi
Hi, I have a suspicion that my problem might not be Django specific, but I'm not entirely sure, and would appreciate any pointers to information on the subject. I have a Form with several fields, one of which is a FileField. This field is required. If I fill in the FileField but the form doesn't v

Using datetime.time object in form field choices

2011-09-12 Thread josephi
Hello I have a model Booking with a TimeField start_time on it. I want to ensure that times entered into this field are whole hours only. I've set up a ModelAdmin object to use this model in the admin interface. On the ModelAdmin I've used a custom ModelForm where I override the default field for

Re: Using datetime.time object in form field choices

2011-09-12 Thread josephi
I also just realised that it's common to use an integer as the first element of a choice pair. Maybe the only restriction is that the datatype you use in the choice pair match the model field you're eventually saving it back to? On Sep 13, 3:20 pm, josephi wrote: > Hello >