Giter Site home page Giter Site logo

moody-templates's Introduction

moody-templates

moody-templates is a fast and powerful template engine for Python 3.

{% for name in ["world", "dave",] %}
    Hello {{name}}
{% endfor %}

Features

  • Easy to use.
  • High performance.
  • Autoescaping.
  • Template inheritance.
  • Supports native python expressions.
  • Extensible template macros.

Documentation

Please read the Getting Started guide for more information.

Download instructions, bug reporting and links to full documentation can be found at the main project website.

You can keep up to date with the latest announcements by joining the moody-templates discussion group.

More information

The moody-templates project was developed by Dave Hall. You can get the code from the moody-templates project site.

Dave Hall is a freelance web developer, based in Cambridge, UK. You can usually find him on the Internet in a number of different places:

moody-templates's People

Contributors

etianen avatar kkinder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

b-rich kkinder

moody-templates's Issues

problem with %%

template string:

%% py tmp = 1
%% print tmp

error:

File "<string>", line 1, in <module>
NameError: name 'tmp' is not defined

syntax error thrown on mac os x 10.6

I'm having problems getting moody-templates running. When I install or try to import it throws the following errors:

Error on install:

Extracting moody_templates-0.9-py2.6.egg to /Library/Python/2.6/site-packages
SyntaxError: ('invalid syntax', ('/Library/Python/2.6/site-packages/moody_templates-0.9-py2.6.egg/moody/init.py', 32, 36, 'def make_loader(_sources, loader_cls=Loader, parser=default_parser, *_kwargs):\n'))

SyntaxError: ('invalid syntax', ('/Library/Python/2.6/site-packages/moody_templates-0.9-py2.6.egg/moody/base.py', 106, 75, ' raise TemplateRenderError(str(ex), self._name, lineno) from ex\n'))

SyntaxError: ('invalid syntax', ('/Library/Python/2.6/site-packages/moody_templates-0.9-py2.6.egg/moody/loader.py', 13, 23, 'class Source(metaclass=ABCMeta):\n'))

SyntaxError: ('invalid syntax', ('/Library/Python/2.6/site-packages/moody_templates-0.9-py2.6.egg/moody/parser.py', 104, 75, ' raise TemplateCompileError(str(ex), self.name, lineno) from ex\n'))

Adding moody-templates 0.9 to easy-install.pth file


ERROR on import:

import moody
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.6/site-packages/moody_templates-0.9-py2.6.egg/moody/init.py", line 32

def make_loader(_sources, loader_cls=Loader, parser=default_parser, *_kwargs)

Problem for install with python3.3

The traceback for install in virtualenv with python 3.3.3 in Gentoo

Traceback (most recent call last):
  File "", line 16, in 
  File "/home/rodrigomatias/tmp/test-env/build/moody-templates/setup.py", line 7, in 
    use_setuptools()
  File "./distribute_setup.py", line 145, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "./distribute_setup.py", line 125, in _do_download
    _build_egg(egg, tarball, to_dir)
  File "./distribute_setup.py", line 116, in _build_egg
    raise IOError('Could not build the egg.')
OSError: Could not build the egg.

one line comment

Please add support for ## as a one line comments. eg:

%% if true
<div>...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.