13 November 2011 at 12:56am
I wish to add functionality to the ComplexTableField for use in ModelAdmin, that is, add standard buttons like the 'Add/Edit/Delete' which perform a certain taks (in my specific case display a PDF file). How can I achieve this? I read something that I have to edit the summary_fields in my controllerclass, like:
17 November 2011 at 5:34am
thanks for the reply. Unfortunately, it does not seem to work, also not using version 2.4.6 and also not after renaming. Could there be a problem, for instance, that the funtion returns just a string instead of a dataobject(set)?
17 November 2011 at 7:24am
What summary_fields does is try to place the value of the chosen field into the table for each record. You can replace that with a function returning a string or some html, but you cannot feed it some object or even a set of objects...
So you could use the setup above and have the function returning a link, containing an url on your site, that would in turn generate the pdf for you. Or something along those lines...