Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure Compatibility with flask_frozen v1.0.1 #182

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Werkzeug<3.0.0
Flask<3.0.0
markdown2
emoji>=2.0.0,<3.0
frozen-flask
frozen-flask==1.0.1
hfaran marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 8 additions & 2 deletions slackviewer/freezer.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
from flask_frozen import Freezer
from pathlib import Path

class CustomFreezer(Freezer):

cf_output_dir = None

@property
def root(self):
return u"{}".format(self.cf_output_dir)

# Use the specified cf_output_dir if set
if self.cf_output_dir:
return Path(self.cf_output_dir)
# Otherwise, follow the default behavior of flask_frozen
else:
root = Path(self.app.root_path)
return root / self.app.config['FREEZER_DESTINATION']
Loading