|
|
@ -1,6 +1,8 @@ |
|
|
|
import os |
|
|
|
from flask import render_template |
|
|
|
import bleach |
|
|
|
import shutil |
|
|
|
from flask import render_template |
|
|
|
|
|
|
|
from werkzeug.utils import secure_filename |
|
|
|
from sqlalchemy.exc import ( |
|
|
|
DataError, |
|
|
@ -38,9 +40,11 @@ def Editor(): |
|
|
|
|
|
|
|
def ValidateEditCssForm(editorform, current_distribusi): |
|
|
|
newcssfolder = os.path.join("themes/userthemes", current_distribusi) |
|
|
|
shutil.rmtree(newcssfolder) |
|
|
|
publicfolder = os.path.join("themes/publicthemes", current_distribusi) |
|
|
|
shutil.rmtree(publicfolder) |
|
|
|
if editorform.public.data: |
|
|
|
MakePublicTheme(editorform, current_distribusi) |
|
|
|
publicfolder = os.path.join("themes/publicthemes", current_distribusi) |
|
|
|
if editorform.cssfile.data: |
|
|
|
SaveUploadCssFile(editorform, publicfolder) |
|
|
|
else: |
|
|
|