flosch
327452622e
Handle DBRefs correctly within Q objects. Closes #55
2010-07-25 18:22:26 +02:00
flosch
13316e5380
Introduced new Document.objects.create, like django has. It creates a new object, saves it and returns the new object instance.
2010-07-25 17:35:09 +02:00
Harry Marr
9f98025b8c
Added QuerySet.distinct. Closes #44 .
2010-07-25 15:29:02 +01:00
Harry Marr
564f950037
Merge branch 'master' of git://github.com/flosch/mongoengine into v0.4
2010-07-25 15:09:45 +01:00
Harry Marr
be651caa68
Removed a couple of sneaky print statements
2010-07-25 15:02:37 +01:00
Florian Schlachter
aa00feb6a5
FileField's values are now optional. When no value is applied, no File object is created and referenced.
2010-07-20 22:46:00 +02:00
Florian Schlachter
03c0fd9ada
Make default value of DictField an empty dict instead of None.
2010-07-19 19:01:53 +02:00
Daniel Hasselrot
6093e88eeb
Made list store empty list by default
2010-07-19 08:07:03 +08:00
Florian Schlachter
ec519f20fa
Makes the tests compatible to pymongo 1.7+. Not backwards compatible!
2010-07-19 01:32:28 +02:00
Florian Schlachter
d3495896fa
Merge branch 'master' of github.com:flosch/mongoengine
2010-07-19 01:12:16 +02:00
Florian Schlachter
323c86308a
Merge remote branch 'hmarr/v0.4'
...
Conflicts:
mongoengine/fields.py
tests/fields.py
2010-07-19 01:11:28 +02:00
martin
f9057e1a28
Fixed bug in FileField, proxy was not getting the grid_id set
2010-07-19 07:03:45 +08:00
Florian Schlachter
9596a25bb9
Fixed documentation bug.
2010-07-19 00:56:16 +02:00
Steve Challis
47bfeec115
Tidied code, added replace() method to FileField
2010-07-19 06:53:21 +08:00
martin
6bfd6c322b
Fixed bug with GeoLocationField
2010-07-19 06:52:57 +08:00
Steve Challis
0512dd4c25
Added new FileField with GridFS support
...
The API is similar to that of PyMongo and most of the same operations are
possible.
The FileField can be written too with put(), write() or by using the assignment
operator. All three cases are demonstrated in the tests. Metadata can be added
to a FileField by assigning keyword arguments when using put() or new_file().
2010-07-19 06:52:11 +08:00
Daniel Hasselrot
acbc741037
Made list store empty list by default
2010-07-15 18:20:29 +02:00
Harry Marr
c2163ecee5
Added test for Geo indexes
2010-07-07 15:12:14 +01:00
Harry Marr
71689fcf23
Got within_box working for Geo fields
2010-07-07 15:00:46 +01:00
Harry Marr
1c334141ee
Merge branch 'geo' of git://github.com/blackbrrr/mongoengine into v0.4
...
Conflicts:
mongoengine/fields.py
mongoengine/queryset.py
2010-07-07 14:53:25 +01:00
Daniel Hasselrot
b89d71bfa5
Do not convert None objects
2010-07-06 14:17:30 +02:00
Daniel Hasselrot
3179c4e4ac
Now only removes _id if none, for real
2010-07-06 11:25:49 +02:00
Daniel Hasselrot
f5e39c0064
Allowed _id to be missing when converting to mongo
2010-07-06 10:25:31 +02:00
vandersonmota
86e2797c57
added a TestCase for tests that uses mongoDB
2010-06-09 22:28:30 -03:00
Steve Challis
39b749432a
Tidied code, added replace() method to FileField
2010-06-03 08:27:21 +01:00
Steve Challis
0ad343484f
Added new FileField with GridFS support
...
The API is similar to that of PyMongo and most of the same operations are
possible.
The FileField can be written too with put(), write() or by using the assignment
operator. All three cases are demonstrated in the tests. Metadata can be added
to a FileField by assigning keyword arguments when using put() or new_file().
2010-06-02 20:53:39 +01:00
Harry Marr
196606438c
Fixed Q-object list query issue
2010-05-30 18:34:06 +01:00
Harry Marr
6896818bfd
Added docs for exact, iexact
2010-05-30 17:40:01 +01:00
Flavio Amieiro
eb4f0ad7fb
Merge branch 'master' of git://github.com/hmarr/mongoengine
2010-05-29 11:52:08 -03:00
Harry Marr
467e61bcc1
Documentation fix
2010-05-28 02:28:42 +01:00
Flavio Amieiro
a2c78c9063
Add 'exact' and 'iexact' match operators for QuerySets
2010-05-26 20:24:57 -03:00
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