Ticket #5122: django-mysql-prompt.diff

File django-mysql-prompt.diff, 861 bytes (added by cmgreen@…, 8 years ago)

Add prompt db option to mysql backend

  • 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    prompt = settings.DATABASE_OPTIONS.get('prompt', None)
    1112    defaults_file = settings.DATABASE_OPTIONS.get('read_default_file')
    1213    # Seems to be no good way to set sql_mode with CLI
    1314   
     
    2122        args += ["--host=%s" % host]
    2223    if port:
    2324        args += ["--port=%s" % port]
     25    if prompt:
     26        args += ["--prompt=%s" % prompt]
    2427    if db:
    2528        args += [db]
    2629
Back to Top