Example #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()
Example #2
0
File: web.py Project: 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)

Example #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))

Example #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()

Example #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))
Example #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))