in case anybody else has been trying to include one2many-relations when
serializing the "one" side, take a look at
http://code.djangoproject.com/ticket/2843
would be great if someone else could test this as well. thanks!
--
cheers,
Nikl
Nikolaus Schlemm schrieb:
It would be easier to comment on it if you would provide a patch
with full path, so that track can recognize its context and
display it properly. Look at the other patches if you don't see how.
I'd like to have a way to control through which foreign key
fields it should expand, since I might not need all the data.
That's also a point with the current implementation: It doesn't
let me skip data fields not needed.
Anyway, how is this supposed to behave for a chain of foreign
keys? Would it go through all the related models and the models
related to the related models, etc.?
Michael
> It would be easier to comment on it if you would provide a patch
> with full path, so that track can recognize its context and
> display it properly. Look at the other patches if you don't see how.
after looking at other patches, I now called "svn diff" from the django
root-dir and attached that, but unfortunately trac still won't display it
properly. is there anything else that needs to be done with it?
> I'd like to have a way to control through which foreign key
> fields it should expand, since I might not need all the data.
> That's also a point with the current implementation: It doesn't
> let me skip data fields not needed.
that's a valid point, but possilby an issue of its own. currently, the export
of one2many relations would be controlled by a boolean. but in generally
speaking, I think the fields to be exported could be passed in as a list
parameter..
> Anyway, how is this supposed to behave for a chain of foreign
> keys? Would it go through all the related models and the models
> related to the related models, etc.?
nope, this simply compiles a list of the primary keys of the "many" related
models when you export the "one" - similarly to how many2many relations are
exported.
--
cheers,
Nikl
Nikl