Ticket #5125: templates.diff

File templates.diff, 1.4 KB (added by Simon G. <dev@…>, 11 years ago)
  • templates.txt

    77you have any exposure to other text-based template languages, such as Smarty_
    88or CheetahTemplate_, you should feel right at home with Django's templates.
     10.. admonition:: Philosophy
     12    The template language is intended to provide the minimal necessary set of
     13    features to allow you to express presentation; it is not a programming language,
     14    and is not the same as the Python programming language. This is done deliberately,
     15    to stop program logic from creeping into templates and to enable non-programmers
     16    such as designers to work with these.
     18    If you're looking for a construct from Python -- operators, functions, method calls,
     19    etc. -- it probably will not be available in the template language, or will be
     20    implemented in a different form. For example, instead of Python's if construct there
     21    is an {% if %} template tag, and the template tag operates in a very different manner
     22    from the if construct in Python. If you don't see the feature you want listed on this
     23    page, it is not available by default in the template system (though you are free to
     24    define a custom template tag to implement it).
    1026.. _Smarty: http://smarty.php.net/
    1127.. _CheetahTemplate: http://www.cheetahtemplate.org/
Back to Top