templates and controllers

Mads Kiilerich mads at kiilerich.com
Mon Feb 16 22:26:43 EST 2015


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".

> And let the controller just call 'render' once, for the 'main'
> template to use, right?

Yes, I think that would be better.

/Mads


More information about the kallithea-general mailing list