Tags: jinja

Sort by: Date / Title /

  1. 3 years ago by macks
    1. #---libs/date.py
    2. def format_date(value, format="%d/%m/%Y %H:%M:%S"):
    3.         return value.strftime(format)
    4.  
    5. #-----settings
    6. from libs.filters import format_date
    7. from jinja2 import Environment, FileSystemLoader
    8. TEMPLATE_ENV.filters["format_date"] = format_date
    9.  
    10. #---template
    11. <td>{{ h.date|format_date('%d/%m/%Y') }}</td>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2104"></script>

First / Previous / Next / Last / Page 1 of 1 (1 posteets)