version number and site name
This commit is contained in:
@@ -11,10 +11,12 @@ import hashlib
|
|||||||
import zipfile
|
import zipfile
|
||||||
from revprox import ReverseProxied
|
from revprox import ReverseProxied
|
||||||
|
|
||||||
|
__FLEES_VERSION__ = "20180218.0"
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config.from_object(__name__)
|
app.config.from_object(__name__)
|
||||||
# Read config from json !
|
# Read config from json !
|
||||||
config_values = json.load(open(os.getenv('FLEES_CONFIG'),'rt'))
|
config_values = json.load(open(os.getenv('FLEES_CONFIG'),'rt'))
|
||||||
|
app.config['SITE_NAME'] = config_values['site_name']
|
||||||
app.config['UPLOAD_FOLDER'] = config_values['data_folder']
|
app.config['UPLOAD_FOLDER'] = config_values['data_folder']
|
||||||
app.config['SHARES_FILE'] = config_values['shares_file']
|
app.config['SHARES_FILE'] = config_values['shares_file']
|
||||||
app.config['ZIP_FOLDER'] = config_values['zip_folder']
|
app.config['ZIP_FOLDER'] = config_values['zip_folder']
|
||||||
@@ -30,6 +32,8 @@ app.wsgi_app = ReverseProxied(app.wsgi_app)
|
|||||||
@app.before_request
|
@app.before_request
|
||||||
def before_request():
|
def before_request():
|
||||||
g.shares = json.load(open(app.config['SHARES_FILE'],'rt'))
|
g.shares = json.load(open(app.config['SHARES_FILE'],'rt'))
|
||||||
|
g.version = __FLEES_VERSION__
|
||||||
|
g.site_name = app.config['SITE_NAME']
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ a:link {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 7px;
|
padding-top: 7px;
|
||||||
}
|
}
|
||||||
|
.version_number {
|
||||||
|
font-size: xx-small;
|
||||||
|
}
|
||||||
|
|
||||||
td,th {
|
td,th {
|
||||||
min-width: 10em;
|
min-width: 10em;
|
||||||
padding-right: 2em;
|
padding-right: 2em;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% extends "layout.html" %}
|
{% extends "layout.html" %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div id=index_title><h1>Flees</h1></div>
|
<div id=index_title><h1>{{ g.site_name | safe }}</h1></div>
|
||||||
<div id=index_menu>
|
<div id=index_menu>
|
||||||
<div id=index_enter>
|
<div id=index_enter>
|
||||||
<input id="index_form_name" type=text name=name title="Hidden share name"
|
<input id="index_form_name" type=text name=name title="Hidden share name"
|
||||||
|
|||||||
@@ -13,6 +13,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% block body %}{% endblock %}
|
{% block body %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<div id=footer><a href="http://bitbucket.org/MoonQ/flees">Flees</a></div>
|
<div id=footer>{{ g.site_name | safe }} - <a href="http://bitbucket.org/MoonQ/flees">Flees</a> <span class="version_number">v{{ g.version | safe }}</span></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"app_secret_key: used to encrypt session cookie"
|
"app_secret_key: used to encrypt session cookie"
|
||||||
],
|
],
|
||||||
"public_url": "https://my.server.com/flees",
|
"public_url": "https://my.server.com/flees",
|
||||||
|
"site_name": "File sharing",
|
||||||
"workers": 8,
|
"workers": 8,
|
||||||
"timeout": 3600,
|
"timeout": 3600,
|
||||||
"uid": 1000,
|
"uid": 1000,
|
||||||
|
|||||||
Reference in New Issue
Block a user