Files
@ 260a7a01b054
Branch filter:
Location: kallithea/rhodecode/templates/journal/public_journal.html - annotation
260a7a01b054
992 B
text/html
follow Python conventions for boolean values
True and False might be singletons and the "default" values for "boolean"
expressions, but "all" values in Python has a boolean value and should be
evaluated as such. Checking with 'is True' and 'is False' is thus confusing,
error prone and unnessarily complex.
If we anywhere rely and nullable boolean fields from the database layer and
don't want the null value to be treated as False then we should check
explicitly for null with 'is None'.
True and False might be singletons and the "default" values for "boolean"
expressions, but "all" values in Python has a boolean value and should be
evaluated as such. Checking with 'is True' and 'is False' is thus confusing,
error prone and unnessarily complex.
If we anywhere rely and nullable boolean fields from the database layer and
don't want the null value to be treated as False then we should check
explicitly for null with 'is None'.
3fe3285868d1 3fe3285868d1 3fe3285868d1 1f334a68d057 3fe3285868d1 3fe3285868d1 b4f401524060 3fe3285868d1 3fe3285868d1 1ac47c961f70 3fe3285868d1 6bef2a9f73e2 6bef2a9f73e2 6bef2a9f73e2 6bef2a9f73e2 3fe3285868d1 f91d3f9b7230 6bef2a9f73e2 6bef2a9f73e2 6bef2a9f73e2 6bef2a9f73e2 6bef2a9f73e2 6bef2a9f73e2 6bef2a9f73e2 6bef2a9f73e2 6bef2a9f73e2 6bef2a9f73e2 2bfcec6a3985 6bef2a9f73e2 6bef2a9f73e2 f91d3f9b7230 f91d3f9b7230 | ## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
<%def name="title()">
${_('Public Journal')} · ${c.rhodecode_name}
</%def>
<%def name="breadcrumbs()">
${c.rhodecode_name}
</%def>
<%def name="page_nav()">
${self.menu('journal')}
</%def>
<%def name="head_extra()">
<link href="${h.url('public_journal_atom')}" rel="alternate" title="${_('ATOM public journal feed')}" type="application/atom+xml" />
<link href="${h.url('public_journal_rss')}" rel="alternate" title="${_('RSS public journal feed')}" type="application/rss+xml" />
</%def>
<%def name="main()">
<div class="box">
<!-- box / title -->
<div class="title">
<h5>${_('Public Journal')}</h5>
<ul class="links">
<li>
<span><a href="${h.url('public_journal_atom')}"><img class="icon" title="${_('ATOM feed')}" alt="${_('ATOM feed')}" src="${h.url('/images/icons/rss_16.png')}"/></a></span>
</li>
</ul>
</div>
<div id="journal">${c.journal_data}</div>
</div>
</%def>
|