Skip to content

Commit

Permalink
update doc for Client usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tevino committed Apr 22, 2014
1 parent 6f815d8 commit 2bb09bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ Basic
-------

.. automodule:: mongu
:members: register_model, enable_counter
:members: enable_counter

.. autoclass:: mongu.Client
:members:

Extra
------

.. autoclass:: mongu.ObjectDict
:members:
:members:


Base Model
Expand Down
2 changes: 1 addition & 1 deletion docs/counter_example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ We don't assume you are stupid::

**Define a Model with CounterMixin**::

>> @register_model
>> @c.register_model
>> class User(CounterMixin, Model): # order of base classes matters
>> _database_ = 'test'
>> _collection_ = 'users'
Expand Down
6 changes: 4 additions & 2 deletions docs/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ We don't assume you are stupid, here we go

**Model definition**::

from mongu import register_model, Model
from mongu import Client, Model

@register_model
c = Client() # connect to MongoDB

@c.register_model
class User(Model):
_database_ = 'test' # database name
_collection_ = 'users' # collection name
Expand Down

0 comments on commit 2bb09bc

Please sign in to comment.