Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install megrok.rendersource

How to install megrok.rendersource

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install megrok.rendersource
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.5.1 Available View build log
Windows (64-bit)
0.5.1 Available View build log
Mac OS X (10.5+)
0.5.1 Available View build log
Linux (32-bit)
0.5.1 Available View build log
Linux (64-bit)
0.5.1 Available View build log
 
Author
License
ZPL
Lastest release
version 0.5.1 on Jan 5th, 2011

Grok source renderers

First take on making the zope.app.render classes available from Grok templates.

  • RestructuredText: template files with '.rst' extension

renders a complete HTML page, including embedded stylesheet (default) or with a configurable external stylesheet

Installation

Add 'megrok.rendersource' to the 'install_requires' list in your packages 'setup.py'. Run buildout again. Template reloading is available in developer mode only: add 'devmode on' to the 'zope.conf = ' line in your buildout.cfg

Configuration

To configure the stylesheet used with your template, add a method 'namespace' to your view class:

System Message: WARNING/2 (<string>, line 27)

Literal block expected; none found.

class Overview(grok.View):

def namespace(self): # compute the stylesheet path to the file inside the 'static' folder, # eg. 'grok.css' stylesheet=self.static['grok.css']() # enable absolut URL handling, disable embedding return {'settings_overrides': {'stylesheet': stylesheet, 'stylesheet_path': None, 'embed_stylesheet': 0, 'input_encoding': 'utf-8', 'output_encoding': 'utf-8', }}

Other docutils related options can be added to the 'settings_overrides' dictionary. CF grok_overview.txt for more info on the namespace method.

Changes

0.5.1 (2010-03-10)
  • added the long description...
0.5 (2010-03-10)
  • upgrade to grok version 1.1rc1
  • changed the project namespace from d2m.rendersource to megrok.rendersource

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.