From e0486bd7a7c7b94fc33d51ce013ae1fc02e4dc6f Mon Sep 17 00:00:00 2001 From: Jason Pellerin Date: Wed, 19 Jul 2006 02:31:44 +0000 Subject: [PATCH] [multi-db] Removed connection information and db_connection from model Meta. git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3364 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/options.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/django/db/models/options.py b/django/db/models/options.py index 7732979c56..a79b48371c 100644 --- a/django/db/models/options.py +++ b/django/db/models/options.py @@ -12,7 +12,7 @@ import re # Calculate the verbose_name by converting from InitialCaps to "lowercase with spaces". get_verbose_name = lambda class_name: re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1', class_name).lower().strip() -DEFAULT_NAMES = ('verbose_name', 'db_connection', 'db_table', 'ordering', +DEFAULT_NAMES = ('verbose_name', 'db_table', 'ordering', 'unique_together', 'permissions', 'get_latest_by', 'order_with_respect_to', 'app_label') @@ -21,7 +21,6 @@ class Options(object): self.fields, self.many_to_many = [], [] self.module_name, self.verbose_name = None, None self.verbose_name_plural = None - self.db_connection = None self.db_table = '' self.ordering = [] self.unique_together = [] @@ -92,17 +91,6 @@ class Options(object): def __str__(self): return "%s.%s" % (self.app_label, self.module_name) - - def get_connection_info(self): - if self.db_connection: - return connections[self.db_connection] - return connection_info - connection_info = property(get_connection_info) - - def get_connection(self): - """Get the database connection for this object's model""" - return self.get_connection_info().connection - connection = property(get_connection) def get_field(self, name, many_to_many=True): "Returns the requested field by name. Raises FieldDoesNotExist on error."