Compare commits
67
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60571ce1de | ||
|
|
953123b3dc | ||
|
|
fdc1d94f47 | ||
|
|
828d5d6d29 | ||
|
|
501f6f11ba | ||
|
|
1199f0d649 | ||
|
|
af6601a2e1 | ||
|
|
d51788050f | ||
|
|
93d8d97fbd | ||
|
|
dc15195dd8 | ||
|
|
688ea4f0f2 | ||
|
|
a12abe2da4 | ||
|
|
7ffaace4dd | ||
|
|
3ebe3748fa | ||
|
|
a8884391c2 | ||
|
|
eb903987eb | ||
|
|
b32cd19266 | ||
|
|
500b182d17 | ||
|
|
5b70a451c4 | ||
|
|
05fea58d6a | ||
|
|
a9c205bffe | ||
|
|
fa9ca2555a | ||
|
|
d89cdff90a | ||
|
|
1e9a120f7e | ||
|
|
94870d7377 | ||
|
|
30ebe7c11e | ||
|
|
566e8ee801 | ||
|
|
5778cb4b51 | ||
|
|
37c86350f2 | ||
|
|
cb1eda480b | ||
|
|
e50b23f047 | ||
|
|
6eb470a821 | ||
|
|
756d8b2ac5 | ||
|
|
b99985eaf8 | ||
|
|
4e1145d890 | ||
|
|
5b7b65a750 | ||
|
|
76219901db | ||
|
|
44b86e29c6 | ||
|
|
f1f999a570 | ||
|
|
9a32ff4c42 | ||
|
|
4b024409ba | ||
|
|
b2825119ce | ||
|
|
b02904ee75 | ||
|
|
c86155e571 | ||
|
|
fa6949eca2 | ||
|
|
18a91cc794 | ||
|
|
ae777e45b2 | ||
|
|
0189818f3e | ||
|
|
205a975781 | ||
|
|
bb81652ffe | ||
|
|
edbecb4df0 | ||
|
|
4373ea98cf | ||
|
|
8f657e0f7d | ||
|
|
f6b8899bba | ||
|
|
c43a5fe760 | ||
|
|
c1993de524 | ||
|
|
bc83ba6a24 | ||
|
|
0fc44efbcc | ||
|
|
1b36ca00e5 | ||
|
|
7dd4639037 | ||
|
|
557f9bd971 | ||
|
|
59cac2b75c | ||
|
|
548c7438b0 | ||
|
|
50df653768 | ||
|
|
bc6c84c408 | ||
|
|
6b2cebb07b | ||
|
|
db673a9033 |
+1
-1
@@ -4,7 +4,7 @@ MongoEngine
|
||||
:Info: MongoEngine is an ORM-like layer on top of PyMongo.
|
||||
:Repository: https://github.com/MongoEngine/mongoengine
|
||||
:Author: Harry Marr (http://github.com/hmarr)
|
||||
:Maintainer: Stefan Wójcik (http://github.com/wojcikstefan)
|
||||
:Maintainer: Ross Lawley (http://github.com/rozza)
|
||||
|
||||
.. image:: https://travis-ci.org/MongoEngine/mongoengine.svg?branch=master
|
||||
:target: https://travis-ci.org/MongoEngine/mongoengine
|
||||
|
||||
@@ -23,7 +23,7 @@ __all__ = (list(document.__all__) + list(fields.__all__) +
|
||||
list(signals.__all__) + list(errors.__all__))
|
||||
|
||||
|
||||
VERSION = (0, 11, 0)
|
||||
VERSION = (0, 10, 9)
|
||||
|
||||
|
||||
def get_version():
|
||||
|
||||
@@ -23,6 +23,7 @@ class BaseField(object):
|
||||
|
||||
.. versionchanged:: 0.5 - added verbose and help text
|
||||
"""
|
||||
|
||||
name = None
|
||||
_geo_index = False
|
||||
_auto_gen = False # Call `generate` to generate a value
|
||||
|
||||
+15
-14
@@ -66,9 +66,9 @@ def register_connection(alias, name=None, host=None, port=None,
|
||||
'authentication_mechanism': authentication_mechanism
|
||||
}
|
||||
|
||||
# Handle uri style connections
|
||||
conn_host = conn_settings['host']
|
||||
|
||||
# Host can be a list or a string, so if string, force to a list.
|
||||
# host can be a list or a string, so if string, force to a list
|
||||
if isinstance(conn_host, six.string_types):
|
||||
conn_host = [conn_host]
|
||||
|
||||
@@ -170,22 +170,23 @@ def get_connection(alias=DEFAULT_CONNECTION_NAME, reconnect=False):
|
||||
else:
|
||||
connection_class = MongoClient
|
||||
|
||||
# For replica set connections with PyMongo 2.x, use
|
||||
# MongoReplicaSetClient.
|
||||
# TODO remove this once we stop supporting PyMongo 2.x.
|
||||
if 'replicaSet' in conn_settings and not IS_PYMONGO_3:
|
||||
connection_class = MongoReplicaSetClient
|
||||
conn_settings['hosts_or_uri'] = conn_settings.pop('host', None)
|
||||
|
||||
# hosts_or_uri has to be a string, so if 'host' was provided
|
||||
# as a list, join its parts and separate them by ','
|
||||
if isinstance(conn_settings['hosts_or_uri'], list):
|
||||
conn_settings['hosts_or_uri'] = ','.join(
|
||||
conn_settings['hosts_or_uri'])
|
||||
# Handle replica set connections
|
||||
if 'replicaSet' in conn_settings:
|
||||
|
||||
# Discard port since it can't be used on MongoReplicaSetClient
|
||||
conn_settings.pop('port', None)
|
||||
|
||||
# Discard replicaSet if it's not a string
|
||||
if not isinstance(conn_settings['replicaSet'], six.string_types):
|
||||
del conn_settings['replicaSet']
|
||||
|
||||
# For replica set connections with PyMongo 2.x, use
|
||||
# MongoReplicaSetClient.
|
||||
# TODO remove this once we stop supporting PyMongo 2.x.
|
||||
if not IS_PYMONGO_3:
|
||||
connection_class = MongoReplicaSetClient
|
||||
conn_settings['hosts_or_uri'] = conn_settings.pop('host', None)
|
||||
|
||||
# Iterate over all of the connection settings and if a connection with
|
||||
# the same parameters is already established, use it instead of creating
|
||||
# a new one.
|
||||
|
||||
Reference in New Issue
Block a user