Ticket #1051: 1051.diff

File 1051.diff, 2.4 KB (added by Marc Fargas <telenieko@…>, 17 years ago)

Updated to apply with latest trunk

  • django/conf/project_template/settings.py

    === modified file 'django/conf/project_template/settings.py'
     
    1111
    1212DATABASE_ENGINE = ''           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
    1313DATABASE_NAME = ''             # Or path to database file if using sqlite3.
     14DATABASE_SCHEMAS = ''          # Only used with postgresq to support multiple schemas
    1415DATABASE_USER = ''             # Not used with sqlite3.
    1516DATABASE_PASSWORD = ''         # Not used with sqlite3.
    1617DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
  • django/db/backends/postgresql/base.py

    === modified file 'django/db/backends/postgresql/base.py'
     
    8383        cursor = self.connection.cursor()
    8484        if set_tz:
    8585            cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
     86        if settings.DATABASE_SCHEMAS:
     87            cursor.execute("SET search_path TO %s;" % settings.DATABASE_SCHEMAS)
    8688        cursor = UnicodeCursorWrapper(cursor, settings.DEFAULT_CHARSET)
    8789        global postgres_version
    8890        if not postgres_version:
  • django/db/backends/postgresql_psycopg2/base.py

    === modified file 'django/db/backends/postgresql_psycopg2/base.py'
     
    5252        cursor.tzinfo_factory = None
    5353        if set_tz:
    5454            cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
     55        if settings.DATABASE_SCHEMAS:
     56            cursor.execute("SET search_path TO %s;" % settings.DATABASE_SCHEMAS)
    5557        global postgres_version
    5658        if not postgres_version:
    5759            cursor.execute("SELECT version()")
  • docs/settings.txt

    === modified file 'docs/settings.txt'
     
    302302
    303303The username to use when connecting to the database. Not used with SQLite.
    304304
     305DATABASE_SCHEMAS
     306----------------
     307
     308Default: ``''`` (Empty string)
     309
     310On databases supporting Schemas, like PostgreSQL, the search_path will be
     311set to the value of this setting which is, by default, ``public``.
     312
     313Please, note that currently the only backend which schema support is PostgreSQL.
     314
    305315DATE_FORMAT
    306316-----------
    307317
Back to Top