Skip to content

Commit

Permalink
Make compatible with latest Flask and Dash releases
Browse files Browse the repository at this point in the history
  • Loading branch information
delsim committed Nov 11, 2022
1 parent f6b23f5 commit b7b37db
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 1 addition & 3 deletions dev_requirements.txt
@@ -1,11 +1,9 @@
asgiref
attrs==19.3.0
attrs
coveralls>=1.6.0
channels>=2.0
channels-redis
daphne
dash-bootstrap-components
Django>=2.0
django-bootstrap4
django-redis
dpd-static-support>=0.0.4
Expand Down
6 changes: 5 additions & 1 deletion django_plotly_dash/dash_wrapper.py
Expand Up @@ -375,10 +375,12 @@ def get_asset_url(self, asset_name):
class PseudoFlask(Flask):
'Dummy implementation of a Flask instance, providing stub functionality'
def __init__(self):
self.config = {}
self.config = {'DEBUG': False}
self.endpoints = {}
self.name = "PseudoFlaskDummyName"
self.blueprints = {}
self._got_first_request = False
self.before_request_funcs = {}

# pylint: disable=unused-argument, missing-docstring

Expand Down Expand Up @@ -425,6 +427,8 @@ def __init__(self,
kwargs['url_base_pathname'] = self._base_pathname
kwargs['server'] = self._notflask

#xkwargs['DEBUG'] = kwargs.get('DEBUG', False)

super().__init__(__name__, **kwargs)

self.css.config.serve_locally = serve_locally
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Expand Up @@ -4,7 +4,7 @@ dpd-components

dash-bootstrap-components

channels<3.0
channels>=2.0
Django>=2.2,<4.0.0
Flask>=1.0.2
Werkzeug>=2.0,<2.1
Werkzeug
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -46,10 +46,10 @@

'dash-bootstrap-components',

'channels<3.0',
'channels>=2.0',
'Django>=2.2,<4.0.0',
'Flask>=1.0.2',
'Werkzeug>=2.0,<2.1',
'Werkzeug',
],
python_requires=">=3.8",
)
Expand Down

0 comments on commit b7b37db

Please sign in to comment.