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
After `installation <#Installation>`__, you'll have to update your Django
58
-
``settings.py`` file as follows.
69
+
This package provides a Django application named ``django_spanner``. To use the
70
+
Cloud Spanner database backend, the application needs to installed and
71
+
configured:
59
72
60
-
- Add ``django_spanner`` as the very first entry in the ``INSTALLED_APPS``
61
-
settings:
73
+
- Add ``django_spanner`` as the first entry in ``INSTALLED_APPS``:
62
74
63
75
.. code:: python
64
76
@@ -67,34 +79,36 @@ After `installation <#Installation>`__, you'll have to update your Django
67
79
...
68
80
]
69
81
70
-
- Edit the ``DATABASES`` settings to point to an EXISTING database, as shown in the following example:
82
+
- Edit the ``DATABASES`` setting to point to an existing Cloud Spanner database:
71
83
72
84
.. code:: python
73
85
74
86
DATABASES= {
75
87
'default': {
76
88
'ENGINE': 'django_spanner',
77
-
'PROJECT': '<GCP_project_id>',
78
-
'INSTANCE': '<instance_id>',
79
-
'NAME': '<database_name>',
89
+
'PROJECT': '$PROJECT',
90
+
'INSTANCE': '$INSTANCE',
91
+
'NAME': '$DATABASE',
80
92
}
81
93
}
82
94
83
-
- In order to retrieve the Cloud Spanner credentials from a JSON file, the ``credentials_uri`` parameter can also be supplied in the ``OPTIONS`` field:
0 commit comments