Ross Lawley
5834fa840c
Tweaked SequenceField so that it doesn't increment on creation.
...
[refs #238 ]
2011-07-19 16:51:26 +01:00
Wilson Júnior
fa39789bac
added SequenceField
2011-07-18 12:44:28 -03:00
Ross Lawley
dc5a613bc7
Fixes conversion of null genericreferences in querysets
...
closes #211
2011-07-11 09:19:27 +01:00
Zak Johnson
3d15a3b3e2
Add GridFSProxy.__nonzero__
...
For documents that do not have a value set for a given field, most field types
return None (or [] in the case of ListField). This makes it easy to test
whether a field has been set using "if doc.field". FileFields, on the other
hand, always return a GridFSProxy. Adding GridFSProxy.__nonzero__ which simply
checks for a grid_id allows the same boolean-test pattern for FileFields, as
well.
2011-06-29 20:48:39 -07:00
Ross Lawley
09c32a63ce
Fixes bug with appending post save - due to lists not being reset
2011-06-21 12:34:14 +01:00
Ross Lawley
08ba51f714
Updated geo_index checking to be recursive
...
Fixes #127 - Embedded Documents can declare geo indexes and have
them created automatically
2011-06-20 15:41:23 +01:00
Ross Lawley
5cc9188c5b
Improved validation of (Generic)Reference fields
2011-06-16 15:25:09 +01:00
Ross Lawley
ffb3e8b7b9
Added help_text and verbose_name to fields
...
closes #192
2011-06-15 11:28:41 +01:00
Ross Lawley
576db9ca88
Fixes DateTimeField handling of date objects.
...
Fixes #191
2011-06-14 15:09:03 +01:00
Ross Lawley
0ed79a839d
Added delta tracking to documents.
...
All saves on exisiting items do set / unset operations only on changed fields.
* Note lists and dicts generally do set operations for things like pop() del[key]
As there is no easy map to unset and explicitly matches the new list / dict
fixes #18
2011-06-14 14:35:38 +01:00
Ross Lawley
b2848b8519
Added ComplexDateTimeField
...
Thanks to @pelletier for the code.
Refs #187
2011-06-09 14:20:21 +01:00
Ross Lawley
a66417e9d0
pep8 update
2011-06-09 11:31:47 +01:00
Ross Lawley
4b9bacf731
Added ComplexBaseField
...
* Handles the efficient lazy dereferencing of DBrefs.
* Handles complex nested values in ListFields and DictFields
* Allows for both strictly declared ListFields and DictFields where the embedded
value must be of a field type or no restrictions where the values can be a mix
of field types / values.
* Handles DBrefences of documents where allow_inheritance = False.
2011-06-09 11:25:24 +01:00
Ross Lawley
d32dd9ff62
Added _get_FIELD_display() for handy choice field display lookups
...
closes #188
2011-06-08 13:07:08 +01:00
Ross Lawley
cfcd77b193
Added tests displaying datetime behaviour.
...
Updated datetimefield documentation
2011-06-08 10:33:56 +01:00
Ross Lawley
7ecf84395a
Improved DictFields
...
Allow searching multiple levels deep in DictFields
Allow DictField entries containing strings to use matching operators
Thanks again to @theojulien for the initial code #108
2011-05-24 14:07:58 +01:00
Ross Lawley
32bab13a8a
Added MapField, similar to DictField
...
Similar to DictField except the value of each entry is always of a certain
(declared) field type.
Thanks again to @theojulienne for the code #108
2011-05-24 12:50:48 +01:00
Ross Lawley
9260ff9e83
Updated docs and added a NotRegistered exception
...
For handling GenericReferences that reference documents that haven't
been imported.
Closes #170
2011-05-20 10:22:22 +01:00
Ross Lawley
efba9ef52a
Merge remote branch 'srackham/gridfs-read-seek' into gridfs-read-seek
2011-05-19 10:14:51 +01:00
Stuart Rackham
2c7469c62a
Additional file-like behavior for FileField (optional size arg for read
...
method; fixed seek and tell methods for reading files).
2011-04-03 15:21:00 +12:00
Harry Marr
ce8b3ea0a1
Merge remote branch 'nvie/dev' into dev
2011-01-09 23:29:11 +00:00
Vincent Driessen
4f3eacd72c
Fix: whitespace.
...
This broke my Vim auto-folds.
2010-12-05 22:24:27 -08:00
Viktor Kerkez
9c8411b251
Choice field test updated
2010-11-11 18:19:35 +01:00
Steve Challis
39e27735cc
Merge branch 'v0.4' of git://github.com/hmarr/mongoengine into v0.4
...
Conflicts:
docs/changelog.rst
mongoengine/base.py
mongoengine/queryset.py
2010-10-17 23:48:20 +01:00
Harry Marr
0902b95764
Added support for recursive embedded documents
2010-10-18 00:27:40 +01:00
Harry Marr
3591593ac7
Fixed GenericReferenceField query issue
2010-10-17 13:55:48 +01:00
Harry Marr
d3c2dfbaee
Merge branch 'master' of http://github.com/ixc/mongoengine into v0.4
...
Conflicts:
mongoengine/fields.py
mongoengine/queryset.py
2010-10-17 13:54:16 +01:00
Harry Marr
f666141981
Added test for list of referencefields
2010-10-17 13:23:11 +01:00
Harry Marr
159923fae2
Made lists of recursive reference fields possible
2010-10-03 01:48:42 +01:00
Steve Challis
b5eb3ea1cd
Added a Django storage backend.
...
- New GridFSStorage storage backend
- New FileDocument document for storing files in GridFS
- Whitespace cleaned up in various files
2010-09-29 23:36:58 +01:00
Steve Challis
bd1bf9ba24
Merge branch 'v0.4' of git://github.com/hmarr/mongoengine into v0.4
...
Conflicts:
mongoengine/fields.py
tests/fields.py
2010-08-31 00:25:10 +01:00
Harry Marr
32e66b29f4
Fixed FileField problem caused by shared objects
2010-08-30 22:12:05 +01:00
flosch
2f991ac6f1
Added all() method to get all document instances from a document. Extended the FileField's tests with testing on empty filefield.
2010-07-25 19:02:15 +02:00
flosch
386c48b116
Typo.
2010-07-25 18:43:11 +02:00
flosch
9d82911f63
Added tests for #46 .
2010-07-25 18:38:24 +02:00
Florian Schlachter
ec519f20fa
Makes the tests compatible to pymongo 1.7+. Not backwards compatible!
2010-07-19 01:32:28 +02:00
Florian Schlachter
323c86308a
Merge remote branch 'hmarr/v0.4'
...
Conflicts:
mongoengine/fields.py
tests/fields.py
2010-07-19 01:11:28 +02:00
Steve Challis
47bfeec115
Tidied code, added replace() method to FileField
2010-07-19 06:53:21 +08:00
Steve Challis
0512dd4c25
Added new FileField with GridFS support
...
The API is similar to that of PyMongo and most of the same operations are
possible.
The FileField can be written too with put(), write() or by using the assignment
operator. All three cases are demonstrated in the tests. Metadata can be added
to a FileField by assigning keyword arguments when using put() or new_file().
2010-07-19 06:52:11 +08:00
Harry Marr
c2163ecee5
Added test for Geo indexes
2010-07-07 15:12:14 +01:00
Steve Challis
39b749432a
Tidied code, added replace() method to FileField
2010-06-03 08:27:21 +01:00
Steve Challis
0ad343484f
Added new FileField with GridFS support
...
The API is similar to that of PyMongo and most of the same operations are
possible.
The FileField can be written too with put(), write() or by using the assignment
operator. All three cases are demonstrated in the tests. Metadata can be added
to a FileField by assigning keyword arguments when using put() or new_file().
2010-06-02 20:53:39 +01:00
Don Spaulding
ee0c75a26d
Add choices keyword argument to BaseField.__init__()
2010-04-15 17:59:35 -05:00
Josh Ourisman
c8e466a160
Moved SortedListField stuff into its own branch
2010-04-12 12:31:52 -04:00
Harry Marr
90200dbe9c
Fixed DecimalField bug
2010-04-12 15:59:20 +01:00
Rached Ben Mustapha
0b3af2052f
implement binary field size validation
2010-03-08 17:06:52 +01:00
Rached Ben Mustapha
bb19ba3eb6
Drop collection at the end of the test
2010-03-08 16:43:43 +01:00
Rached Ben Mustapha
879bf08d18
Simple implementation of BinaryField
2010-03-08 16:42:23 +01:00
Harry Marr
58f877de1a
Added recursive / document name references
2010-02-28 23:16:51 +00:00
Harry Marr
95a7b33fb4
Changed how GenericReferenceFields are stored / queried
2010-02-28 23:15:21 +00:00