Crown-Commercial-Service / govuk-frontend-jinja

Tools to use the GOV.UK Design System with Python webapps that use Jinja2 and Flask 🐍
MIT License
9 stars 6 forks source link

Make importable as GovUKFrontendJinja.init_app #22

Open benvand opened 5 years ago

benvand commented 5 years ago

https://github.com/alphagov/govuk-frontend-jinja/blob/master/govuk_frontend_jinja/flask_ext.py#L10

GovUKFrontendJinja.init_app ?

It doesn't seem to matter but does follow convention?

lfdebrux commented 4 years ago

The documentation for Flask seems to suggest that either form is good http://flask.palletsprojects.com/en/1.1.x/extensiondev/#initializing-extensions, I went for the function because I couldn't see a need for a class.