def index(): from handlers.home import Home home = Home(['featured', 'featured_members', 'ads', 'homeblocks']) home.context.left_sidebar_enabled = True home.context.right_sidebar_enabled = True home.context.header_enabled = not request.user_agent().is_mobile return home.render("app/home")
def index(): from handlers.home import Home home = Home(['featured', 'ads']) home.context.left_sidebar_enabled = True home.context.right_sidebar_enabled = True home.context.header_enabled = True return home.render("app/home")
def index(): from handlers.home import Home home = Home(['featured', 'featured_members', 'homeblocks', 'articles']) home.context.left_sidebar_enabled = True home.context.right_sidebar_enabled = True home.context.header_enabled = True home.context.toparea_enabled = True return home.render("app/home")
def index(): #redirect(URL('home', 'index')) from handlers.home import Home home = Home(['featured', 'featured_members', 'ads', 'homeblocks', 'articles']) home.context.left_sidebar_enabled = True home.context.right_sidebar_enabled = True home.context.header_enabled = True home.context.toparea_enabled = True theme_name = home.context.theme_name return home.render("app/home")
def index(): #redirect(URL('home', 'index')) from handlers.home import Home home = Home( ['featured', 'featured_members', 'ads', 'homeblocks', 'articles']) home.context.left_sidebar_enabled = True home.context.right_sidebar_enabled = True home.context.header_enabled = True home.context.toparea_enabled = True theme_name = home.context.theme_name return home.render("app/home")
def index(): from handlers.home import Home home = Home() home.context.left_sidebar_enabled = True home.context.right_sidebar_enabled = True return home.render("app/home")
from flask import Flask, request, redirect, Response from livereload import Server from handlers.signup import Signup from handlers.login import Login from handlers.logout import Logout from handlers.home import Home from handlers.post import Post from handlers.security import Security import base64 import datetime app = Flask(__name__) signup = Signup() login = Login() logout = Logout() home = Home() post = Post() security = Security() @app.route("/login", methods=['GET', 'POST']) def login_handler(): if request.method == 'POST': return login.do_login( request.form.get('username'), request.form.get('password')) elif request.method == 'GET': return login.render_page()
def __init__(self): self.datastore = Datastore() self.security = Security() self.home = Home() self.page_path = 'login.html'
def __init__(self): self.datastore = Datastore() self.security = Security() self.home = Home() self.login = Login() self.page_path = 'signup.html'