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
blackbrrr
d6b317c552
Merge branch 'master' into mapreduce
2010-03-17 00:34:29 -05:00
blackbrrr
01826c6876
Merge branch 'master' of github.com:blackbrrr/mongoengine into mapreduce
2010-03-17 00:34:19 -05:00
blackbrrr
0b62c9d2f6
Merge branch 'master' of git://github.com/hmarr/mongoengine
2010-03-17 00:34:00 -05:00
Deepak Thukral
72161a9b71
no message in expection in future version of python
2010-03-11 21:10:04 +01:00
Deepak Thukral
df8f4e7251
no message in expection in future version of python
2010-03-11 20:42:27 +01:00
blackbrrr
aa13ab37c4
fixed field_js merge artifact
2010-03-09 15:31:52 -06:00
blackbrrr
acda64a837
fixed field_js merge artifact
2010-03-09 15:31:28 -06:00
blackbrrr
49a001a93a
re-added missing QuerySet._ordering
2010-03-09 15:28:55 -06:00
blackbrrr
22a6ec7794
merged conflicts
2010-03-09 15:19:14 -06:00
blackbrrr
26c6e4997c
added 'upsert' arg to QuerySet.update and QuerySet.update_one
2010-03-08 21:59:54 -06:00