Update app.py
Added removal of escape template if not Nth page load
This commit is contained in:
parent
574c66db5e
commit
7d373b8cf4
6
app.py
6
app.py
|
@ -13,7 +13,6 @@ unique_requests = set()
|
|||
# OR change the ROOT_DIR path below :)
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
WEBSITE_DIRS = [name for name in os.listdir(ROOT_DIR) if not name.startswith('.') and os.path.isdir(os.path.join(ROOT_DIR, name))]
|
||||
print(ROOT_DIR)
|
||||
|
||||
# Site choosing logic
|
||||
website_dir = None
|
||||
|
@ -24,6 +23,11 @@ def current_website_dir():
|
|||
global website_dir
|
||||
website_dir = str(ROOT_DIR+"/Marvel")
|
||||
else:
|
||||
global WEBSITE_DIRS
|
||||
try:
|
||||
WEBSITE_DIRS.remove('Marvel')
|
||||
except ValueError:
|
||||
pass
|
||||
website_dir = random.choice(WEBSITE_DIRS)
|
||||
|
||||
# Make static files available
|
||||
|
|
Loading…
Reference in New Issue