MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-05-02 01:31:56 +00:00
parent d5dbeaa9be
commit f69cf70ed8
366 changed files with 17833 additions and 11199 deletions

View file

@ -0,0 +1,14 @@
from django.conf import settings
import os
def runshell():
args = ['']
args += ["-U%s" % settings.DATABASE_USER]
if settings.DATABASE_PASSWORD:
args += ["-W"]
if settings.DATABASE_HOST:
args += ["-h %s" % settings.DATABASE_HOST]
if settings.DATABASE_PORT:
args += ["-p %s" % settings.DATABASE_PORT]
args += [settings.DATABASE_NAME]
os.execvp('psql', args)