Changeset 6801
- Timestamp:
- 12/01/07 13:23:49 (9 months ago)
- Files:
-
- django/trunk/django/conf/global_settings.py (modified) (1 diff)
- django/trunk/django/db/models/fields/__init__.py (modified) (1 diff)
- django/trunk/django/db/models/options.py (modified) (1 diff)
- django/trunk/docs/databases.txt (modified) (1 diff)
- django/trunk/docs/model-api.txt (modified) (1 diff)
- django/trunk/docs/settings.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/conf/global_settings.py
r6701 r6801 254 254 URL_VALIDATOR_USER_AGENT = "Django/%s (http://www.djangoproject.com)" % get_version() 255 255 256 # The tablespaces to use for each model when not specified otherwise. 257 DEFAULT_TABLESPACE = '' 258 DEFAULT_INDEX_TABLESPACE = '' 259 256 260 ############## 257 261 # MIDDLEWARE # django/trunk/django/db/models/fields/__init__.py
r6733 r6801 105 105 self.help_text = help_text 106 106 self.db_column = db_column 107 self.db_tablespace = db_tablespace 107 self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE 108 108 109 109 # Set db_index to True if the field has a relationship and doesn't explicitly set db_index. django/trunk/django/db/models/options.py
r6213 r6801 30 30 self.get_latest_by = None 31 31 self.order_with_respect_to = None 32 self.db_tablespace = None32 self.db_tablespace = settings.DEFAULT_TABLESPACE 33 33 self.admin = None 34 34 self.meta = meta django/trunk/docs/databases.txt
r6763 r6801 259 259 it would be stored in the model tablespace ``tables`` by default. 260 260 261 The settings.py file supports two additional options to specify 262 default values for the db_tablespace options. This is useful for 263 setting a tablespace for the Django internal apps and other 264 contributed applications. These options are ``DEFAULT_TABLESPACE`` 265 and ``DEFAULT_INDEX_TABLESPACE``. 266 261 267 Django does not create the tablespaces for you. Please refer to `Oracle's 262 268 documentation`_ for details on creating and managing tablespaces. django/trunk/docs/model-api.txt
r6743 r6801 619 619 620 620 The name of the database tablespace to use for this field's index, if 621 indeed this field is indexed. The default is the ``db_tablespace`` of 622 the model, if any. If the backend doesn't support tablespaces, this 621 indeed this field is indexed. The default is the project's 622 ``DEFAULT_INDEX_TABLESPACE`` setting, if set, or the ``db_tablespace`` 623 of the model, if any. If the backend doesn't support tablespaces, this 623 624 option is ignored. 624 625 django/trunk/docs/settings.txt
r6791 r6801 404 404 Default e-mail address to use for various automated correspondence from the 405 405 site manager(s). 406 407 DEFAULT_TABLESPACE 408 ------------------ 409 410 Default: ``''`` (Empty string) 411 412 Default tablespace to use for models that do not specify one, if the 413 backend supports it. 414 415 DEFAULT_INDEX_TABLESPACE 416 ------------------------ 417 418 Default: ``''`` (Empty string) 419 420 Default tablespace to use for indexes on fields that do not specify 421 one, if the backend supports it. 406 422 407 423 DISALLOWED_USER_AGENTS
