Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    flask-jade2underscore 0.1

    Download button

    No screenshots available
    Downloads: 43  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Manuel Albarran | More programs
    MIT/X Consortium Lic... / FREE
    September 10th, 2012, 12:18 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    flask-jade2underscore description

    Adds suppot for Jade2Underscore templates compiler to Flask

    flask-jade2underscore is a tiny Flask extension that allows developers to easily use Jade to Underscore templates compiler, which is used in Backbone, with their Flask app.

    Installation

    Install with PIP

    pip install flask-jade2underscore

    Usage

    This extension can be activated it by calling the jade2underscore function with your Flask app as a parameter:

    from flaskext.jade2underscore import jade2underscore
    jade2underscore(app, underscore_folder='templates', jade_folder='src/jade')


    This will intercept the request to /static/underscore_folder and compile de file if is necesary using the files from jade_folder.

    When you deploy your app you might not want to accept the overhead of checking the modification time of your .jade and .tpl files on each request. A simple way to avoid this is wrapping the jade2underscore call in an if statement:

    if app.debug:
     from flaskext.jade2underscore import jade2underscore
     jade2underscore(app)


    If you do this you’ll be responsible for rendering the .jade files into .tpl when you deploy in non-debug mode to your production server.


    Product's homepage

    Requirements:

    · Python
    · Flask

      


    TAGS:

    Jade2Underscore templates | Flask extension | Python library | Python | Flask | Jade2Underscore

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM