Forgot to copy one line in front of the many_to_many loop:
many_to_manys = obj._meta.many_to_many
for many_to_many in many_to_manys:
field_name = many_to_many.name
# here the magic should happen
# ordered_related_objs = hokus_pokus(obj, many_to_many)
--
You receiv
Hi guys,
as I understand, m2m with intermediate model and ordering is a bit (at
least) tricky:
https://code.djangoproject.com/ticket/11850
I need the ordering in my serialised data. The serialiser must of
course be independent of any names, so I use introspection so far.
Code so far is here:
de
2 matches
Mail list logo