akvo.rsr.templatetags.rsr_tags module

Akvo RSR is covered by the GNU Affero General Public License. See more details in the license.txt file located at the root folder of the Akvo RSR module. For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.

class akvo.rsr.templatetags.rsr_tags.EncryptEmail(context_var)[source]

Bases: Node

render(context)[source]

Return the node rendered as a string.

class akvo.rsr.templatetags.rsr_tags.WidthRatioTruncNode(val_expr, max_expr, max_width, asvar=None)[source]

Bases: WidthRatioNode

render(context)[source]

Return the node rendered as a string.

akvo.rsr.templatetags.rsr_tags.counter_badge(context, object)[source]

show the counter_badge

akvo.rsr.templatetags.rsr_tags.encrypt_email(parser, token)[source]

{% encrypt_email user.email %}

akvo.rsr.templatetags.rsr_tags.funding_box(context, project)[source]

Show the funding box used in the widgets. Css definition in widget_global.css

akvo.rsr.templatetags.rsr_tags.funding_box_narrow(context, project)[source]

Show the funding box used in the widgets. Css definition in widget_global.css

akvo.rsr.templatetags.rsr_tags.funding_box_narrow2(context, project)[source]

Show the funding box used in the widgets. Css definition in widget_global.css

akvo.rsr.templatetags.rsr_tags.funding_box_wide(context, project)[source]

Show the funding box used in the widgets. Css in widget_global.css

akvo.rsr.templatetags.rsr_tags.funding_project(context, project)[source]

Show the funding box used in the widgets. Css definition in widget_global.css

akvo.rsr.templatetags.rsr_tags.funding_table(context, project)[source]

Show the funding box used in the widgets. Css definition in widget_global.css

akvo.rsr.templatetags.rsr_tags.gallery_thumb(context, image, width, height, caption='', style='')[source]
akvo.rsr.templatetags.rsr_tags.institutions_sponsor(context, project)[source]

Show the individual doante button. CSS in widget_global.css

Generate the more links.

akvo.rsr.templatetags.rsr_tags.partner_sites_funding_box(context, project)[source]

Funding box used on partner sites

akvo.rsr.templatetags.rsr_tags.project_thumb(context, project, width, height, style='')[source]
akvo.rsr.templatetags.rsr_tags.update_thumb(context, update, width, height, style='')[source]
akvo.rsr.templatetags.rsr_tags.widthratio_trunc(parser, token)[source]

For creating bar charts and such, this tag calculates the ratio of a given value to a maximum value, and then applies that ratio to a constant.

For example:

<img src='bar.gif' height='10' width='{% widthratio this_value max_value 100 %}' />

Above, if this_value is 175 and max_value is 200, the image in the above example will be 88 pixels wide (because 175/200 = .875; .875 * 100 = 87.5 which is rounded up to 88).