Exemplo n.º 1
0
                              state='success',
                              url='/',
                              code=302)
    response = render_message(request,
                              'Please authenticate',
                              format,
                              state='success',
                              code=401)
    response.headers['WWW-Authenticate'] = 'Basic realm="WebStore access"'
    return response


@app.route('/favicon.ico')
@app.route('/robots.txt')
@app.route('/index.html')
@app.route('/scripts/<path:any>')
def handle(any=None):
    abort(404)


@app.route('/')
def home():
    return render_template('index.html')


app.register_blueprint(store)

if __name__ == "__main__":
    logging.basicConfig(level=logging.NOTSET)
    app.run()
Exemplo n.º 2
0
Arquivo: web.py Projeto: rgrp/webstore
    g.user = check_function(request)

@app.route('/login')
def login():
    """ Helper function to provoke authorization via the browser. """
    if g.user:
        return render_message(request, '', format, state='success', url='/', 
                              code=302)
    response = render_message(request, 'Please authenticate',
                              format, state='success', code=401)
    response.headers['WWW-Authenticate'] = 'Basic realm="WebStore access"'
    return response

@app.route('/favicon.ico')
@app.route('/robots.txt')
@app.route('/index.html')
@app.route('/scripts/<path:any>')
def handle(any=None):
    abort(404)

@app.route('/')
def home():
    return render_template('index.html')

app.register_blueprint(store)

if __name__ == "__main__":
    logging.basicConfig(level=logging.NOTSET)
    app.run(host=app.config['HOST'], port=app.config['PORT'], debug=True)

Exemplo n.º 3
0
    g.user = check_function(request)

@app.route('/login')
def login():
    """ Helper function to provoke authorization via the browser. """
    if g.user:
        return render_message(request, '', format, state='success', url='/', 
                              code=302)
    response = render_message(request, 'Please authenticate',
                              format, state='success', code=401)
    response.headers['WWW-Authenticate'] = 'Basic realm="WebStore access"'
    return response

@app.route('/favicon.ico')
@app.route('/robots.txt')
@app.route('/index.html')
@app.route('/scripts/<path:any>')
def handle(any=None):
    abort(404)

@app.route('/')
def home():
    return render_template('index.html', copyright_end=datetime.now().year)

app.register_blueprint(store)

if __name__ == "__main__":
    logging.basicConfig(level=logging.NOTSET)
    app.run(host=app.config['HOST'], port=app.config['PORT'], debug=app.config.get('DEBUG', True))

Exemplo n.º 4
0
    g.user = check_function(request)

@app.route('/login')
def login():
    """ Helper function to provoke authorization via the browser. """
    if g.user:
        return render_message(request, '', format, state='success', url='/', 
                              code=302)
    response = render_message(request, 'Please authenticate',
                              format, state='success', code=401)
    response.headers['WWW-Authenticate'] = 'Basic realm="WebStore access"'
    return response

@app.route('/favicon.ico')
@app.route('/robots.txt')
@app.route('/index.html')
@app.route('/scripts/<path:any>')
def handle(any=None):
    abort(404)

@app.route('/')
def home():
    return render_template('index.html')

app.register_blueprint(store)

if __name__ == "__main__":
    logging.basicConfig(level=logging.NOTSET)
    app.run()

Exemplo n.º 5
0

@app.route("/login")
def login():
    """ Helper function to provoke authorization via the browser. """
    if g.user:
        return render_message(request, "", format, state="success", url="/", code=302)
    response = render_message(request, "Please authenticate", format, state="success", code=401)
    response.headers["WWW-Authenticate"] = 'Basic realm="WebStore access"'
    return response


@app.route("/favicon.ico")
@app.route("/robots.txt")
@app.route("/index.html")
@app.route("/scripts/<path:any>")
def handle(any=None):
    abort(404)


@app.route("/")
def home():
    return render_template("index.html")


app.register_blueprint(store)

if __name__ == "__main__":
    logging.basicConfig(level=logging.NOTSET)
    app.run(host=app.config["HOST"], port=app.config["PORT"], debug=app.config.get("DEBUG", True))
Exemplo n.º 6
0
                              code=302)
    response = render_message(request,
                              'Please authenticate',
                              format,
                              state='success',
                              code=401)
    response.headers['WWW-Authenticate'] = 'Basic realm="WebStore access"'
    return response


@app.route('/favicon.ico')
@app.route('/robots.txt')
@app.route('/index.html')
@app.route('/scripts/<path:any>')
def handle(any=None):
    abort(404)


@app.route('/')
def home():
    return render_template('index.html', copyright_end=datetime.now().year)


app.register_blueprint(store)

if __name__ == "__main__":
    logging.basicConfig(level=logging.NOTSET)
    app.run(host=app.config['HOST'],
            port=app.config['PORT'],
            debug=app.config.get('DEBUG', True))