Changeset 5531 for django/branches/unicode/django/db/models/options.py
- Timestamp:
- 06/25/07 07:47:19 (2 years ago)
- Files:
-
- django/branches/unicode (modified) (1 prop)
- django/branches/unicode/django/db/models/options.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/unicode
- Property svnmerge-integrated changed from /django/trunk:1-5460 to /django/trunk:1-5530
django/branches/unicode/django/db/models/options.py
r5372 r5531 16 16 DEFAULT_NAMES = ('verbose_name', 'db_table', 'ordering', 17 17 'unique_together', 'permissions', 'get_latest_by', 18 'order_with_respect_to', 'app_label' )18 'order_with_respect_to', 'app_label', 'db_tablespace') 19 19 20 20 class Options(object): … … 30 30 self.get_latest_by = None 31 31 self.order_with_respect_to = None 32 self.db_tablespace = None 32 33 self.admin = None 33 34 self.meta = meta … … 63 64 64 65 def _prepare(self, model): 66 from django.db import backend 67 from django.db.backends.util import truncate_name 65 68 if self.order_with_respect_to: 66 69 self.order_with_respect_to = self.get_field(self.order_with_respect_to) … … 77 80 if not self.db_table: 78 81 self.db_table = "%s_%s" % (self.app_label, self.module_name) 82 self.db_table = truncate_name(self.db_table, 83 backend.get_max_name_length()) 79 84 80 85 def add_field(self, field):
