That did the trick.

Another quick question. I have made some custom validations in the forms
clean() method. The only way I can seem to display the errors in the
template is by doing this:
{{ form.errors }}.  The problem with this is before it displays the actual
errors it is displaying __all__.  So it looks like this:
<ul class="errorlist">
    <li>__all__</li>
    <li>Error message raised by my custom validation</li>
</ul>

Thanks again for previous help!

On Thu, Feb 5, 2009 at 6:31 AM, Alex Gaynor <alex.gay...@gmail.com> wrote:

>
>
> On Thu, Feb 5, 2009 at 2:25 AM, Gordon <gordoncas...@gmail.com> wrote:
>
>>
>> Form 1 Template (rendered from view):
>> http://dpaste.com/116827/
>>
>> Form 2 Template (included in Form 1):
>> http://dpaste.com/116826/
>>
>> View Code:
>> http://dpaste.com/116828/
>>
>> Form 2 Code:
>> http://dpaste.com/116829/
>>
>> Once again, the problem is that Form 2 won't display any errors while
>> Form 1 will display errors fine.
>>
>> Thanks,
>>
>>
>> On Feb 4, 11:14 pm, Karen Tracey <kmtra...@gmail.com> wrote:
>> > On Thu, Feb 5, 2009 at 2:03 AM, Gordon <gordoncas...@gmail.com> wrote:
>> >
>> > > Hello,
>> > > I have seperate django forms wrapper in one html form tag in my
>> > > template.
>> >
>> > > When i render, both forms display fully. When I post, errors display
>> > > for the first form but not for the second.  I am using a tag by tag
>> > > approach to the the template.
>> >
>> > > Interesting thing is I did a test to see if form2 was bound:
>> > > {% if form2.is_bound %} This is bound {% endif %} and it is
>> > > It should be displaying errors (I am leaving the fields blank and they
>> > > are required)
>> >
>> > > is it any thing to do with form1 being a ModelForm and form2 is a
>> > > Form?  This is my first django app so maybe i missed something when I
>> > > declared the Form class.
>> >
>> > > any suggestions?
>> >
>> > Specifics of your view code and the template you are using to render the
>> > forms might help someone spot what is going wrong.  If they're likely to
>> be
>> > badly wrapped in email, someplace like dpaste.com would be better than
>> > putting them inline in your message.
>> >
>> > Karen
>>
>>
> You need to call is_valid() on both forms, as this is what triggers the
> validation.
>
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your right to
> say it." --Voltaire
> "The people's good is the highest law."--Cicero
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to