Ticket #5122: dbprompt.diff

File dbprompt.diff, 1009 bytes (added by cmgreen@…, 17 years ago)

New version of same patch

  • usr/local/src/django/django/db/backends/mysql/client.py

     
    88    passwd = settings.DATABASE_OPTIONS.get('passwd', settings.DATABASE_PASSWORD)
    99    host = settings.DATABASE_OPTIONS.get('host', settings.DATABASE_HOST)
    1010    port = settings.DATABASE_OPTIONS.get('port', settings.DATABASE_PORT)
     11    if settings.DATABASE_PROMPT:
     12        prompt = settings.DATABASE_PROMPT
     13    else:
     14        prompt = None
    1115    defaults_file = settings.DATABASE_OPTIONS.get('read_default_file')
    1216    # Seems to be no good way to set sql_mode with CLI
    1317   
     
    2125        args += ["--host=%s" % host]
    2226    if port:
    2327        args += ["--port=%s" % port]
     28    if prompt:
     29        args += ["--prompt=%s" % prompt]
    2430    if db:
    2531        args += [db]
    2632
Back to Top