show date
This commit is contained in:
2
shop.py
2
shop.py
@@ -4,6 +4,7 @@ import sqlite3, time, datetime, hashlib, os
|
|||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
from flask import Flask, request, session, g, redirect, url_for, \
|
from flask import Flask, request, session, g, redirect, url_for, \
|
||||||
abort, render_template, flash
|
abort, render_template, flash
|
||||||
|
from revprox import ReverseProxied
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
DATABASE = 'shop.db'
|
DATABASE = 'shop.db'
|
||||||
@@ -16,6 +17,7 @@ PASSWORD = 'default'
|
|||||||
# create our little application :)
|
# create our little application :)
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config.from_object(__name__)
|
app.config.from_object(__name__)
|
||||||
|
app.wsgi_app = ReverseProxied(app.wsgi_app)
|
||||||
|
|
||||||
def connect_db():
|
def connect_db():
|
||||||
if not os.path.exists(app.config['DATABASE']):
|
if not os.path.exists(app.config['DATABASE']):
|
||||||
|
|||||||
Reference in New Issue
Block a user