You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/howto-variant-feature-flags-python.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ If you already have a Python Flask web app, you can skip to the [Use the variant
106
106
self.password_hash = password
107
107
```
108
108
109
-
1. Create a new file called*routes.py*in the *QuoteOfTheDay* folder.
109
+
1. Create a new file named*routes.py*in the *QuoteOfTheDay* folder with the following content. It defines routes for the Flask web application, handling user authentication and displaying a homepage with a random quote.
110
110
111
111
```python
112
112
import random
@@ -275,6 +275,13 @@ If you already have a Python Flask web app, you can skip to the [Use the variant
275
275
<form action="/" method="post">
276
276
</form>
277
277
</div>
278
+
<script>
279
+
functionheartClicked(button) {
280
+
var icon = button.querySelector('i');
281
+
icon.classList.toggle('far');
282
+
icon.classList.toggle('fas');
283
+
}
284
+
</script>
278
285
{% endblock %}
279
286
```
280
287
@@ -418,7 +425,7 @@ If you already have a Python Flask web app, you can skip to the [Use the variant
418
425
pip install featuremanagement[AzureMonitor]
419
426
```
420
427
421
-
1. Open `app.py` and add the following code to connect to App Configuration and set up feature management.
428
+
1. Open the `app.py`file and add the following code to the end of the file. It connects to App Configuration and sets up feature management.
422
429
423
430
You use the `DefaultAzureCredential` to authenticate to your App Configuration store. Follow the [instructions](./concept-enable-rbac.md#authentication-with-token-credentials) to assign your credential the **App Configuration Data Reader** role. Be sure to allow sufficient timefor the permission to propagate before running your application.
424
431
@@ -449,7 +456,7 @@ If you already have a Python Flask web app, you can skip to the [Use the variant
0 commit comments