Clean HTML for admin site
This commit is contained in:
@@ -189,24 +189,23 @@ class DataSite:
|
||||
pageIndex.write_text(htmlExport)
|
||||
|
||||
def copy_static_files(self):
|
||||
themesStaticFolder = Path(PurePosixPath('app').joinpath('static','themes', self.datas['config']['theme'],'static'))
|
||||
publicStaticFolder = Path(PurePosixPath(self.user_folder).joinpath('public', 'static'))
|
||||
themesStaticFolder = Path(PurePosixPath('app').joinpath('static','themes', self.datas['config']['theme']))
|
||||
publicStaticFolder = Path(PurePosixPath(self.user_folder).joinpath('public', 'static', 'themes', self.datas['config']['theme']))
|
||||
|
||||
rmtree (publicStaticFolder, ignore_errors=True)
|
||||
|
||||
copytree(themesStaticFolder, publicStaticFolder)
|
||||
|
||||
|
||||
def publish(self, user:str, password:str, serverAddress:str, serverPort:int, folder:str):
|
||||
remote_directory = "/remote/dir"
|
||||
userDir = Path(PurePosixPath(self.user_folder))
|
||||
|
||||
|
||||
command = "lftp -u \"{}\",\"{}\" -p {} {} -e ' mirror -R public {}; chmod -R o+rx ./; bye;'".format(user,
|
||||
|
||||
password,
|
||||
serverPort,
|
||||
serverAddress,
|
||||
folder)
|
||||
print(command)
|
||||
folder)
|
||||
try:
|
||||
subprocess.call(command, shell=True, cwd=str(userDir))
|
||||
except ChildProcessError:
|
||||
|
||||
Reference in New Issue
Block a user