Uh oh!
There was an error while loading. Please reload this page.
Update Django Flex Example to CloudSQL v2 - #616
Conversation
| # Locally, you can use the CloudSQL proxy to proxy a localhost connection | ||
| # to the instance | ||
| if os.getenv('APPENGINE_FLEXIBLE'): | ||
| DATABASES['default']['HOST'] = '/cloudsql/<your-cloudsql-connection-string>' |
There was a problem hiding this comment.
Can't you have to separate database configs local and live and tell django to switch between them?
There was a problem hiding this comment.
If by different database configs you mean not have them both on default, you could, but then all your code and management commands have to specify the database, which I don't think is what you want for local vs production, because all the code would probably just point to some settings flag and it's a lot of code that accomplishes nothing. I think the feature is more for cases where in production there's multiple databases. If by different database configs you mean just totally separate dict objects that we pick here, it's just a readability preference. Since the configs are the same except for a single line, I thought this was easiest, you don't have to type in the password in two places, etc.
waprin
commented
Oct 25, 2016
@dpebot squash merge on travis green |
dpebot
commented
Oct 25, 2016
Okay! I'll merge when all statuses are green. |
No description provided.