示例#1
0
文件: home.py 项目: rjmolesa/Movuca
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")
示例#2
0
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")
示例#3
0
文件: home.py 项目: pigaov10/Movuca
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")
示例#4
0
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")
示例#5
0
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")
示例#6
0
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")
示例#7
0
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()

示例#8
0
 def __init__(self):
     self.datastore = Datastore()
     self.security = Security()
     self.home = Home()
     self.page_path = 'login.html'
示例#9
0
 def __init__(self):
     self.datastore = Datastore()
     self.security = Security()
     self.home = Home()
     self.login = Login()
     self.page_path = 'signup.html'