spanner-django logo spanner-django

☰
  • Install
  • Quickstart
    • From scratch
      • Tutorial 1
      • Tutorial 2
    • Existing apps
  • FAQ
Navigation :
  • Install
  • Edit your settings file
    • PROJECT
    • INSTANCE
    • DATABASE
  • Next steps

Install

Please ensure that you’ve followed the steps in Install.

Edit your settings file

Please edit your settings.py file and set your default database to the following variables:

Variable Comment
ENGINE spanner.django
PROJECT A project-id
INSTANCE A Cloud Spanner instance name
DATABASE A Cloud Spanner database name

and for example here is a complete configuration

DATABASES = {
    'default': {
        'ENGINE': 'spanner.django',
        'PROJECT': 'appdev-soda-spanner-staging',
        'INSTANCE': 'django-dev1',
        'NAME': 'db1',
    }
}

Next steps

There are 2 different configurations for getting started with spanner-django as per:

  • From scratch
  • Existing apps
Edit this page on Github
  • Github
spanner-django