diff --git a/ereuse_devicehub/config.py b/ereuse_devicehub/config.py index 5c25e43b..d1f89896 100644 --- a/ereuse_devicehub/config.py +++ b/ereuse_devicehub/config.py @@ -1,4 +1,3 @@ -import os from distutils.version import StrictVersion from itertools import chain from typing import Set @@ -79,4 +78,3 @@ class DevicehubConfig(Config): """Definition of path where save the documents of customers""" PATH_DOCUMENTS_STORAGE = config('PATH_DOCUMENTS_STORAGE', '/tmp/') JWT_PASS = config('JWT_PASS', '') - SECRET_KEY = os.urandom(32) diff --git a/ereuse_devicehub/devicehub.py b/ereuse_devicehub/devicehub.py index b3ed0eba..b4321e28 100644 --- a/ereuse_devicehub/devicehub.py +++ b/ereuse_devicehub/devicehub.py @@ -6,7 +6,6 @@ import boltons.urlutils import click import click_spinner import ereuse_utils.cli -from flask_login import LoginManager from ereuse_utils.session import DevicehubClient from flask.globals import _app_ctx_stack, g from flask_sqlalchemy import SQLAlchemy @@ -32,7 +31,6 @@ class Devicehub(Teal): test_client_class = Client Dummy = Dummy jinja_environment = Environment - login_manager = LoginManager() def __init__(self, inventory: str, diff --git a/ereuse_devicehub/views.py b/ereuse_devicehub/views.py index 2549ec54..3c5b28d0 100644 --- a/ereuse_devicehub/views.py +++ b/ereuse_devicehub/views.py @@ -33,7 +33,7 @@ class LoginView(View): class UserProfileView(View): - # decorators = [login_required] + decorators = [login_required] template_name = 'ereuse_devicehub/user_profile.html' def dispatch_request(self):