You've already forked snikket-web-portal
Add custom homepage template
This commit is contained in:
@@ -177,6 +177,7 @@ class AppConfig:
|
||||
abuse_email = environ.var("")
|
||||
security_email = environ.var("")
|
||||
|
||||
admin_contact = environ.var("")
|
||||
|
||||
_UPPER_CASE = "".join(map(chr, range(ord("A"), ord("Z")+1)))
|
||||
|
||||
@@ -215,6 +216,8 @@ def create_app() -> quart.Quart:
|
||||
app.config["SESSION_COOKIE_SECURE"] = True
|
||||
app.config["SESSION_COOKIE_SAMESITE"] = "Lax"
|
||||
|
||||
app.config["ADMIN_CONTACT"] = config.admin_contact
|
||||
|
||||
app.context_processor(proc)
|
||||
app.register_error_handler(
|
||||
aiohttp.ClientConnectorError,
|
||||
@@ -230,11 +233,11 @@ def create_app() -> quart.Quart:
|
||||
)
|
||||
|
||||
@app.route("/")
|
||||
async def index() -> werkzeug.Response:
|
||||
async def index() -> typing.Union[str, werkzeug.Response]:
|
||||
if infra.client.has_session:
|
||||
return redirect(url_for('user.index'))
|
||||
return redirect(url_for("user.index"))
|
||||
|
||||
return redirect(url_for('main.login'))
|
||||
return await render_template("home.html")
|
||||
|
||||
@app.route("/site.webmanifest")
|
||||
def site_manifest() -> quart.Response:
|
||||
|
||||
Reference in New Issue
Block a user