2018-02-03 09:34:07 +00:00
|
|
|
import flask; from flask import request
|
2018-02-03 09:43:41 +00:00
|
|
|
import random
|
2018-02-03 09:34:07 +00:00
|
|
|
|
2018-02-03 09:43:41 +00:00
|
|
|
from .. import common
|
2018-02-03 09:34:07 +00:00
|
|
|
|
|
|
|
site = common.site
|
|
|
|
session_manager = common.session_manager
|
|
|
|
|
|
|
|
####################################################################################################
|
|
|
|
|
|
|
|
@site.route('/')
|
|
|
|
def root():
|
2023-02-04 21:49:42 +00:00
|
|
|
common.permission_manager.global_public()
|
2018-02-03 09:34:07 +00:00
|
|
|
motd = random.choice(common.P.config['motd_strings'])
|
2019-08-14 20:40:52 +00:00
|
|
|
return common.render_template(request, 'root.html', motd=motd)
|
2018-02-03 09:34:07 +00:00
|
|
|
|
|
|
|
@site.route('/favicon.ico')
|
|
|
|
@site.route('/favicon.png')
|
|
|
|
def favicon():
|
2023-02-04 21:49:42 +00:00
|
|
|
common.permission_manager.global_public()
|
2018-02-03 09:34:07 +00:00
|
|
|
return flask.send_file(common.FAVICON_PATH.absolute_path)
|