Skip to content

Commit 7740424

Browse files
committed
Update howto-variant-feature-flags-python.md
1 parent 058443c commit 7740424

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

articles/azure-app-configuration/howto-variant-feature-flags-python.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ If you already have a Python Flask web app, you can skip to the [Use the variant
106106
self.password_hash = password
107107
```
108108
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.
110110
111111
```python
112112
import random
@@ -275,6 +275,13 @@ If you already have a Python Flask web app, you can skip to the [Use the variant
275275
<form action="/" method="post">
276276
</form>
277277
</div>
278+
<script>
279+
function heartClicked(button) {
280+
var icon = button.querySelector('i');
281+
icon.classList.toggle('far');
282+
icon.classList.toggle('fas');
283+
}
284+
</script>
278285
{% endblock %}
279286
```
280287
@@ -418,7 +425,7 @@ If you already have a Python Flask web app, you can skip to the [Use the variant
418425
pip install featuremanagement[AzureMonitor]
419426
```
420427
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.
422429
423430
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 time for the permission to propagate before running your application.
424431
@@ -449,7 +456,7 @@ If you already have a Python Flask web app, you can skip to the [Use the variant
449456
feature_manager = FeatureManager(azure_app_config)
450457
```
451458
452-
1. Open `routes.py` and add the following code to refresh configuration and get the feature variant.
459+
1. Open `routes.py` and add the following code to the end of it to refresh configuration and get the feature variant.
453460
454461
```python
455462
from featuremanagement.azuremonitor import track_event

0 commit comments

Comments
 (0)