Skip to content

Commit 7ca79ab

Browse files
authored
Merge pull request #205027 from vmagelo/small-fixes
Address issues raised by read-behind.
2 parents cf087c5 + c2c91fc commit 7ca79ab

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

articles/app-service/tutorial-python-postgresql-app.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,14 @@ pip install -r requirements.txt
6969
> [!NOTE]
7070
> If you are following along with this tutorial with your own app, look at the *requirements.txt* file description in each project's *README.md* file ([Flask](https://github.com/Azure-Samples/msdocs-flask-postgresql-sample-app/blob/main/README.md), [Django](https://github.com/Azure-Samples/msdocs-django-postgresql-sample-app/blob/main/README.md)) to see what packages you'll need.
7171
72-
Set environment variables to specify how to connect to a local PostgreSQL instance.
72+
This sample application requires an *.env* file describing how to connect to your local PostgreSQL instance. Create an *.env* file as shown below using the *.env.sample* file as a guide. Set the value of `DBNAME` to the name of an existing database in your local PostgreSQL instance. This tutorial assumes the database name is *restaurant*. Set the values of `DBHOST`, `DBUSER`, and `DBPASS` as appropriate for your local PostgreSQL instance.
7373

74-
This sample application requires an *.env* file describing how to connect to your local PostgreSQL instance. Create an *.env* file using the *.env.sample* file as a guide. Set the value of `DBNAME` to the name of an existing database in your local PostgreSQL instance. This tutorial assumes the database name is *restaurant*. Set the values of `DBHOST`, `DBUSER`, and `DBPASS` as appropriate for your local PostgreSQL instance.
74+
```
75+
DBNAME=<database name>
76+
DBHOST=<database-hostname>
77+
DBUSER=<db-user-name>
78+
DBPASS=<db-password>
79+
```
7580

7681
For Django, you can use SQLite locally instead of PostgreSQL by following the instructions in the comments of the [*settings.py*](https://github.com/Azure-Samples/msdocs-django-postgresql-sample-app/blob/main/azureproject/settings.py) file.
7782

@@ -110,14 +115,14 @@ python manage.py runserver
110115

111116
### [Flask](#tab/flask)
112117

113-
In a web browser, go to the sample application at `http://localhost:5000` and add some restaurants and restaurant reviews to see how the app works.
118+
In a web browser, go to the sample application at `http://127.0.0.1:5000` and add some restaurants and restaurant reviews to see how the app works.
114119

115120
:::image type="content" source="./media/tutorial-python-postgresql-app/run-flask-postgresql-app-localhost.png" alt-text="A screenshot of the Flask web app with PostgreSQL running locally showing restaurants and restaurant reviews.":::
116121

117122

118123
### [Django](#tab/django)
119124

120-
In a web browser, go to the sample application at `http://localhost:8000` and add some restaurants and restaurant reviews to see how the app works.
125+
In a web browser, go to the sample application at `http://127.0.0.1:8000` and add some restaurants and restaurant reviews to see how the app works.
121126

122127
:::image type="content" source="./media/tutorial-python-postgresql-app/run-django-postgresql-app-localhost.png" alt-text="A screenshot of the Django web app with PostgreSQL running locally showing restaurants and restaurant reviews.":::
123128

0 commit comments

Comments
 (0)