Преглед на файлове

Fixed a bug I introduced in my previosu ommit.

Alex Gaynor преди 11 години
родител
ревизия
0b69a75502
променени са 1 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. 7 0
      django/db/__init__.py

+ 7 - 0
django/db/__init__.py

@@ -39,8 +39,15 @@ class DefaultConnectionProxy(object):
     def __delattr__(self, name):
         return delattr(connections[DEFAULT_DB_ALIAS], name)
 
+    def __eq__(self, other):
+        return connections[DEFAULT_DB_ALIAS] == other
+
+    def __ne__(self, other):
+        return connections[DEFAULT_DB_ALIAS] != other
+
 connection = DefaultConnectionProxy()
 
+
 class DefaultBackendProxy(object):
     """
     Temporary proxy class used during deprecation period of the `backend` module