A tool to easy the template development process
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.mkdn
tenjinserver.py

README.mkdn

TenjinServer

What

TenjinServer is a webserver to easy the template development process. Know more on this post.

Installing

  1. Install Pytenjin library
  2. Download tenjinserver.py (or clone this repository)
  3. Run tenjinserver.py from terminal.

Usage

Start the server:

python tenjinserver.py <port> </path/to/template/files>

Then access you template url from your browser:

http://localhost:8080/mytemplate.pyhtml

Options

The default port is 8080.

The default path is your current path. Path defines your DocumentRoot.

Optionally you can set query params for complex templates:

Context Param

ex: http://localhost:8080/mytemplate.pyhtml?context=mycontext

TenjinServer will load your template with mycontext.py as it's context.

Prefix Param

ex: http://localhost:8080/mytemplate.pyhtml?prefix=myprefix&context=mycontext

If your template uses tenjin includes with the prefix notation, you must set the prefix param.

License

This code is free to be used under the terms of the MIT license.

Authors

Henrique Bastos
Vitor Mazzi