示例#1
0
文件: views.py 项目: gmist/solostyle
def index():
    services_info = ServicesInfo.get_master_db()
    return render_template(
            'services/index.html',
            html_class='services_page',
            services_info=services_info
            )
示例#2
0
文件: views.py 项目: gmist/solostyle
def index():
    services_info = ServicesInfo.get_master_db()
    form = ServicesInfoForm(obj=services_info)
    if request.method == 'POST' and form.validate_on_submit():
        form.populate_obj(services_info)
        services_info.put()
        return redirect(url_for('services.admin.index'))
    return render_template(
        'services/admin/index.html',
        form=form
    )