Gladys -
Thanks you so much! Originally I was passing the object but I was
leaving off the instance=
That didn't work out so well.
Jim
On Apr 10, 2:20 pm, gladys wrote:
> Hello,
>
> TestForm is a ModelForm, therefore you initialize it by passing an
> object instance.
> obj = Test.objects.get(id=
Hello,
TestForm is a ModelForm, therefore you initialize it by passing an
object instance.
obj = Test.objects.get(id=id)
form = TestForm(instance=obj)
Here is a sample view with proper usage of modelforms:
def formrender(request, id=None):
form = TestForm() # TestForm is a ModelForm
test
Hi -
I'm using Django 1.3 and I have a model defined with a DateTimeField
and a corresponding form that uses a SpliteDateTimeField to format the
date and time the way I want it to look. The definition looks like
this:
# --- Code snippet _#
class Test(models.Mod
3 matches
Mail list logo