|
|
@ -5,6 +5,7 @@ from flask import ( |
|
|
|
redirect, |
|
|
|
url_for, |
|
|
|
session, |
|
|
|
send_from_directory, |
|
|
|
Blueprint, |
|
|
|
) |
|
|
|
from flask_login import ( |
|
|
@ -17,6 +18,7 @@ from flask_wtf.csrf import CSRFError |
|
|
|
from app import create_app, login_manager |
|
|
|
|
|
|
|
from usermodel import User |
|
|
|
from distribusimodel import Distribusis |
|
|
|
|
|
|
|
# Use upload form to populate filters |
|
|
|
from forms.uploadform import UploadForm |
|
|
@ -107,6 +109,15 @@ def theme(): |
|
|
|
return ThemeSelector() |
|
|
|
|
|
|
|
|
|
|
|
@APP.route("/publicthemes/<path>") |
|
|
|
def publicthemes(path): |
|
|
|
distribusi = Distribusis.query.filter_by(distribusiname=path).first() |
|
|
|
publicthemefolder = f"publicthemes/{distribusi.distribusiname}/" |
|
|
|
cssfile = f"{publicthemefolder}/{distribusi.publictheme}.css" |
|
|
|
print(cssfile) |
|
|
|
return send_from_directory("themes", cssfile, as_attachment=True) |
|
|
|
|
|
|
|
|
|
|
|
@APP.route("/editor", methods=["GET", "POST"]) |
|
|
|
@login_required |
|
|
|
def editor(): |
|
|
@ -156,7 +167,6 @@ def forgotpassword(): |
|
|
|
|
|
|
|
@APP.route("/resetpassword/<path>", methods=["GET", "POST"]) |
|
|
|
def resetpassword(path): |
|
|
|
print(path) |
|
|
|
return ResetPassword(path) |
|
|
|
|
|
|
|
|
|
|
|