Skip to content

Instantly share code, notes, and snippets.

@kerin
Created April 23, 2015 13:29
Show Gist options
  • Save kerin/63120dc9c5908333f4fc to your computer and use it in GitHub Desktop.
Save kerin/63120dc9c5908333f4fc to your computer and use it in GitHub Desktop.
django.py.tmpl
{{$db := json (getv "/services/postgres")}}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '{{$db.database}}',
'USER': '{{$db.username}}',
'PASSWORD': '{{$db.password}}',
'HOST': '{{$db.ipv4_addr}}',
'PORT': '{{$db.port}}',
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment