namlook
namlook
Hi, You are right, the embed mechanism act only with schema and not methods. This is a good idea. As you said, a flag to turn this turn this behavior...
well, in the last releases, MongoDocumentCursor is deprecated. there is a new object called Cursor which is only used in the collection object (in the find method). Allowing a custom...
via anonymous: "filters"? hmmm... "process"? hmm... "cleaners"? maybe "process" sounds like it's doing more things such as taking in the value, cleaning it up, saving it and indexing it or...
via Phillip Oldham Maybe properties could be used? For instance, while I poked around trying to get something to work my first idea was something like this: class Doc(Document): structure...
this (the property way) work fine. I use it in mongokit.auth.user. Need to think more about it : _I often want to do little basic manipulations of values before setting...
via cjoudrey: Overloading the validate() method works fine, but a faster way to do this would be greatly appreciated. This would especially be useful for columns that need to be...
via Andrey Gusev +1: def _set_FIELDNAME(self, old_value): return NEW_VALUE `a.somefield = 'blahblu'` runs like `setattr(a, 'somefield', a._set_somefield('blahblu'))`
via cjoudrey: I think I might have made a mistake in my implementation example. The example should read: class User(Document): structure = { 'u': unicode, 'p': unicode } structure_aliases =...
via Christopher Grebs: Why not using class User(Document): structure = { 'username': unicode, 'password': unicode } structure_aliases = { 'username': 'u', 'password': 'p', } required_fields = [ 'username', 'password' ]...
A simple workaround is to pass the _id instead of the object: ``` python from mongokit import Connection, Document conn = Connection() db = conn.test3 class Talk(Document): __collection__ = 'talks'...