templates and controllers

Thomas De Schampheleire patrickdepinguin at gmail.com
Sat Feb 21 15:35:39 EST 2015


On Tue, Feb 17, 2015 at 4:26 AM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 02/15/2015 09:45 PM, Thomas De Schampheleire wrote:
>>
>>
>> A quick search reveils:
>>
>> $ grep -rn '= render' controllers/
>> controllers/followers.py:56:        c.followers_data =
>> render('/followers/followers_data.html')
>> controllers/forks.py:126:        c.forks_data =
>> render('/forks/forks_data.html')
>> controllers/pullrequests.py:207:        c.pullrequest_data =
>> render('/pullrequests/pullrequest_data.html')
>> controllers/summary.py:111:                        readme_data =
>> renderer.render(readme.content,
>> controllers/admin/gists.py:234:        rendered =
>> render('admin/gists/edit.html')
>> controllers/admin/admin.py:144:        c.log_data =
>> render('admin/admin_log.html')
>> controllers/journal.py:210:        c.journal_data =
>> render('journal/journal_data.html')
>> controllers/journal.py:353:        c.journal_data =
>> render('journal/journal_data.html')
>>
>> Unless you see a good reason why the above is like that, this could be
>> cleaned up...
>
>
> Agreed, it seems like some cleanup could make templates simpler or "better".

It seems that this pattern is used to be able to return data-only in
partial requests (those loaded via ajax/asynchtml javascript functions
with HTTP_X_PARTIAL_XHR set).

In the case of pullrequests, I don't think this is actually being
using, but for example it is used for the journal.

Not sure what to do with this...


More information about the kallithea-general mailing list