I'm using manipulators.

======MODELS==============
class Pizza(models.Model):
    toppings = models.ManyToManyField(Topping)

class Topping(models.Model):
    name = models.CharField(maxlength=100)
===========================

======VIEW=================
errors = {}
pizza = <get a pizza from the oven...I mean db>
new_data = pizza.__dict__
pizzaFormWrapper = FormWrapper(translatorManipulator, new_data, errors)
return render_to_response('pizza_edit.html', {'pizzaFormWrapper':
pizzaFormWrapper})
==========================

In the template I'm simply displaying the ManyToMany field in a form:

======TEMPLATE===========
<form action="" method="post" action=".">
    Toppings: {{ pizzaFormWrapper.toppings}}
    <input type="submit" value="Update" />
</form>
==========================


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to