summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Pellerin <jpellerin@gmail.com>2006-07-19 02:31:44 +0000
committerJason Pellerin <jpellerin@gmail.com>2006-07-19 02:31:44 +0000
commite0486bd7a7c7b94fc33d51ce013ae1fc02e4dc6f (patch)
tree51b2a409cf2a1282d14bd9e3661e4f884d46c2ab
parent22afa65b4b83baa9e9ee1980f96d37ddb5d0adb2 (diff)
[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
-rw-r--r--django/db/models/options.py14
1 files changed, 1 insertions, 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."