Ticket #10173: django_pg_bin_test_runner.diff

File django_pg_bin_test_runner.diff, 1.2 KB (added by laureline.guerin@…, 16 years ago)

Patch for described changes

  • django/contrib/gis/db/backend/postgis/creation.py

     
    2020    options = get_cmd_options(db_name)
    2121
    2222    # Constructing the 'createlang' command.
    23     createlang_cmd = 'createlang %splpgsql' % options
     23    try:
     24        createlang_cmd = '%s %splpgsql' % (settings.POSTGRES_CREATELANG_PATH, options)
     25    except AttributeError:
     26        createlang_cmd = 'createlang %splpgsql' % options
    2427    if verbosity >= 1: print createlang_cmd
    2528
    2629    # Must have database super-user privileges to execute createlang -- it must
     
    191194        raise Exception('Could not find PostGIS spatial reference system definitions in %s' % srefsys_file)
    192195
    193196    # Getting the psql command-line options, and command format.
     197    try:
     198        psql_cmd = settings.POSTGRES_PSQL_PATH
     199    except AttributeError:
     200        psql_cmd = 'psql'
    194201    options = get_cmd_options(db_name)
    195     cmd_fmt = 'psql %s-f "%%s"' % options
     202    cmd_fmt = '%s %s-f "%%s"' % (psql_cmd, options)
    196203
    197204    # Now trying to load up the PostGIS functions
    198205    cmd = cmd_fmt % lwpostgis_file
Back to Top