mirror of
https://github.com/django/django.git
synced 2025-09-09 20:16:32 +00:00
Fixed #8485: Reordered imports in the database backends to ensure that the availability of the MySQL and Oracle backends is confirmed before any attempt is made to use the backend. Many thanks to Karen Tracey for her work in narrowing down a number of vague reports into a concrete problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
343c255016
commit
0d3dd8b68b
2 changed files with 13 additions and 13 deletions
|
@ -6,12 +6,6 @@ Requires MySQLdb: http://sourceforge.net/projects/mysql-python
|
|||
|
||||
import re
|
||||
|
||||
from django.db.backends import *
|
||||
from django.db.backends.mysql.client import DatabaseClient
|
||||
from django.db.backends.mysql.creation import DatabaseCreation
|
||||
from django.db.backends.mysql.introspection import DatabaseIntrospection
|
||||
from django.db.backends.mysql.validation import DatabaseValidation
|
||||
|
||||
try:
|
||||
import MySQLdb as Database
|
||||
except ImportError, e:
|
||||
|
@ -30,6 +24,12 @@ if (version < (1,2,1) or (version[:3] == (1, 2, 1) and
|
|||
from MySQLdb.converters import conversions
|
||||
from MySQLdb.constants import FIELD_TYPE, FLAG
|
||||
|
||||
from django.db.backends import *
|
||||
from django.db.backends.mysql.client import DatabaseClient
|
||||
from django.db.backends.mysql.creation import DatabaseCreation
|
||||
from django.db.backends.mysql.introspection import DatabaseIntrospection
|
||||
from django.db.backends.mysql.validation import DatabaseValidation
|
||||
|
||||
# Raise exceptions for database warnings if DEBUG is on
|
||||
from django.conf import settings
|
||||
if settings.DEBUG:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue