21d267cb11
Now order_by() works like queries for referencing deeper fields (replacing . with __). old: order_by('mydoc.myattr') / new: order_by('mydoc__myattr'). Closes#45
flosch
2010-07-26 17:28:59 +02:00
7ab2e21c10
Handle unsafe expressions when using startswith/endswith/contains with unsafe expressions. Closes#58
flosch
2010-07-26 16:42:10 +02:00
2f991ac6f1
Added all() method to get all document instances from a document. Extended the FileField's tests with testing on empty filefield.
flosch
2010-07-25 19:02:15 +02:00
13316e5380
Introduced new Document.objects.create, like django has. It creates a new object, saves it and returns the new object instance.
flosch
2010-07-25 17:35:09 +02:00
9f98025b8c
Added QuerySet.distinct. Closes#44.
Harry Marr
2010-07-25 15:29:02 +01:00
564f950037
Merge branch 'master' of git://github.com/flosch/mongoengine into v0.4
Harry Marr
2010-07-25 15:09:45 +01:00
be651caa68
Removed a couple of sneaky print statements
Harry Marr
2010-07-25 15:02:37 +01:00
aa00feb6a5
FileField's values are now optional. When no value is applied, no File object is created and referenced.
Florian Schlachter
2010-07-20 22:46:00 +02:00
03c0fd9ada
Make default value of DictField an empty dict instead of None.
Florian Schlachter
2010-07-19 19:01:53 +02:00
6093e88eeb
Made list store empty list by default
Daniel Hasselrot
2010-07-16 00:20:29 +08:00
ec519f20fa
Makes the tests compatible to pymongo 1.7+. Not backwards compatible!
Florian Schlachter
2010-07-19 01:32:28 +02:00
88da998532
added test for empty Q objects
Stephan Jaekel
2010-05-14 14:21:58 +02:00
225972e151
Added some handy shortcuts for django users.
Stephan Jaekel
2010-05-14 14:03:18 +02:00
4972bdb383
ignore empty Q objects when combining Q objects.
Stephan Jaekel
2010-05-14 14:02:39 +02:00
11c7a15067
Added test for DictField's basecls.
Florian Schlachter
2010-05-14 13:49:13 +02:00
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:
Florian Schlachter
2010-05-14 13:35:45 +02:00
86575cb035
can't use unicode strings for __init__ kwargs
Matt Dennewitz
2010-04-19 09:39:03 -05:00
eecc6188a7
fixes issue #41 since unicode kwargs is an feature of python 2.6.5 and above.
Florian Schlachter
2010-04-19 11:34:09 +02:00
3b4df4615a
Fixed MRO error that occured on document inheritance
Harry Marr
2010-04-17 21:45:11 +01:00
edfda6ad5b
BinaryField returns str not unicode
Harry Marr
2010-04-17 21:24:06 +01:00
3c7e8be2e7
Removed create_default since it can be achieved with the default argument (like default=MyEmbeddedDocument since default takes callables too).
Florian Schlachter
2010-04-17 16:59:09 +02:00
e196e229cd
Accepting a tuple for validation argument.
Florian Schlachter
2010-04-17 01:36:45 +02:00
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):
Florian Schlachter
2010-04-17 01:23:14 +02:00
170c56bcb9
introduced min_length for a StringField
Florian Schlachter
2010-04-16 18:13:11 +02:00
f3ca9fa4c5
Make validation-lists possible. Example:
Florian Schlachter
2010-04-16 18:00:51 +02:00
48facec524
Fixes tiny documentation error. Adds possibility to add custom validation methods to fields, e. g.:
Florian Schlachter
2010-04-16 16:59:34 +02:00
ee0c75a26d
Add choices keyword argument to BaseField.__init__()
Don Spaulding
2010-04-15 17:59:35 -05:00
e9c92f30ba
Add description of each of the keyword arguments to BaseField.__init__(), adds description for choices too.
Don Spaulding
2010-04-15 17:57:23 -05:00
da3f4c30e2
Fix doc typos
Don Spaulding
2010-04-14 22:40:56 -05:00
2b08ca7c99
Merge branch 'SortedListField' of git://github.com/joshourisman/mongoengine
Harry Marr
2010-04-12 17:41:09 +01:00
c8e466a160
Moved SortedListField stuff into its own branch
Josh Ourisman
2010-04-12 12:31:52 -04:00
a39685d98c
make get_or_create returns a tuple with the retrieved or created object and a boolean specifying whether a new object was created
Timothée Peignier
2010-04-11 20:14:32 +02:00
90200dbe9c
Fixed DecimalField bug
Harry Marr
2010-04-12 15:59:20 +01:00
2304dac8e3
added GeoLocationField with auto index-creation for GEO2D
Florian Schlachter
2010-03-30 00:04:39 +02:00