maybe I am missing something but why don't you use {{ form.as_ul }} in
your template??

On 1/15/07, Ramdas S <[EMAIL PROTECTED]> wrote:
How do I get the templates to render the following form from the views.py
given below as as unordered list, instead of the standard table formt. This
is a simple four fields ContactForms, created out of the table Contacts.

Currently it is emmiting the HTML as as a a table class.

def index(request):
    ContactForm = forms.models.form_for_model(Contacts)
    if request.method == 'POST':
        form = ContactForm( request.POST)
        if form.is_valid():
            form.save()
            return HttpResponse('Message Recd')
    else:
        form = ContactForm()

    t = loader.get_template('contactus.html ')



        c = Context({'form': form, })

        return HttpResponse(t.render(c))



I can make the template behave the way I want to using CSS. But that is not
the idea...

 >



--
Honza Kr l
E-Mail: [EMAIL PROTECTED]
ICQ#:   107471613
Phone:  +420 606 678585

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to