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/app-service/containers/tutorial-python-postgresql-app.md
+31-16Lines changed: 31 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: 'Tutorial: Linux Python app with Postgre'
3
3
description: Learn how to get a Linux Python app working in Azure App Service, with connection to a PostgreSQL database in Azure. Django is used in this tutorial.
# Tutorial: Run a Python (Django) web app with PostgreSQL in Azure App Service
@@ -38,6 +38,11 @@ First, connect to your local PostgreSQL server and create a database:
38
38
In a local terminal window, run `psql` to connect to your local PostgreSQL server as the built-in `postgres` user.
39
39
40
40
```bash
41
+
sudo su - postgres
42
+
psql
43
+
```
44
+
or
45
+
```PowerShell
41
46
psql -U postgres
42
47
```
43
48
@@ -157,23 +162,27 @@ In the following command, replace *\<postgresql-name>* with a unique server name
157
162
Replace *\<resourcegroup-name>* and *\<region>* with the name and region of the resource group you want to use. For *\<admin-username>* and *\<admin-password>*, create user credentials for the database administrator account. Remember the *\<admin-username>* and *\<admin-password>* to use later for signing in to the PostgreSQL server and databases.
158
163
159
164
```azurecli-interactive
160
-
az postgres server create --resource-group <resourcegroup-name> --name <postgresql-name> --location "<region>" --admin-user <admin-username> --admin-password <admin-password> --sku-name B_Gen4_1
165
+
az postgres server create --resource-group <resourcegroup-name> --name <postgresql-name> --location "<region>" --admin-user <admin-username> --admin-password <admin-password> --sku-name B_Gen5_1
161
166
```
162
167
163
168
When the Azure Database for PostgreSQL server is created, the Azure CLI returns JSON code like the following example:
0 commit comments