2022-01-23 14:36:23 +01:00
|
|
|
import os
|
|
|
|
from flask_login import current_user
|
|
|
|
from usermodel import User
|
2022-02-13 21:49:07 +01:00
|
|
|
from distribusimodel import Distribusis
|
2022-01-23 17:33:50 +01:00
|
|
|
|
2022-02-13 22:24:56 +01:00
|
|
|
|
2022-01-23 14:36:23 +01:00
|
|
|
def AreFilesUploaded():
|
|
|
|
user = User.query.filter_by(email=current_user.email).first()
|
2022-02-13 21:49:07 +01:00
|
|
|
distribusi = Distribusis.query.filter_by(userid=user.id).first()
|
|
|
|
if distribusi is None:
|
|
|
|
print("distribusi is empty")
|
2022-01-23 17:33:50 +01:00
|
|
|
return False
|
2022-02-13 21:49:07 +01:00
|
|
|
userfolder = os.path.join("stash", distribusi.distribusiname)
|
2022-01-23 14:36:23 +01:00
|
|
|
if os.path.exists(userfolder):
|
|
|
|
print("folder found, files are uploaded")
|
2022-01-23 17:33:50 +01:00
|
|
|
return True
|
|
|
|
|
2022-01-23 14:36:23 +01:00
|
|
|
|
2022-01-23 17:33:50 +01:00
|
|
|
# def IsThemeSelected
|
|
|
|
# def IsCustomThemePresent
|
|
|
|
# def IsDistribusiLive
|