Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from offres_emploi import Api
|
|
6 |
from offres_emploi.utils import dt_to_str_iso
|
7 |
from dash import Dash, html, dcc, callback, Output, Input, dash_table, State, _dash_renderer, clientside_callback
|
8 |
import dash_bootstrap_components as dbc
|
9 |
-
import
|
10 |
import plotly.express as px
|
11 |
import plotly.graph_objects as go
|
12 |
import dash_mantine_components as dmc
|
@@ -608,11 +608,10 @@ VALID_USERNAME_PASSWORD_PAIRS = {
|
|
608 |
'hello': 'world'
|
609 |
}
|
610 |
app = CustomDash(__name__, server=server, external_scripts=external_scripts, external_stylesheets=dmc.styles.ALL, on_error=custom_error_handler)
|
611 |
-
|
612 |
-
app,
|
613 |
-
VALID_USERNAME_PASSWORD_PAIRS
|
614 |
-
)
|
615 |
print(os.getenv('VALID_USERNAME_PASSWORD_PAIRS'))
|
|
|
|
|
616 |
def connexion_France_Travail():
|
617 |
client = Api(client_id=os.getenv('POLE_EMPLOI_CLIENT_ID'),
|
618 |
client_secret=os.getenv('POLE_EMPLOI_CLIENT_SECRET'))
|
|
|
6 |
from offres_emploi.utils import dt_to_str_iso
|
7 |
from dash import Dash, html, dcc, callback, Output, Input, dash_table, State, _dash_renderer, clientside_callback
|
8 |
import dash_bootstrap_components as dbc
|
9 |
+
from dash_auth import BasicAuth
|
10 |
import plotly.express as px
|
11 |
import plotly.graph_objects as go
|
12 |
import dash_mantine_components as dmc
|
|
|
608 |
'hello': 'world'
|
609 |
}
|
610 |
app = CustomDash(__name__, server=server, external_scripts=external_scripts, external_stylesheets=dmc.styles.ALL, on_error=custom_error_handler)
|
611 |
+
BasicAuth(app, VALID_USERNAME_PASSWORD_PAIRS)
|
|
|
|
|
|
|
612 |
print(os.getenv('VALID_USERNAME_PASSWORD_PAIRS'))
|
613 |
+
print(BasicAuth(app, VALID_USERNAME_PASSWORD_PAIRS))
|
614 |
+
|
615 |
def connexion_France_Travail():
|
616 |
client = Api(client_id=os.getenv('POLE_EMPLOI_CLIENT_ID'),
|
617 |
client_secret=os.getenv('POLE_EMPLOI_CLIENT_SECRET'))
|