On Wed, 2009-03-25 at 20:38 -0700, adrian wrote:
>
> I have a Sighting model which has a foreign key field "notes" to a
> model called Notes.
> Notes has a predefined empty note with id=1. If the user specifies
> no note then
> I want the sighting to reference this predefined empty note.
> So i
I have a Sighting model which has a foreign key field "notes" to a
model called Notes.
Notes has a predefined empty note with id=1. If the user specifies
no note then
I want the sighting to reference this predefined empty note.
So in my view:
note = form.cleaned_data['notes']
if note != "": #
2 matches
Mail list logo