Skip to content

Commit 0e2728d

Browse files
authored
Merge pull request hack4impact#44 from hack4impact/fix-small-bugs
Fix small bugs
2 parents 18a8a4c + a7f3176 commit 0e2728d

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

app/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
compress = Compress()
2020
# Set up Flask-Login
2121
login_manager = LoginManager()
22-
login_manager.session_protection = 'strong'
22+
# TODO: Ideally this should be strong, but that led to bugs. Once this is
23+
# fixed, switch protection mode back to 'strong'
24+
login_manager.session_protection = 'basic'
2325
login_manager.login_view = 'account.login'
2426

2527

app/templates/account/reset_password.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ <h2 class="ui dividing header">Reset your password</h2>
88
{{ f.render_form(form) }}
99
</div>
1010
</div>
11-
{% endblock %}
11+
{% endblock %}

app/templates/macros/form_macros.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
{% for field in form | selectattr('type', 'equalto', 'SubmitField') %}
3131
{{ render_form_field(field) }}
3232
{% endfor %}
33+
3334
{{ end_form(form) }}
3435
{% endmacro %}
3536

config.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class Config:
99
SECRET_KEY = os.environ.get('SECRET_KEY') or \
1010
'SjefBOa$1FgGco0SkfPO392qqH9%a492'
1111
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
12-
SSL_DISABLE = True
1312

1413
MAIL_SERVER = 'smtp.googlemail.com'
1514
MAIL_PORT = 587
@@ -56,6 +55,7 @@ class TestingConfig(Config):
5655
class ProductionConfig(Config):
5756
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
5857
'sqlite:///' + os.path.join(basedir, 'data.sqlite')
58+
SSL_DISABLE = (os.environ.get('SSL_DISABLE') or 'True') == 'True'
5959

6060
@classmethod
6161
def init_app(cls, app):
@@ -83,8 +83,6 @@ def init_app(cls, app):
8383

8484

8585
class HerokuConfig(ProductionConfig):
86-
SSL_DISABLE = bool(os.environ.get('SSL_DISABLE'))
87-
8886
@classmethod
8987
def init_app(cls, app):
9088
ProductionConfig.init_app(app)

0 commit comments

Comments
 (0)