Ticket #10173: django_pg_bin_test_runner.diff
File django_pg_bin_test_runner.diff, 1.2 KB (added by , 16 years ago) |
---|
-
django/contrib/gis/db/backend/postgis/creation.py
20 20 options = get_cmd_options(db_name) 21 21 22 22 # 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 24 27 if verbosity >= 1: print createlang_cmd 25 28 26 29 # Must have database super-user privileges to execute createlang -- it must … … 191 194 raise Exception('Could not find PostGIS spatial reference system definitions in %s' % srefsys_file) 192 195 193 196 # 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' 194 201 options = get_cmd_options(db_name) 195 cmd_fmt = ' psql %s-f "%%s"' % options202 cmd_fmt = '%s %s-f "%%s"' % (psql_cmd, options) 196 203 197 204 # Now trying to load up the PostGIS functions 198 205 cmd = cmd_fmt % lwpostgis_file