From 2cc3c6954a5f9f610b8c214ad9a9a53ede8067a3 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 15 Mar 2007 07:43:38 +0100 Subject: [PATCH] [svn] playing with svn:ignore. somehow i begin to understand why people don't like svn... --HG-- branch : trunk --- www/documentation.html | 36 ----------------- www/download.html | 49 ----------------------- www/faq.html | 69 -------------------------------- www/index.html | 89 ------------------------------------------ 4 files changed, 243 deletions(-) delete mode 100644 www/documentation.html delete mode 100644 www/download.html delete mode 100644 www/faq.html delete mode 100644 www/index.html diff --git a/www/documentation.html b/www/documentation.html deleted file mode 100644 index d674dfe..0000000 --- a/www/documentation.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - Documentation | Jinja Template Engine - - - - - - - - -
-
-

Documentation

-

- Currently Jinja 1 in still under heavy development and we have neither - released a final version nor do we provide a documentation you can download. - However you can browse the documentation of the current SVN version online: -

-

browse online documentation

-
-
- - - \ No newline at end of file diff --git a/www/download.html b/www/download.html deleted file mode 100644 index 379c717..0000000 --- a/www/download.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - Download | Jinja Template Engine - - - - - - - - -
-
-

Download

-

- If you want to install the release with - easy_install, - you can do it using this command: -

-
easy_install Jinja
-

- You can also get the development source from subversion using this command: -

-
svn co http://trac.pocoo.org/repos/jinja/trunk jinja
-

- Installing the current subversion trunk as a Python egg is done with: -

-
easy_install Jinja==dev
-

- Development takes place at the Pocoo trac, - you can browse the source online - here. -

-
-
- - - \ No newline at end of file diff --git a/www/faq.html b/www/faq.html deleted file mode 100644 index b0ff3b0..0000000 --- a/www/faq.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - FAQ | Jinja Template Engine - - - - - - - - -
-
-

Frequently Asked Questions

-

- Here a list of frequently asked questions. -

-

Why the Name?

-

- The name Jinja was chosen because it's the name of a Japanese temple and - temple and template share a similar pronunciation. -

-

How fast is it?

-

- I really hate benchmarks especially since they don't reflect much. The - performance of a template depends on many factors and you would have to - benchmark different engines in differen situations. However Jinja isn't - slow. The benchmarks from the testsuite show that Jinja is about twice - as fast as Django templates and about three times as slow as - mako. That's not bad for a - sandboxed template engine that has to sanitize template input on the fly. - If you really need the best performance of a template engine consider - using mako. -

-

What happened to Jinja < 1?

-

- Before Jinja 1 there was a template engine too with the same name. Beside - the name and the same maintainer those two projects don't share a single - line of code. If you have an application using Jinja < 1 you should try - to make it Jinja 1 compatible. If that's not possible, the old project is - still available as - 0.9-maint - in the Jinja subversion repository. -

-

Why should I use Jinja?

-

- There are dozens of template engines for Python, many of them try to - achieve different things. If you are looking for a XML based template - engine have a look at genshi, - if you want a bleezing fast template engine with the full range of - python constructs have a look at mako. If you want sandboxed templates - you probably want to check out Jinja. -

-
-
- - - \ No newline at end of file diff --git a/www/index.html b/www/index.html deleted file mode 100644 index abe55ab..0000000 --- a/www/index.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - Index | Jinja Template Engine - - - - - - - - -
-
-

Jinja Templates

-

- Jinja is a - sandboxed - template engine written in pure Python. It - provides a Django-like non-XML syntax - and compiles templates into executable python code. It's basically a combination - of Django templates and python code. -

-

Nutshell

-
{% extends 'base.html' %}
-{% block title %}Memberlist{% endblock %}
-{% block content %}
-  <ul>
-  {% for user in users %}
-    <li><a href="{{ user.url|e }}">{{ user.username|e }}</a></li>
-  {% endfor %}
-  </ul>
-{% endblock %}
-
-

Philosophy

-

- Application logic is for the controller but don't try to make the life for the - template designer too hard by giving him too few functionality. -

-

Features

-
    -
  • Simple API. For basic usage just one function is needed: -
    from jinja import from_string
    -print from_string('Hello {{ data }}!').render(data='World')
    -
    -
  • -
  • Sandboxed. The whole engine is completely sandboxed. A - template designer won't be able to modify application data or execute - dangerous code.
  • -
  • Python expressions. You can use nearly every python - expression. Not supported are the binary operators and list comprehensions / - generator expressions.
  • -
  • Inheritance. Jinja uses the same concept for inheritance - Django uses. It's very powerful and easy to understand.
  • -
  • Macros. Jinja provides so called macros that allow you to - put often used template snippets into callable blocks: -
    {% macro dialog title, text %}
    -  <div class="dialog">
    -    <h2 class="title">{{ title }}</h2>
    -    <div class="text">{{ text }}</div>
    -  </div>
    -{% endmacro %}
    -
    -You can then use this block by calling it: -
    {{ dialog('Notification', 'Here the text for the macro.') }}
    -
    -
  • -
  • Designer friendly. Jinja simplifies many things for a - template designer. Loops can be used in a recursive way, filters are - available to format values, loops know about their iteration etc.
  • -
  • Dynamic Syntax. You don't like the Django block syntax? - You can override the syntax elements on environment initialisation. It's - no problem to use ASP/PHP/Ruby syntax, html comments for blocks etc.
  • -
-
-
- - - \ No newline at end of file -- 2.26.2