|
|
@ -5,9 +5,9 @@ from flask import ( |
|
|
|
render_template, |
|
|
|
redirect, |
|
|
|
url_for, |
|
|
|
flash, |
|
|
|
) |
|
|
|
from sqlalchemy.exc import ( |
|
|
|
IntegrityError, |
|
|
|
InvalidRequestError, |
|
|
|
DataError, |
|
|
|
InterfaceError, |
|
|
@ -77,9 +77,7 @@ def UnzipDistribusiFiles(distribusi, userfolder): |
|
|
|
|
|
|
|
def GetCssFile(distribusi): |
|
|
|
cssfile = "" |
|
|
|
cssfolder = os.path.join( |
|
|
|
"themes/userthemes", distribusi.distribusiname |
|
|
|
) |
|
|
|
cssfolder = os.path.join("themes/userthemes", distribusi.distribusiname) |
|
|
|
for filename in os.listdir(cssfolder): |
|
|
|
if filename.endswith(".css"): |
|
|
|
cssfile = os.path.join(cssfolder, filename) |
|
|
@ -99,7 +97,7 @@ def SetDistribusiToVisible(distribusi, user): |
|
|
|
db.session.commit() |
|
|
|
except (InvalidRequestError, DataError, InterfaceError, DatabaseError): |
|
|
|
db.session.rollback() |
|
|
|
distribusiform.submit.errors.append("Unknown error occured!") |
|
|
|
flash("Unknown error occured!") |
|
|
|
|
|
|
|
|
|
|
|
def DeleteCssFile(cssfile): |
|
|
|