21d267cb11
Now order_by() works like queries for referencing deeper fields (replacing . with __). old: order_by('mydoc.myattr') / new: order_by('mydoc__myattr'). Closes#45flosch2010-07-26 17:28:59 +02:00
7ab2e21c10
Handle unsafe expressions when using startswith/endswith/contains with unsafe expressions. Closes#58flosch2010-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.
flosch2010-07-25 19:02:15 +02:00
51065e7a4dCloses#46 by instantiating a new default instance for every field by request.
flosch2010-07-25 18:33:33 +02:00
327452622e
Handle DBRefs correctly within Q objects. Closes#55flosch2010-07-25 18:22:26 +02:00
13316e5380
Introduced new Document.objects.create, like django has. It creates a new object, saves it and returns the new object instance.
flosch2010-07-25 17:35:09 +02:00
564f950037
Merge branch 'master' of git://github.com/flosch/mongoengine into v0.4
Harry Marr2010-07-25 15:09:45 +01:00
be651caa68
Removed a couple of sneaky print statements
Harry Marr2010-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 Schlachter2010-07-20 22:46:00 +02:00
03c0fd9ada
Make default value of DictField an empty dict instead of None.
Florian Schlachter2010-07-19 19:01:53 +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 Schlachter2010-05-14 13:35:45 +02:00
86575cb035
can't use unicode strings for __init__ kwargs
Matt Dennewitz2010-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 Schlachter2010-04-19 11:34:09 +02:00
3b4df4615a
Fixed MRO error that occured on document inheritance
Harry Marr2010-04-17 21:45:11 +01:00
edfda6ad5b
BinaryField returns str not unicode
Harry Marr2010-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 Schlachter2010-04-17 16:59:09 +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 Schlachter2010-04-17 01:23:14 +02:00
48facec524
Fixes tiny documentation error. Adds possibility to add custom validation methods to fields, e. g.:
Florian Schlachter2010-04-16 16:59:34 +02:00
ee0c75a26d
Add choices keyword argument to BaseField.__init__()
Don Spaulding2010-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 Spaulding2010-04-15 17:57:23 -05:00
2b08ca7c99
Merge branch 'SortedListField' of git://github.com/joshourisman/mongoengine
Harry Marr2010-04-12 17:41:09 +01:00
c8e466a160
Moved SortedListField stuff into its own branch
Josh Ourisman2010-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 PeignierandHarry Marr2010-04-11 20:14:32 +02:00