def default( templatename = None, error = None, redirect_func = None ): if not error is None: flash(error, 'error'); if not redirect_func is None: return call_view(redirect_func) if templatename is None: return redirect(url_for('news.default')) if templatename is None: templatename = 'layout.html' return render_template( templatename )
def edit_aboutus(): cnt = Content.query.filter_by(tag= 'about-us').first() return call_view('admin.edit', model_name = 'Content', model_url_key = cnt.id.__repr__())
def edit_officer(): return call_view('admin.list', model_name='Officer')
def update_offices(): return call_view('admin.list', model_name='Office')
def admin_list_events(): return call_view('admin.list', model_name='Event')
def admin_add_event(): return call_view('admin.add', model_name='Event')
def admin_list_posts(): return call_view('admin.list', model_name='NewsPost')