This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

more.jina2: Jinja2 template integration for Morepath

more.jina2 is an extension for Morepath that adds Jinja2 template support when you use the .jinja2 extension.

For details on the Jinja2 template language see the Jinja2 template designer documentation.

Example usage:

from more.jinja2 import Jinja2App

class App(Jinja2App):
    pass

@App.path(path='persons/{name}')
class Person(object):
     def __init__(self, name):
         self.name = name

@App.template_directory()
def get_template_directory():
    return 'templates'

@App.html(model=Person, template='person.jinja2')
def person_default(self, request):
    return {'name': self.name}

and then in person.jinja2 (in the templates subdirectory):

<html>
<body>
<p>Hello {{name}}!</p>
</body>
</html>

Note that the Jinja2 documentation uses the .html extension for Jinja2 templates, whereas this extension uses .jinja2 instead.

To control Jinja2 behavior you can define a jinja2 setting section in your app. For instance:

@App.setting_section(section='jinja2')
def get_setting_section():
    return {
      'auto_reload': False,
      'autoescape': True,
      'extensions': ['jinja2.ext.autoescape']
    }

For details on Jinja2 configuration options, consult the Jinja2 API documentation.

CHANGES

0.2 (2015-04-09)

  • Actual release to PyPI.

0.1 (2015-04-09)

  • Initial public release.
Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.dev0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
more.jinja2-0.2.tar.gz (6.5 kB) Copy SHA256 Checksum SHA256 Source Apr 9, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting