Kenneth Gonsalves wrote:
> i always use it, but for some reason it is not in the official docs -
> although it is in the wiki
Yes this is it: http://code.djangoproject.com/wiki/NewAdminChanges
There is also a small point that is easy to miss: on POST one should
call do_html2python both when t
On 30-Aug-06, at 2:33 PM, cyberco wrote:
> So should I always use 'manipulator.flatten_data()' instead of
> 'obj.__dict__' for filling forms with existing values?
i always use it, but for some reason it is not in the official docs -
although it is in the wiki
--
regards
kg
http://lawgon.li
That works, great!
So should I always use 'manipulator.flatten_data()' instead of
'obj.__dict__' for filling forms with existing values?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
cyberco wrote:
> ==VIEW=
> errors = {}
> pizza =
> new_data = pizza.__dict__
This is why it doesn't work. There is a method in manipulators
'flatten_data' that correctly fills data for ForeignKeys and ManyToMany:
manipulator = Pizza.ChangeManipulator(id) # or whatever
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 =
new_data = pizza.__di
cyberco wrote:
> In a form for changing a model instance all fields get correctly filled
> with existing values except the ManyToManyField form fields (which
> renders as a choice list in a form). It shows the correct list of
> options, but none of the options is selected, even though the instance
I have the same problem :|
--~--~-~--~~~---~--~~
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 [EMAI
In a form for changing a model instance all fields get correctly filled
with existing values except the ManyToManyField form fields (which
renders as a choice list in a form). It shows the correct list of
options, but none of the options is selected, even though the instance
of the model should ha
8 matches
Mail list logo