distribusi-verse: medium-tech web app content management system for the web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
864 B

import os
from flask_login import current_user
from usermodel import User
from distribusimodel import Distribusis
def AreFilesUploaded():
user = User.query.filter_by(email=current_user.email).first()
distribusi = Distribusis.query.filter_by(userid=user.id).first()
if distribusi is None:
print("distribusi is empty")
return False
userfolder = os.path.join("stash", distribusi.distribusiname)
if os.path.exists(userfolder):
print("folder found, files are uploaded")
return True
def HasDistribusi():
user = User.query.filter_by(email=current_user.email).first()
distribusi = Distribusis.query.filter_by(userid=user.id).first()
if distribusi is None:
print("distribusi is empty")
return False
return True
# def IsThemeSelected
# def IsCustomThemePresent
# def IsDistribusiLive