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

Configure Flask app using tarbell_config #419

Open
eyeseast opened this issue May 6, 2016 · 0 comments
Open

Configure Flask app using tarbell_config #419

eyeseast opened this issue May 6, 2016 · 0 comments
Milestone

Comments

@eyeseast
Copy link
Contributor

eyeseast commented May 6, 2016

Building on the discussion from #287, Flask extensions (including Frozen Flask, which Tarbell uses) often rely on settings in a config file. For example, setting FREEZER_IGNORE_404_NOT_FOUND = True is often useful in development. Or as in #287, setting thumbnail source and destination directories.

We can tell Tarbell's underlying Flask app to configure itself based on tarbell_config like so:

site = TarbellSite(path)
site.app.config.from_object(site.project)

Or, really, do that in TarbellSite.__init__.

This doesn't deal with registering Flask extensions themselves, but it makes the process less repetitive.

@eyeseast eyeseast added this to the 2.0 milestone May 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant