Skip to content

Commit cc71317

Browse files
committed
Merged from Jérôme Lafréchoux and Sibelius Seraphini
2 parents 77ffa95 + 624d419 commit cc71317

File tree

12 files changed

+17
-27
lines changed

12 files changed

+17
-27
lines changed

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ in the `'MONGODB_SETTINGS'` dictionary with `app.config`. **Note that database n
6666
'host': 'mongodb://localhost/database_name'
6767
}
6868

69-
7069
Connection settings may also be provided individually by prefixing the setting with `'MONGODB_'` in the `app.config`.::
7170

7271
app.config['MONGODB_DB'] = 'project1'

examples/biggerapp/app.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
'flask_debugtoolbar.panels.logger.LoggingPanel',
2222
'flask_mongoengine.panels.MongoDebugPanel'
2323
)
24-
2524
app.config['DEBUG_TB_INTERCEPT_REDIRECTS'] = False
2625

2726
from models import db

examples/biggerapp/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
db = MongoEngine()
55

6-
76
class Todo(db.Document):
87
title = db.StringField(max_length=60)
98
text = db.StringField()

examples/simpleapp/app.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), '../../')))
88

9-
109
from flask_mongoengine import MongoEngine
1110
from flask_debugtoolbar import DebugToolbarExtension
1211

@@ -33,14 +32,12 @@
3332

3433
DebugToolbarExtension(app)
3534

36-
3735
class Todo(db.Document):
3836
title = db.StringField(max_length=60)
3937
text = db.StringField()
4038
done = db.BooleanField(default=False)
4139
pub_date = db.DateTimeField(default=datetime.datetime.now)
4240

43-
4441
@app.route('/')
4542
def index():
4643
# As a list to test debug toolbar

flask_mongoengine/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ def _patch_base_field(obj, name):
5353
5454
@param obj: The object whose footprint to locate the class.
5555
@param name: Name of the class to locate.
56-
5756
"""
57+
5858
# locate class
5959
cls = getattr(obj, name)
6060
if not inspect.isclass(cls):

flask_mongoengine/connection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,16 +315,16 @@ def fetch_connection_settings(config, removePass=True):
315315

316316
def create_connection(config):
317317
"""
318-
Connection is created base on application configuration
319-
settings. Application settings which is enabled as TESTING
318+
Connection is created based on application configuration
319+
setting. Application settings which is enabled as TESTING
320320
can submit MongoMock URI or enable TEMP_DB setting to provide
321321
default temporary MongoDB instance on localhost for testing
322322
purposes. This connection is initiated with a separate temporary
323323
directory location.
324324
325325
Unless PRESERVE_TEST_DB is setting is enabled in application
326326
configuration, temporary MongoDB instance will be deleted when
327-
application instance go out of scope.
327+
application instance goes out of scope.
328328
329329
Setting to request MongoMock instance connection:
330330
>> app.config['TESTING'] = True

flask_mongoengine/json.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def default(self, obj):
1616
return json_util._json_convert(obj.as_pymongo())
1717
return superclass.default(self, obj)
1818
return MongoEngineJSONEncoder
19-
2019
MongoEngineJSONEncoder = _make_encoder(JSONEncoder)
2120

2221
def override_json_encoder(app):

flask_mongoengine/pagination.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ def iter_pages(self, left_edge=2, left_current=2,
114114
if last != self.pages:
115115
yield None
116116

117-
118117
class ListFieldPagination(Pagination):
119118

120119
def __init__(self, queryset, doc_id, field_name, page, per_page,

flask_mongoengine/panels.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def _maybe_patch_jinja_loader(jinja_env):
1717
elif package_loader not in jinja_env.loader.loaders:
1818
jinja_env.loader.loaders.append(package_loader)
1919

20-
2120
class MongoDebugPanel(DebugPanel):
2221
"""Panel that shows information about MongoDB operations (including stack)
2322

flask_mongoengine/wtf/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ def save(self, commit=True, **kwargs):
1818

1919
if commit:
2020
self.instance.save(**kwargs)
21-
return self.instance
21+
return self.instance

0 commit comments

Comments
 (0)