New Membership Page and other changes #4
1 changed files with 5 additions and 1 deletions
6
main.py
6
main.py
|
@ -83,9 +83,13 @@ if os.environ.get("PRIVATECOFFEE_DEV"):
|
||||||
|
|
||||||
def icon(icon_name):
|
def icon(icon_name):
|
||||||
file = send_from_directory("assets", f"dist/icons/{icon_name}.svg")
|
file = send_from_directory("assets", f"dist/icons/{icon_name}.svg")
|
||||||
file_content = file.response.file.read().decode("utf-8")
|
try:
|
||||||
|
file_content = file.response.file.read().decode("utf-8")
|
||||||
|
except AttributeError:
|
||||||
|
file_content = file.response.read().decode("utf-8")
|
||||||
return file_content
|
return file_content
|
||||||
|
|
||||||
|
|
||||||
app.add_template_filter(icon)
|
app.add_template_filter(icon)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in a new issue