refined get_context_template for psql-specific context
set settings.DATABASES to psql context from context.json