Move LICENSE.django closer to the actual trumk/app/django code we are importing
(that exists in trunk/app to be part of the Google App Engine image).
LICENSE.django cannot go in trunk/app/django itself, because that directory is
maintained from the /vendor/django svn external using svn_load_dirs.pl (so
putting all the way into trunk/app/django gets it repeatedly removed).
Patch by: Todd Larsen
Review by: to-be-reviewed
from django.conf import settings
import os
def runshell():
args = ['psql']
if settings.DATABASE_USER:
args += ["-U", settings.DATABASE_USER]
if settings.DATABASE_PASSWORD:
args += ["-W"]
if settings.DATABASE_HOST:
args.extend(["-h", settings.DATABASE_HOST])
if settings.DATABASE_PORT:
args.extend(["-p", str(settings.DATABASE_PORT)])
args += [settings.DATABASE_NAME]
os.execvp('psql', args)