30 Commits

Author SHA1 Message Date
Stefan Wojcik
7ffaace4dd update setup.py classifiers 2016-12-11 14:33:53 -05:00
Stefan Wojcik
e50b23f047 remove xrange and unused variables 2016-12-09 00:08:59 -05:00
Stefan Wojcik
5b7b65a750 Prefer ' over " + minor docstring tweaks 2016-12-08 22:44:02 -05:00
Stefan Wojcik
f1f999a570 cleanup + nicer EmbeddedDocumentList.__match_all and __only_matches 2016-12-08 18:59:25 -05:00
Stefan Wojcik
bb81652ffe nicer imports 2016-12-08 10:33:15 -05:00
Stefan Wojcik
548c7438b0 dont re-implement six 2016-12-06 16:14:53 -05:00
Stefan Wójcik
15714ef855 Fix __repr__ method of the StrictDict (#1424) 2016-12-04 16:10:59 -05:00
Stefan Wójcik
3c455cf1c1 Improve health of this package (#1409)
* added flake8 and flake8-import-order to travis for py27

* fixed a test that fails from time to time depending on an order of a dict

* flake8 tweaks for the entire codebase excluding tests
2016-11-28 19:00:34 -05:00
Omer Katz
43d48b3feb Merge pull request #1271 from maitbayev/master
Fixes unicode bug in EmbeddedDocumentListField
2016-04-17 09:15:23 +03:00
Neurostack
00430491ca Fixed bug accessing ListField (BaseList) with negative indices
If you __setitem__ in BaseList with a negative index and then try to save this, you will get an error like: OperationError: Could not save document (cannot use the part (shape of signal.shape.-1) to traverse the element ({shape: [ 0 ]})). To fix this I rectify negative list indices in BaseList _mark_as_changed as the appropriate positive index. This fixes the above error.
2016-03-31 08:04:19 -06:00
Madiyar Aitbayev
109202329f Handles unicode correctly EmbeddedDocumentListField 2016-03-31 02:33:13 +01:00
Matthieu Rigal
0aeb1ca408 Various fixes again 2015-06-24 00:50:36 +02:00
mrigal
217c9720ea added iterkeys method and optimized repr, still very ugly 2015-06-23 23:15:44 +02:00
mrigal
778c7dc5f2 general pep8 and more clean-up 2015-06-23 23:15:44 +02:00
mrigal
46817caa68 various unused imports removed (I am allergic) 2015-05-07 12:47:29 +02:00
David Bordeynik
bb77838b3e fix-#914: ListField of embedded docs doesn't set the _instance attribute when iterating over it 2015-04-02 08:59:24 +03:00
David Bordeynik
de0e5583a5 Fix #595: Support += and *= for ListField 2015-03-29 09:28:26 +03:00
Matthew Ellison
42721628eb Added EmbeddedDocumentListField Implementation
- Added new field type: EmbeddedDocumentListField.
- Provides additional query ability for lists of embedded documents.
- Closes MongoEngine/mongoengine#503.
2015-02-20 11:18:40 -05:00
David Bordeynik
5c3d91e65e Fix #866: does not follow 2015-02-16 12:25:37 +02:00
Omer Katz
80e81f8475 Python 2.6 requires positioning by number of fragments in format.
This commit will restore Python 2.6 compatability.
2014-07-02 23:22:06 +03:00
Ross Lawley
7b885ee0d3 Fix StrictDict repr 2014-06-30 10:29:28 +01:00
Ross Lawley
5d0cab2052 Merge branch 'master' into pr/539
Conflicts:
	mongoengine/base/datastructures.py
2014-06-27 12:20:44 +01:00
Sagiv Malihi
9835b382da added __slots__ to BaseDocument and Document
changed the _data field to static key-value mapping instead of hash table
This implements #624
2014-06-10 16:11:27 +03:00
Damien Churchill
1877cacf9c fix modifying slices under python3 2014-03-12 19:49:43 +00:00
Damien Churchill
db7f93cff3 improved update queries for BaseDict & BaseList
Migrate changes to include updating single elements of ListFields as
well as MapFields by adding the same changes to BaseList. This is
done by ensuring all BaseDicts and BaseLists have the correct name
from the base of the nearest (Embedded)Document, then marking changes
with their key or index when they are changed.

Tests also all fixed up.
2014-03-12 15:07:40 +00:00
Damien Churchill
2f6890c78a fix for nested MapFields
When using nested MapFields from a document loaded from the database, the
nested dictionaries aren't converted to BaseDict, so changes aren't
marked.

This also includes a change when marking a field as changed to ensure that
nested fields aren't included in a $set query if a parent is already marked
as changed. Not sure if this could occur but it prevents breakage if it does.
2013-12-16 13:44:07 +00:00
Ross Lawley
7cb46d0761 Fixed ListField setslice and delslice dirty tracking (#390) 2013-07-10 09:11:50 +00:00
Ross Lawley
a7631223a3 Fixed Datastructures so instances are a Document or EmbeddedDocument (#363) 2013-06-06 17:58:10 +00:00
Ross Lawley
7d90aa76ff Add _instance to Embedded Documents
Fixes MongoEngine/mongoengine#139
2012-11-06 16:04:23 +00:00
Ross Lawley
6f29d12386 Changed the inheritance model to remove types
The inheritance model has changed, we no longer need to store an array of
`types` with the model we can just use the classname in `_cls`.

See the upgrade docs for information on how to upgrade
MongoEngine/mongoengine#148
2012-10-15 13:48:02 +00:00