Florian Schlachter
682326c130
documentation bug fixed
2010-04-30 18:04:58 +02: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
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
Florian Schlachter
0a074e52e0
Merge remote branch 'hmarr/master'
...
Conflicts:
mongoengine/fields.py
2010-04-15 23:10:34 +02: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
Florian Schlachter
a93509c9b3
Merge remote branch 'hmarr/master'
2010-02-12 10:19:47 +01:00
Florian Schlachter
1114572b47
Merge remote branch 'hmarr/master'
2010-02-10 14:25:33 +01:00
Florian Schlachter
e2414d8fea
Merge remote branch 'hmarr/master'
2010-02-05 00:36:26 +01:00
Florian Schlachter
24db0d1499
return db-object to allow low-level access from outside via connect()
2010-02-05 00:35:49 +01:00
Florian Schlachter
df5b1f3806
Merge remote branch 'hmarr/master'
2010-02-03 02:26:26 +01:00
Florian Schlachter
59f8c9f38e
make mongoengine more international :) using unicode-strings; str(err) raises errors if it contains non-ascii chars/umlauts
2010-02-02 21:48:47 +01:00
Florian Schlachter
69e9b5d55e
fixed unicode-bug; replaced str(err) with err.message
2010-02-02 21:44:11 +01:00
Florian Schlachter
a2d8b0ffbe
Merge remote branch 'hmarr/master'
2010-02-02 18:49:52 +01:00