templates and controllers

Thomas De Schampheleire patrickdepinguin at gmail.com
Tue Feb 24 16:35:12 EST 2015

On Mon, Feb 23, 2015 at 4:10 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
>>> As a simple short term improvement we could replace c.journal_data in the
>>> template with an include of journal_data.html .
>> Yes, similar to what I did in my last pullrequest series right?
>> There, I could get rid of the variable c.foo_data altogether as the
>> dynamic aspect was not used.
>> But in the case of journal, since dynamic loading is used, the
>> variable still would exist.
>> I think the way to solve this differently, is to have two controller
>> methods, one serving the full page and one the data portion. This is
>> how 'my pullrequests' was handled initially (before my patches).
>> Then you don't need a magic 'partial' variable in the HTTP request.
>> Is this correct reasoning?
> I don't know if it is correct, but yes, I totally agree ;-)

On closer inspection, and comparison with the referenced Pylons docs,
I created a patch that gets rid of all the variables, but still does
not need to introduce separate foo_data methods.
This is in line with what you suggested.

More information about the kallithea-general mailing list