Ticket #5000: table-prefix.diff
File table-prefix.diff, 740 bytes (added by , 17 years ago) |
---|
-
db/models/options.py
78 78 79 79 # If the db_table wasn't provided, use the app_label + module_name. 80 80 if not self.db_table: 81 self.db_table = "%s_%s" % (self.app_label, self.module_name) 81 try: 82 prefix = settings.DATABASE_TABLE_PREFIX 83 except AttributeError: 84 prefix = '' 85 86 self.db_table = "%s%s_%s" % (prefix, self.app_label, self.module_name) 82 87 self.db_table = truncate_name(self.db_table, 83 88 backend.get_max_name_length()) 84 89