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

Example usage with Jinja2:

from fresco import FrescoApp
from fresco_template import Jinja2
from jinja2 import PackageLoader

app = FrescoApp()
jinja2 = Jinja2(loader=PackageLoader('mypackage', 'template/dir'))
jinja2.init_app(app)


@jinja2.contextprocessor
def default_context():
    # Return a dictionary of variables always to be included in the
    # template context.
    #
    # NB the fresco context object and urlfor function are already included
    # in the template context by default.
    return {}

@jinja2.render('page.html')
def myview():
    return {'var': 'value'}

Same example with Chameleon:

from fresco import FrescoApp
from fresco_template import Chameleon
from chameleon import PageTemplateLoader

app = FrescoApp()

loader = PageTemplateLoader(['template/dir'], auto_reload=True)
chameleon = Chameleon(loader)
chameleon.init_app(app)


@chameleon.contextprocessor
def default_context():
    # Return a dictionary of variables always to be included in the
    # template context.
    #
    # NB the fresco context object and urlfor function are already included
    # in the template context by default.
    return {}

@chameleon.render('page.html')
def myview():
    return {'var': 'value'}

0.3.1 (released 2016-11-29)

0.3.0 (released 2015-09-25)

  • Added support for Kajiki

  • The environment variable has had its name changed to loader and is no longer available directly on the TemplateEnvironment object but via the plugin property. For example:

    from jinja2 import Environment, FileSystemLoader
    from fresco_template import Jinja2
    
    # Old style - BROKEN in 0.3 release:
    j2 = Jinja2(environment=Environment(FileSystemLoader('templates')))
    j2.environment.install_gettext_translations(my_translation_module)
    
    # New style:
    j2 = Jinja2(Environment(autoescape=True, FileSystemLoader('templates')))
    j2.plugin.loader.install_gettext_translations(my_translation_module)
    
  • Any custom plugins will need to be rewritten. Refer to any of the default plugins for examples.

0.2.1

  • The TemplateContent class now calls all context processors on instantiation. This ensures context processors are always called before response headers are sent.

0.2

Initial release

0.1

(unreleased version)

Release History

Release History

0.3.1

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

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

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

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

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
fresco-template-0.3.1.tar.gz (9.5 kB) Copy SHA256 Checksum SHA256 Source Nov 29, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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