Harry Marr
b23353e376
Fixed inherited document primary key issue
2010-05-24 23:03:30 +01:00
Harry Marr
b8e9790de3
Merge branch 'master' of git://github.com/flosch/mongoengine
2010-05-22 15:59:41 +01:00
Harry Marr
e37e8d9e65
Merge branch 'master' of git://github.com/blackbrrr/mongoengine
2010-05-22 15:53:54 +01:00
Stephan Jaekel
f657432be3
always ignore empty Q objects, if the new Q is empty, the old one will be returned.
2010-05-14 14:35:27 +02:00
Stephan Jaekel
80c2895e56
Merge branch 'master' of http://github.com/flosch/mongoengine
2010-05-14 14:22:29 +02:00
Stephan Jaekel
88da998532
added test for empty Q objects
2010-05-14 14:21:58 +02:00
Stephan Jaekel
225972e151
Added some handy shortcuts for django users.
2010-05-14 14:03:18 +02:00
Stephan Jaekel
4972bdb383
ignore empty Q objects when combining Q objects.
2010-05-14 14:02:39 +02:00
Florian Schlachter
11c7a15067
Added test for DictField's basecls.
2010-05-14 13:49:13 +02: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
Florian Schlachter
682326c130
documentation bug fixed
2010-04-30 18:04:58 +02:00
Matt Dennewitz
86575cb035
can't use unicode strings for __init__ kwargs
2010-04-19 09:39:03 -05:00
Florian Schlachter
eecc6188a7
fixes issue #41 since unicode kwargs is an feature of python 2.6.5 and above.
2010-04-19 11:34:09 +02:00
Harry Marr
3b4df4615a
Fixed MRO error that occured on document inheritance
2010-04-17 21:45:11 +01:00
Harry Marr
edfda6ad5b
BinaryField returns str not unicode
2010-04-17 21:24:06 +01:00
Florian Schlachter
3c7e8be2e7
Removed create_default since it can be achieved with the default
argument (like default=MyEmbeddedDocument since default takes callables too).
2010-04-17 16:59:09 +02:00
Florian Schlachter
416fcba846
Merge remote branch 'hmarr/master'
...
Conflicts:
mongoengine/base.py
2010-04-17 01:42:26 +02:00
Florian Schlachter
e196e229cd
Accepting a tuple for validation argument.
2010-04-17 01:36:45 +02:00
Florian Schlachter
da57572409
Introduced new create_default field argument. If set to true, mongoengine will automagically create an instance of the desired document class (useful if using EmbeddedDocumentField for example):
...
class SubDoc(EmbeddedDocument):
url = URLField()
class MyDoc(Document):
subdoc = EmbeddedDocumentField(SubDoc, create_default=True)
With create_default MyDoc().subdoc is automatically instantiated. Hint: default=SubDoc() WON'T work (that's why I've introduced create_default)
2010-04-17 01:23:14 +02:00
Florian Schlachter
ef172712da
bugfix
2010-04-16 22:25:45 +02:00
Florian Schlachter
170c56bcb9
introduced min_length for a StringField
2010-04-16 18:13:11 +02:00
Florian Schlachter
f3ca9fa4c5
Make validation-lists possible. Example:
...
class Doc(Document):
country = StringField(validation=['DE', 'AT', 'CH'])
2010-04-16 18:00:51 +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
Don Spaulding
ee0c75a26d
Add choices keyword argument to BaseField.__init__()
2010-04-15 17:59:35 -05:00
Don Spaulding
e9c92f30ba
Add description of each of the keyword arguments to BaseField.__init__(), adds description for choices too.
2010-04-15 17:57:23 -05:00
Florian Schlachter
0a074e52e0
Merge remote branch 'hmarr/master'
...
Conflicts:
mongoengine/fields.py
2010-04-15 23:10:34 +02:00
Don Spaulding
da3f4c30e2
Fix doc typos
2010-04-14 22:40:56 -05:00
Harry Marr
2b08ca7c99
Merge branch 'SortedListField' of git://github.com/joshourisman/mongoengine
2010-04-12 17:41:09 +01:00
Josh Ourisman
c8e466a160
Moved SortedListField stuff into its own branch
2010-04-12 12:31:52 -04:00
Timothée Peignier
a39685d98c
make get_or_create returns a tuple with the retrieved or created object and a boolean specifying whether a new object was created
2010-04-12 16:21:29 +01: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
Deepak Thukral
207fd9fcb7
keeping import policy in mind
2010-03-29 11:27:50 +02:00
Deepak Thukral
fbcf58c48f
updated documentation
2010-03-29 11:25:17 +02:00
Deepak Thukral
8f4a579df9
DoesNotExist and MultipleObjectsReturned now contributes Document class
2010-03-28 22:22:36 +02:00
Matt Dennewitz
600ca3bcf9
renamed 'test_near' to 'test_geospatial_operators', updated added ordering checks to test
2010-03-23 00:57:26 -05: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
00c8d7e6f5
Bump to v0.3
v0.3
2010-03-17 16:50:13 +00:00
Harry Marr
0d89e967f2
Merge branch 'mapreduce' of git://github.com/blackbrrr/mongoengine
2010-03-17 16:44:24 +00:00
blackbrrr
447f8d0113
MapReduceDocument.object works with custom primary keys. test included.
2010-03-17 11:31:17 -05:00
Harry Marr
60802796cb
Made ListField validation exceptions more helpful
2010-03-17 15:10:10 +00:00
Harry Marr
5b42578cb1
Added ~ field name substitution to mapreduce funcs
2010-03-17 14:06:31 +00:00
Harry Marr
25a0a5364a
Deprecated 'name' arg for fields in favour of 'db_field'
2010-03-17 13:47:23 +00:00
Harry Marr
047cc218a6
Merge branch 'mapreduce' of git://github.com/blackbrrr/mongoengine
...
Conflicts:
mongoengine/queryset.py
2010-03-17 12:31:08 +00:00
Harry Marr
39fc862676
Merge branch 'upsert' of git://github.com/blackbrrr/mongoengine
2010-03-17 12:30:18 +00:00
blackbrrr
f47d926f29
touched up comments in advanced map/reduce test
2010-03-17 00:56:34 -05:00
blackbrrr
f4d0938e3d
rewrite simple map/reduce test
2010-03-17 00:51:01 -05:00
blackbrrr
f156da4ec2
bumped version
2010-03-17 00:50:44 -05:00
blackbrrr
0c1e5da9a8
added mongoengine.MapReduceDocument to api ref
2010-03-17 00:50:07 -05:00