small cleanup and improvements to standardization
This commit is contained in:
parent
64ba2cea1d
commit
a1ea0a07d1
@ -19,7 +19,7 @@ REDIRECT_LINK = "http%3A%2F%2Flocalhost%3A6969%2F"
|
||||
class FileGroups:
|
||||
videos = ('.mkv', '.avi', '.flv', '.mov', '.m4v', '.mpg', '.wmv', '.mpeg', '.mp4', '.webm')
|
||||
office = ('.doc', '.docx', '.xls', '.xlsx', '.xlt', '.xltx', '.xlm', '.ppt', 'pptx', '.pps', '.ppsx', '.odt', '.rtf')
|
||||
images = ('.png', '.jpg', '.jpeg', '.gif', '.ico', '.tga')
|
||||
images = ('.png', '.jpg', '.jpeg', '.gif', '.ico', '.tga', '.webp')
|
||||
text = ('.txt', '.text', '.sh', '.cfg', '.conf')
|
||||
music = ('.psf', '.mp3', '.ogg', '.flac', '.m4a')
|
||||
pdf = ('.pdf')
|
||||
@ -38,7 +38,7 @@ class Config(object):
|
||||
LOGIN_PATH = "FLASK_LOGIN" # Value can be OIDC or FLASK_LOGIN
|
||||
OIDC_TOKEN_TYPE_HINT = 'access_token'
|
||||
APP_REDIRECT_URI = REDIRECT_LINK
|
||||
OIDC_CLIENT_SECRETS = ROOT_FILE_PTH + '/client_secrets.json'
|
||||
OIDC_CLIENT_SECRETS = f'{ROOT_FILE_PTH}/client_secrets.json'
|
||||
OIDC_ID_TOKEN_COOKIE_SECURE = True
|
||||
OIDC_REQUIRE_VERIFIED_EMAIL = True
|
||||
OIDC_USER_INFO_ENABLED = True
|
||||
@ -47,7 +47,7 @@ class Config(object):
|
||||
'https://localhost:443/auth/realms/apps'
|
||||
]
|
||||
|
||||
STATIC_FPTH = ROOT_FILE_PTH + "/static"
|
||||
STATIC_FPTH = f"{ROOT_FILE_PTH}/static"
|
||||
FILEGROUPS = FileGroups
|
||||
VEXTENSION = FileGroups.videos
|
||||
OEXTENSION = FileGroups.office
|
||||
|
@ -20,11 +20,6 @@ def oidc_register():
|
||||
if _form.validate_on_submit():
|
||||
# TODO: Create...
|
||||
# NOTE: Do a requests api here maybe??
|
||||
|
||||
# hashed_password = bcrypt.generate_password_hash(_form.password.data).decode("utf-8")
|
||||
# user = User(username=_form.username.data, password=hashed_password)
|
||||
# db.session.add(user)
|
||||
# db.session.commit()
|
||||
flash("Account created successfully!", "success")
|
||||
return redirect("/login")
|
||||
|
||||
|
@ -46,7 +46,7 @@ class Logger:
|
||||
|
||||
if createFile:
|
||||
folder = "logs"
|
||||
file = folder + "/flask-application.log"
|
||||
file = f"{folder}/flask-application.log"
|
||||
|
||||
if not os.path.exists(folder):
|
||||
os.mkdir(folder)
|
||||
|
@ -10,5 +10,5 @@ class MessageHandler:
|
||||
print("MessageHandler initialized...")
|
||||
|
||||
|
||||
def createMessageJSON(self, type, text):
|
||||
def create_JSON_message(self, type, text):
|
||||
return '{"message": { "type": "' + type + '", "text": "' + text + '" } }'
|
||||
|
Loading…
Reference in New Issue
Block a user