pythononwheels / pow_devel

development repo for PyhtonOnWheels framework
www.pythononwheels.org
MIT License
75 stars 10 forks source link

add a generate_view scaffolding #33

Closed pythononwheels closed 4 years ago

pythononwheels commented 5 years ago

Command idea:

generate_view -n name -b <base>

will generate a basic tornado template with the following basic structure:

{% extends ../<base> %}

{% block include_js %}
    // all needed js libs for this view go here
{% end %}

{% block view_js %}
     function view_docready(){
        // everything that needs to be executed in docready for this view
       // goes here.
     }
{% end %}

{% block include_css %}
    // all css includes for this view here

{% end %}

{% block css %}
   // all css for this view here
{% end %}

Sio everything will be niocely embedded in a base template and you do not pollute the css/js includes or <style> / <script> blocks but keep them locally in every view.

pythononwheels commented 4 years ago

added since 0.92x