Greg Turner
6373e20696
Better error reporting on a validation error for a list.
2010-08-13 22:28:26 +10:00
Greg Turner
198ccc028a
made list queries work with regexes (e.g. istartswith)
2010-08-06 20:29:09 +10:00
flosch
6791f205af
Style fix.
2010-07-26 16:50:09 +02:00
flosch
7ab2e21c10
Handle unsafe expressions when using startswith/endswith/contains with unsafe expressions. Closes #58
2010-07-26 16:42:10 +02:00
flosch
51065e7a4d
Closes #46 by instantiating a new default instance for every field by request.
2010-07-25 18:33:33 +02:00
Florian Schlachter
aa00feb6a5
FileField's values are now optional. When no value is applied, no File object is created and referenced.
2010-07-20 22:46:00 +02:00
Florian Schlachter
03c0fd9ada
Make default value of DictField an empty dict instead of None.
2010-07-19 19:01:53 +02:00
Daniel Hasselrot
6093e88eeb
Made list store empty list by default
2010-07-19 08:07:03 +08:00
Florian Schlachter
d3495896fa
Merge branch 'master' of github.com:flosch/mongoengine
2010-07-19 01:12:16 +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
martin
f9057e1a28
Fixed bug in FileField, proxy was not getting the grid_id set
2010-07-19 07:03:45 +08:00
Steve Challis
47bfeec115
Tidied code, added replace() method to FileField
2010-07-19 06:53:21 +08:00
martin
6bfd6c322b
Fixed bug with GeoLocationField
2010-07-19 06:52:57 +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
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