Skip to content

Instantly share code, notes, and snippets.

@creimers
Created April 15, 2015 11:00
Show Gist options
  • Save creimers/04143c1b2e7f7dec5033 to your computer and use it in GitHub Desktop.
Save creimers/04143c1b2e7f7dec5033 to your computer and use it in GitHub Desktop.
django database from venv
if 'DATABASE_URL' not in os.environ:
os.environ['DATABASE_URL'] = 'sqlite:///'+ BASE_DIR + '/project.db'
import dj_database_url
DATABASES = {
'default':
dj_database_url.config()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment