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
1c334141ee
Merge branch 'geo' of git://github.com/blackbrrr/mongoengine into v0.4
...
Conflicts:
mongoengine/fields.py
mongoengine/queryset.py
2010-07-07 14:53:25 +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
Flavio Amieiro
a2c78c9063
Add 'exact' and 'iexact' match operators for QuerySets
2010-05-26 20:24:57 -03:00
Florian Schlachter
9df725165b
Added a possibility to define a base class for fields from a DictField (instead of using BaseField). This is important if you want to use field-based query abilities like StringField's startswith/endswith/contains. Just define `basecls´ when defining your DictField. Example:
...
class Test(Document):
name = StringField()
translations = DictField(basecls=StringField)
Without basecls defined:
> Test.objects(translations__german__startswith='Deutsch')
[]
With basecls set to StringField:
> Test.objects(translations__german__startswith='Deutsch')
[<Test: Test object>]
2010-05-14 13:35:45 +02:00
Harry Marr
edfda6ad5b
BinaryField returns str not unicode
2010-04-17 21:24:06 +01:00
Florian Schlachter
416fcba846
Merge remote branch 'hmarr/master'
...
Conflicts:
mongoengine/base.py
2010-04-17 01:42:26 +02:00
Florian Schlachter
170c56bcb9
introduced min_length for a StringField
2010-04-16 18:13:11 +02:00
Florian Schlachter
48facec524
Fixes tiny documentation error. Adds possibility to add custom validation methods to fields, e. g.:
...
class Customer(Document):
country = StringField(validation=lambda value: value in ['DE', 'AT', 'CH'])
Replaced some str() with unicode() for i18n reasons.
2010-04-16 16:59:34 +02:00
Florian Schlachter
0a074e52e0
Merge remote branch 'hmarr/master'
...
Conflicts:
mongoengine/fields.py
2010-04-15 23:10:34 +02: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
Florian Schlachter
2304dac8e3
added GeoLocationField with auto index-creation for GEO2D
2010-03-30 00:04:39 +02:00
Florian Schlachter
38b2919c0d
added emailfield
2010-03-29 22:02:33 +02:00
Matt Dennewitz
a4d2f22fd2
added 'geo_indexes' to TopLevelDocumentMetaclass; added GeoPointField, a glorified [lat float, lng float] container; added geo lookup operators to QuerySet; added initial geo tests
2010-03-23 00:14:01 -05:00
Harry Marr
60802796cb
Made ListField validation exceptions more helpful
2010-03-17 15:10:10 +00:00
Harry Marr
25a0a5364a
Deprecated 'name' arg for fields in favour of 'db_field'
2010-03-17 13:47:23 +00:00
Rached Ben Mustapha
0b3af2052f
implement binary field size validation
2010-03-08 17:06:52 +01:00
Rached Ben Mustapha
879bf08d18
Simple implementation of BinaryField
2010-03-08 16:42:23 +01:00
Harry Marr
53c0cdc0c1
Added recursive and undefined document ref docs
2010-02-28 23:29:42 +00: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
Harry Marr
94e86a0be1
Merge branch 'gfk' of git://github.com/blackbrrr/mongoengine
2010-02-28 21:08:32 +00:00
Harry Marr
5b2dbfe007
Added tests for URLField and DecimalField
2010-02-28 18:25:40 +00:00
blackbrrr
018b206177
added support for GenericReferenceField to ListField. could be cleaner, perhaps.
2010-02-26 17:38:38 -06:00
blackbrrr
03d31b1890
added global model registry and GenericReferenceField, a ReferenceField not bound to a particular model
2010-02-26 16:59:12 -06:00
Harry Marr
66520c77f8
Added regex match operators with test
2010-02-26 13:43:45 +00:00
Albert Choi
6cab002214
missing DecimalField
2010-02-15 14:25:49 -08:00
blackbrrr
348f7b5dfc
merged master, fixed 1 merge conflict
2010-02-14 17:23:38 -06:00
Harry Marr
ea1fe6a538
Fixed set/unset issue with ListFields
2010-02-12 11:21:51 +00:00
Harry Marr
210e9e23af
Dereferencing of referenced documents within lists
2010-02-12 02:31:41 +00:00
blackbrrr
c4513f0286
merged master
2010-02-11 15:43:37 -06:00
Harry Marr
89f505bb13
Removed pool_size from connect, minor tidyup
2010-02-04 01:44:52 +00:00
Florian Schlachter
df5b1f3806
Merge remote branch 'hmarr/master'
2010-02-03 02:26:26 +01:00
Harry Marr
755deb3ffe
Added DictField
2010-02-03 01:22:25 +00:00
Florian Schlachter
a2d8b0ffbe
Merge remote branch 'hmarr/master'
2010-02-02 18:49:52 +01:00
Harry Marr
0bbf3a3d76
Fixed EmbeddedDocument validation bug
2010-02-02 17:37:09 +00:00
Florian Schlachter
10de19d38b
be kind and also accept an integer for a float field (so e.g. mymodel.floatfield = 9 is possible, instead of mymodel.floatfield = 9.0)
2010-01-31 18:06:25 +01:00
Florian Schlachter
73aff806f3
reset to master, keep working on the dirty-fields-patch in another branch
2010-01-31 18:00:01 +01:00
Florian Schlachter
431f006751
new save() method updates only dirty fields. fixes issue #18
2010-01-31 14:40:00 +01:00
Harry Marr
5cac52720c
Fixed querying on ReferenceFields using primary key
2010-01-27 15:57:11 +00:00
blackbrrr
f1e51f9708
Merge branch 'master' of git://github.com/hmarr/mongoengine into deferred_fields
2010-01-19 12:27:14 -06:00
Harry Marr
3357b55fbf
Indexing on ListFields now works properly
2010-01-16 15:35:01 +00:00
blackbrrr
5f84d6f8f8
added URLField, DecimalField, tests.
2010-01-14 11:32:28 -06:00
Harry Marr
597ef8b947
Merge branch 'master' of git@github.com:hmarr/mongoengine
2010-01-11 04:44:13 +00:00
Harry Marr
afd416c84e
Updated docs, added force_insert to save()
2010-01-11 04:15:36 +00:00
Harry Marr
84d7987108
Added prepare_query_value for a couple of fields
2010-01-10 21:01:00 +00:00
Harry Marr
557fb19d13
Query values may be processed before being used
2010-01-06 03:14:21 +00:00
Harry Marr
af1d7ef664
Added BooleanField
2010-01-05 18:17:44 +00:00