Permalink
Browse files

Documentation added throughout, moved out of main project folder.

--HG--
rename : Mojo/Documentation/Makefile => Documentation/Makefile
rename : Mojo/Documentation/_build/doctrees/apps.doctree => Documentation/_build/doctrees/apps.doctree
rename : Mojo/Documentation/_build/doctrees/authentication.doctree => Documentation/_build/doctrees/authentication.doctree
rename : Mojo/Documentation/_build/doctrees/backends.doctree => Documentation/_build/doctrees/backends.doctree
rename : Mojo/Documentation/_build/doctrees/docs/apps.doctree => Documentation/_build/doctrees/docs/apps.doctree
rename : Mojo/Documentation/_build/doctrees/docs/authentication.doctree => Documentation/_build/doctrees/docs/authentication.doctree
rename : Mojo/Documentation/_build/doctrees/docs/backends.doctree => Documentation/_build/doctrees/docs/backends.doctree
rename : Mojo/Documentation/_build/doctrees/docs/intro.doctree => Documentation/_build/doctrees/docs/intro.doctree
rename : Mojo/Documentation/_build/doctrees/docs/models.doctree => Documentation/_build/doctrees/docs/models.doctree
rename : Mojo/Documentation/_build/doctrees/docs/quickstart.doctree => Documentation/_build/doctrees/docs/quickstart.doctree
rename : Mojo/Documentation/_build/doctrees/docs/socketio.doctree => Documentation/_build/doctrees/docs/socketio.doctree
rename : Mojo/Documentation/_build/doctrees/docs/urls.doctree => Documentation/_build/doctrees/docs/urls.doctree
rename : Mojo/Documentation/_build/doctrees/intro.doctree => Documentation/_build/doctrees/intro.doctree
rename : Mojo/Documentation/_build/doctrees/models.doctree => Documentation/_build/doctrees/models.doctree
rename : Mojo/Documentation/_build/doctrees/quickstart.doctree => Documentation/_build/doctrees/quickstart.doctree
rename : Mojo/Documentation/_build/doctrees/socketio.doctree => Documentation/_build/doctrees/socketio.doctree
rename : Mojo/Documentation/_build/doctrees/urls.doctree => Documentation/_build/doctrees/urls.doctree
rename : Mojo/Documentation/_build/html/.buildinfo => Documentation/_build/html/.buildinfo
rename : Mojo/Documentation/docs/apps.rst => Documentation/_build/html/_sources/apps.txt
rename : Mojo/Documentation/docs/authentication.rst => Documentation/_build/html/_sources/authentication.txt
rename : Mojo/Documentation/docs/backends.rst => Documentation/_build/html/_sources/backends.txt
rename : Mojo/Documentation/docs/apps.rst => Documentation/_build/html/_sources/docs/apps.txt
rename : Mojo/Documentation/docs/authentication.rst => Documentation/_build/html/_sources/docs/authentication.txt
rename : Mojo/Documentation/docs/backends.rst => Documentation/_build/html/_sources/docs/backends.txt
rename : Mojo/Documentation/docs/intro.rst => Documentation/_build/html/_sources/docs/intro.txt
rename : Mojo/Documentation/docs/models.rst => Documentation/_build/html/_sources/docs/models.txt
rename : Mojo/Documentation/docs/quickstart.rst => Documentation/_build/html/_sources/docs/quickstart.txt
rename : Mojo/Documentation/docs/socketio.rst => Documentation/_build/html/_sources/docs/socketio.txt
rename : Mojo/Documentation/docs/urls.rst => Documentation/_build/html/_sources/docs/urls.txt
rename : Mojo/Documentation/docs/intro.rst => Documentation/_build/html/_sources/intro.txt
rename : Mojo/Documentation/docs/models.rst => Documentation/_build/html/_sources/models.txt
rename : Mojo/Documentation/docs/quickstart.rst => Documentation/_build/html/_sources/quickstart.txt
rename : Mojo/Documentation/docs/socketio.rst => Documentation/_build/html/_sources/socketio.txt
rename : Mojo/Documentation/docs/urls.rst => Documentation/_build/html/_sources/urls.txt
rename : Mojo/Documentation/_build/html/_static/ajax-loader.gif => Documentation/_build/html/_static/ajax-loader.gif
rename : Mojo/Documentation/_build/html/_static/basic.css => Documentation/_build/html/_static/basic.css
rename : Mojo/Documentation/_build/html/_static/comment-bright.png => Documentation/_build/html/_static/comment-bright.png
rename : Mojo/Documentation/_build/html/_static/comment-close.png => Documentation/_build/html/_static/comment-close.png
rename : Mojo/Documentation/_build/html/_static/comment.png => Documentation/_build/html/_static/comment.png
rename : Mojo/Documentation/_build/html/_static/default.css => Documentation/_build/html/_static/default.css
rename : Mojo/Documentation/_build/html/_static/doctools.js => Documentation/_build/html/_static/doctools.js
rename : Mojo/Documentation/_build/html/_static/down-pressed.png => Documentation/_build/html/_static/down-pressed.png
rename : Mojo/Documentation/_build/html/_static/down.png => Documentation/_build/html/_static/down.png
rename : Mojo/Documentation/_build/html/_static/file.png => Documentation/_build/html/_static/file.png
rename : Mojo/Documentation/_build/html/_static/jquery.js => Documentation/_build/html/_static/jquery.js
rename : Mojo/Documentation/_build/html/_static/minus.png => Documentation/_build/html/_static/minus.png
rename : Mojo/Documentation/_build/html/_static/plus.png => Documentation/_build/html/_static/plus.png
rename : Mojo/Documentation/_build/html/_static/pygments.css => Documentation/_build/html/_static/pygments.css
rename : Mojo/Documentation/_build/html/_static/searchtools.js => Documentation/_build/html/_static/searchtools.js
rename : Mojo/Documentation/_build/html/_static/sidebar.js => Documentation/_build/html/_static/sidebar.js
rename : Mojo/Documentation/_build/html/_static/underscore.js => Documentation/_build/html/_static/underscore.js
rename : Mojo/Documentation/_build/html/_static/up-pressed.png => Documentation/_build/html/_static/up-pressed.png
rename : Mojo/Documentation/_build/html/_static/up.png => Documentation/_build/html/_static/up.png
rename : Mojo/Documentation/_build/html/_static/websupport.js => Documentation/_build/html/_static/websupport.js
rename : Mojo/Documentation/_build/html/apps.html => Documentation/_build/html/apps.html
rename : Mojo/Documentation/_build/html/authentication.html => Documentation/_build/html/authentication.html
rename : Mojo/Documentation/_build/html/backends.html => Documentation/_build/html/backends.html
rename : Mojo/Documentation/_build/html/intro.html => Documentation/_build/html/intro.html
rename : Mojo/Documentation/_build/html/models.html => Documentation/_build/html/models.html
rename : Mojo/Documentation/_build/html/quickstart.html => Documentation/_build/html/quickstart.html
rename : Mojo/Documentation/_build/html/search.html => Documentation/_build/html/search.html
rename : Mojo/Documentation/_build/html/socketio.html => Documentation/_build/html/socketio.html
rename : Mojo/Documentation/_build/html/urls.html => Documentation/_build/html/urls.html
rename : Mojo/Documentation/conf.py => Documentation/conf.py
rename : Mojo/Documentation/docs/apps.rst => Documentation/docs/apps.rst
rename : Mojo/Documentation/docs/authentication.rst => Documentation/docs/authentication.rst
rename : Mojo/Documentation/docs/backends.rst => Documentation/docs/backends.rst
rename : Mojo/Documentation/docs/intro.rst => Documentation/docs/intro.rst
rename : Mojo/Documentation/docs/models.rst => Documentation/docs/models.rst
rename : Mojo/Documentation/docs/quickstart.rst => Documentation/docs/quickstart.rst
rename : Mojo/Documentation/docs/socketio.rst => Documentation/docs/socketio.rst
rename : Mojo/Documentation/docs/urls.rst => Documentation/docs/urls.rst
  • Loading branch information...
LBiNationalTrust committed Sep 12, 2012
1 parent b5a7707 commit 1839d74ed4483837676f0e34d3f27afa38d1947f
Showing with 4,359 additions and 159 deletions.
  1. 0 {Mojo → }/Documentation/Makefile
  2. BIN {Mojo → }/Documentation/_build/doctrees/apps.doctree
  3. BIN {Mojo → }/Documentation/_build/doctrees/authentication.doctree
  4. BIN {Mojo → }/Documentation/_build/doctrees/backends.doctree
  5. BIN Documentation/_build/doctrees/docs/api/Auth.doctree
  6. BIN Documentation/_build/doctrees/docs/api/Backends.doctree
  7. BIN Documentation/_build/doctrees/docs/api/Mixins.doctree
  8. BIN Documentation/_build/doctrees/docs/api/ObjectMapper.doctree
  9. BIN Documentation/_build/doctrees/docs/api/RequestHandlers.doctree
  10. BIN Documentation/_build/doctrees/docs/api/ServerHelpers.doctree
  11. BIN Documentation/_build/doctrees/docs/api/SocketHandlers.doctree
  12. BIN {Mojo → }/Documentation/_build/doctrees/docs/apps.doctree
  13. BIN {Mojo → }/Documentation/_build/doctrees/docs/authentication.doctree
  14. BIN {Mojo → }/Documentation/_build/doctrees/docs/backends.doctree
  15. BIN {Mojo → }/Documentation/_build/doctrees/docs/intro.doctree
  16. BIN {Mojo → }/Documentation/_build/doctrees/docs/models.doctree
  17. BIN {Mojo → }/Documentation/_build/doctrees/docs/quickstart.doctree
  18. BIN {Mojo → }/Documentation/_build/doctrees/docs/socketio.doctree
  19. BIN {Mojo → }/Documentation/_build/doctrees/docs/urls.doctree
  20. BIN Documentation/_build/doctrees/environment.pickle
  21. BIN Documentation/_build/doctrees/index.doctree
  22. BIN {Mojo → }/Documentation/_build/doctrees/intro.doctree
  23. BIN {Mojo → }/Documentation/_build/doctrees/models.doctree
  24. BIN {Mojo → }/Documentation/_build/doctrees/quickstart.doctree
  25. BIN {Mojo → }/Documentation/_build/doctrees/socketio.doctree
  26. BIN {Mojo → }/Documentation/_build/doctrees/urls.doctree
  27. 0 {Mojo → }/Documentation/_build/html/.buildinfo
  28. 0 {Mojo → }/Documentation/_build/html/_sources/apps.txt
  29. 0 {Mojo → }/Documentation/_build/html/_sources/authentication.txt
  30. 0 {Mojo → }/Documentation/_build/html/_sources/backends.txt
  31. +45 −0 Documentation/_build/html/_sources/docs/api/Auth.txt
  32. +101 −0 Documentation/_build/html/_sources/docs/api/Backends.txt
  33. +36 −0 Documentation/_build/html/_sources/docs/api/Mixins.txt
  34. +43 −0 Documentation/_build/html/_sources/docs/api/ObjectMapper.txt
  35. +16 −0 Documentation/_build/html/_sources/docs/api/RequestHandlers.txt
  36. +5 −0 Documentation/_build/html/_sources/docs/api/ServerHelpers.txt
  37. +5 −0 Documentation/_build/html/_sources/docs/api/SocketHandlers.txt
  38. 0 {Mojo → }/Documentation/_build/html/_sources/docs/apps.txt
  39. 0 {Mojo → }/Documentation/_build/html/_sources/docs/authentication.txt
  40. 0 {Mojo → }/Documentation/_build/html/_sources/docs/backends.txt
  41. 0 {Mojo → }/Documentation/_build/html/_sources/docs/intro.txt
  42. 0 {Mojo → }/Documentation/_build/html/_sources/docs/models.txt
  43. 0 {Mojo → }/Documentation/_build/html/_sources/docs/quickstart.txt
  44. 0 {Mojo → }/Documentation/_build/html/_sources/docs/socketio.txt
  45. 0 {Mojo → }/Documentation/_build/html/_sources/docs/urls.txt
  46. +11 −0 {Mojo → }/Documentation/_build/html/_sources/index.txt
  47. 0 {Mojo → }/Documentation/_build/html/_sources/intro.txt
  48. 0 {Mojo → }/Documentation/_build/html/_sources/models.txt
  49. 0 {Mojo → }/Documentation/_build/html/_sources/quickstart.txt
  50. 0 {Mojo → }/Documentation/_build/html/_sources/socketio.txt
  51. 0 {Mojo → }/Documentation/_build/html/_sources/urls.txt
  52. BIN {Mojo → }/Documentation/_build/html/_static/ajax-loader.gif
  53. 0 {Mojo → }/Documentation/_build/html/_static/basic.css
  54. BIN {Mojo → }/Documentation/_build/html/_static/comment-bright.png
  55. BIN {Mojo → }/Documentation/_build/html/_static/comment-close.png
  56. BIN {Mojo → }/Documentation/_build/html/_static/comment.png
  57. 0 {Mojo → }/Documentation/_build/html/_static/default.css
  58. 0 {Mojo → }/Documentation/_build/html/_static/doctools.js
  59. BIN {Mojo → }/Documentation/_build/html/_static/down-pressed.png
  60. BIN {Mojo → }/Documentation/_build/html/_static/down.png
  61. BIN {Mojo → }/Documentation/_build/html/_static/file.png
  62. 0 {Mojo → }/Documentation/_build/html/_static/jquery.js
  63. BIN {Mojo → }/Documentation/_build/html/_static/minus.png
  64. BIN {Mojo → }/Documentation/_build/html/_static/plus.png
  65. 0 {Mojo → }/Documentation/_build/html/_static/pygments.css
  66. 0 {Mojo → }/Documentation/_build/html/_static/searchtools.js
  67. 0 {Mojo → }/Documentation/_build/html/_static/sidebar.js
  68. 0 {Mojo → }/Documentation/_build/html/_static/underscore.js
  69. BIN {Mojo → }/Documentation/_build/html/_static/up-pressed.png
  70. BIN {Mojo → }/Documentation/_build/html/_static/up.png
  71. 0 {Mojo → }/Documentation/_build/html/_static/websupport.js
  72. 0 {Mojo → }/Documentation/_build/html/apps.html
  73. 0 {Mojo → }/Documentation/_build/html/authentication.html
  74. 0 {Mojo → }/Documentation/_build/html/backends.html
  75. +450 −0 Documentation/_build/html/docs/api/Auth.html
  76. +280 −0 Documentation/_build/html/docs/api/Backends.html
  77. +383 −0 Documentation/_build/html/docs/api/Mixins.html
  78. +545 −0 Documentation/_build/html/docs/api/ObjectMapper.html
  79. +134 −0 Documentation/_build/html/docs/api/RequestHandlers.html
  80. +118 −0 Documentation/_build/html/docs/api/ServerHelpers.html
  81. +108 −0 Documentation/_build/html/docs/api/SocketHandlers.html
  82. +27 −1 {Mojo → }/Documentation/_build/html/docs/apps.html
  83. +17 −1 {Mojo → }/Documentation/_build/html/docs/authentication.html
  84. +27 −1 {Mojo → }/Documentation/_build/html/docs/backends.html
  85. +27 −1 {Mojo → }/Documentation/_build/html/docs/intro.html
  86. +27 −1 {Mojo → }/Documentation/_build/html/docs/models.html
  87. +27 −1 {Mojo → }/Documentation/_build/html/docs/quickstart.html
  88. +27 −1 {Mojo → }/Documentation/_build/html/docs/socketio.html
  89. +27 −1 {Mojo → }/Documentation/_build/html/docs/urls.html
  90. +658 −0 Documentation/_build/html/genindex.html
  91. +30 −0 {Mojo → }/Documentation/_build/html/index.html
  92. 0 {Mojo → }/Documentation/_build/html/intro.html
  93. 0 {Mojo → }/Documentation/_build/html/models.html
  94. BIN Documentation/_build/html/objects.inv
  95. +156 −0 Documentation/_build/html/py-modindex.html
  96. 0 {Mojo → }/Documentation/_build/html/quickstart.html
  97. +6 −0 {Mojo → }/Documentation/_build/html/search.html
  98. +1 −0 Documentation/_build/html/searchindex.js
  99. 0 {Mojo → }/Documentation/_build/html/socketio.html
  100. 0 {Mojo → }/Documentation/_build/html/urls.html
  101. +1 −0 {Mojo → }/Documentation/conf.py
  102. +45 −0 Documentation/docs/api/Auth.rst
  103. +101 −0 Documentation/docs/api/Backends.rst
  104. +36 −0 Documentation/docs/api/Mixins.rst
  105. +43 −0 Documentation/docs/api/ObjectMapper.rst
  106. +16 −0 Documentation/docs/api/RequestHandlers.rst
  107. 0 {Mojo → }/Documentation/docs/apps.rst
  108. 0 {Mojo → }/Documentation/docs/authentication.rst
  109. 0 {Mojo → }/Documentation/docs/backends.rst
  110. 0 {Mojo → }/Documentation/docs/intro.rst
  111. 0 {Mojo → }/Documentation/docs/models.rst
  112. 0 {Mojo → }/Documentation/docs/quickstart.rst
  113. 0 {Mojo → }/Documentation/docs/socketio.rst
  114. 0 {Mojo → }/Documentation/docs/urls.rst
  115. +11 −0 {Mojo → }/Documentation/index.rst
  116. +84 −4 Mojo/Auth/AuthManager.py
  117. +34 −0 Mojo/Auth/Helpers.py
  118. +45 −1 Mojo/Auth/Mixins/MojoAuthMixin.py
  119. +149 −2 Mojo/Auth/Mixins/SessionMixins.py
  120. +92 −1 Mojo/Auth/SessionManager.py
  121. +29 −0 Mojo/Auth/models.py
  122. +49 −0 Mojo/Backends/base_interface.py
  123. BIN Mojo/Documentation/_build/doctrees/environment.pickle
  124. BIN Mojo/Documentation/_build/doctrees/index.doctree
  125. +0 −95 Mojo/Documentation/_build/html/genindex.html
  126. BIN Mojo/Documentation/_build/html/objects.inv
  127. +0 −1 Mojo/Documentation/_build/html/searchindex.js
  128. +52 −9 Mojo/ObjectMapper/FieldPrototype.py
  129. +59 −0 Mojo/ObjectMapper/Fields.py
  130. +156 −15 Mojo/ObjectMapper/ModelPrototype.py
  131. +13 −22 Mojo/RequestHandlers/MojoHandler.py
  132. +6 −0 SampleMojoProject/Apps/Admin/views.py
  133. +1 −1 SampleMojoProject/settings.py
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,45 @@
+Mojo.Auth
+=========
+
+The Mojo.Auth modules are designed to make authentication easier in Tornado by providing a model framework, password
+management, encryption and validation tools.
+
+To accompany the authentication tools, there is also a session management system that makes maintaining persistent
+sessions easy across requests.
+
+This module also provides a set of Mixins that integrate the authentication and session management functionality and integrate
+with either the synchronous or asynchronous mongo drivers, see the mixins section to see how this is accomplished.
+
+AuthManager
+-----------
+
+.. automodule:: Mojo.Auth.AuthManager
+ :members:
+
+Helpers
+-------
+
+.. automodule:: Mojo.Auth.Helpers
+ :members:
+
+Auth Models
+-----------
+
+.. automodule:: Mojo.Auth.models
+ :members:
+
+Session Manager
+---------------
+
+.. automodule:: Mojo.Auth.SessionManager
+ :members:
+ :private-members:
+
+Mojo.Auth.Mixins
+----------------
+
+Mixin Modules to help with Authentication and Session management
+
+.. toctree::
+
+ Mixins.rst
@@ -0,0 +1,101 @@
+Mojo.Backends
+=============
+
+Mojo abstracts the database interaction away from the object mapper through the use of a backend. These backends offer a
+'safe' interface for the model prototype to use to access base functions of the driver (such as ``save``, ``find``, ``find_one`` etc.).
+
+The back-ends essentially treanslate the input parameters down to the base driver. Currently Mojo ships with two backends:
+one for ``Pymongo`` and the other for ``Asyncmongo``.
+
+Part of the reason for developing Mojo was to be able to easily decide what style of driver to use without having to rewrite
+many functions (or at least with only minor changes), as the asynchronous style of writing is so different from traditional
+development while retaining data integrity in your schemas.
+
+Mojo supports both blocking and non-blocking drivers to ensure that both styles of development can be harnessed without
+forcing the developer down a specific path.
+
+It is easy to add new back-ends by subclassing the ``Mojo.Backends.base_interface`` and referencing it in your settings file.
+
+.. automodule:: Mojo.Backends.base_interface
+ :members:
+
+Included Backends
+-----------------
+
+Currently Mojo ships with two backends:
+
+- ``Pymongo`` (blocking)
+- ``Asyncmongo`` (non-blocking)
+
+Using Backends
+~~~~~~~~~~~~~~
+
+To use a backend in your project, make sure you have the driver installed
+using pip or setup tools first, and then add the following to your ``settings.py`` file::
+
+ DATABASE = {
+ 'backend': 'Mojo.Backends.<BACKEND-MODULE>.<BACKEND>',
+ 'is_async': False,
+ 'name': 'test',
+ 'host': '127.0.0.1',
+ 'port': 27017
+ }
+
+for example, to use the asyncmongo
+back-end::
+
+ DATABASE = {
+ 'backend': 'Mojo.Backends.AsyncmongoBackend.asyncmongo_backend',
+ 'is_async': False,
+ 'name': 'test',
+ 'host': '127.0.0.1',
+ 'port': 27017
+ }
+
+Any models you implement will use the appropriate driver, just make sure you are calling the ``_async`` functions instead of
+the regular ones if you are using a non-blocking driver!
+
+Asyncmongo
+~~~~~~~~~~
+
+The Asyncmongo backend is written around the asyncmongo driver developed by bit.ly and is closely designed around Pymongo.
+
+Using the Asyncmongo back end is similar to any asynchronous task in Tornado development::
+
+ class thisHandler(MojoRequestHandler, MojoAuthMixin, SessionMixin_Async):
+
+ @tornado.web.asynchronous
+ @gen.engine
+ def get(self):
+
+ this_user = yield gen.Task(Users.find_one_async,{'username':'martin'})
+
+ if this_user:
+ print 'Returned user: ', this_user.username
+
+ self.render('template.html', this_user=this_user)
+
+The back end exposes the base functions as listed above (``find``, ``find_one``, ``save``, ``insert``, ``delete``) and
+can then be accessed via the model objects as described in the ``Auth.ObjectMapper.ModelPrototype``, which exposes the
+asyncmongo driver functions as <function_name>_async() instead of the direct association.
+
+PyMongo
+~~~~~~~
+
+The pymongo backend is written around the driver written by the creators of MongoDB, usage is sraightforward enough::
+
+ class thisHandler(MojoRequestHandler, MojoAuthMixin, SessionMixin_Async):
+
+ def get(self):
+
+ this_user = Users.find_one({'username':'martin'})
+
+ if this_user:
+ print 'Returned user: ', this_user.username
+
+ self.render('template.html', this_user=this_user)
+
+
+The back end exposes the base functions as listed above (``find``, ``find_one``, ``save``, ``insert``, ``delete``) and
+can then be accessed via the model objects as described in the ``Auth.ObjectMapper.ModelPrototype``, which exposes the
+pymongo driver functions.
@@ -0,0 +1,36 @@
+Mojo.Auth.Mixins
+================
+
+The Mojo Mixins are there to make authentication and session managemeent easy in your application without
+having to load in the whole machinery in each request.
+
+MojoAuthMixin
+-------------
+
+MojoAuthMixin is designed to override the get_current_user functionality of a standard Tornado RequestHandler to provide
+straightforward and secure authentication. Makes use of the SessionManager class to manage cookies.
+
+.. automodule:: Mojo.Auth.Mixins.MojoAuthMixin
+ :members:
+
+SessionMixins
+-------------
+
+Session mixins are designed to make persistent session management features from SessionManager available as part of your RequestHandler,
+the mixins enable getting and setting of persistent session data (sessions are stored in the database) and also nifty helper functions
+that wrap SessionManager.
+
+The mixins come in two flavours: Synchronous and Asynchronous to ensure they work fully with your preferred database backend.
+
+Synchronous (blocking) Session Mixin
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. autoclass:: Mojo.Auth.Mixins.SessionMixins.SessionMixin_Sync
+ :members:
+
+Asynchronous (non-blocking) Session Mixin
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. autoclass:: Mojo.Auth.Mixins.SessionMixins.SessionMixin_Async
+ :members:
+
@@ -0,0 +1,43 @@
+Mojo.ObjectMapper
+=================
+
+The Mojo object mapper is not strictly database-bound ORM, the purpose of the ORM is to offer data integrity and validation
+as part of the data solution. As Mojo is mainly built around MongoDB (for now), the models offer a way to ensure some consistency
+in a schemaless database.
+
+The Object Mapper defines two main things: ``Fields`` that can be used to set up validation rules on data types and ``Models``,
+collections of fields that will validate all of their containing fields and map to dictionaries under the hood.
+
+``Models`` come with multiple database functions (``save``, ``find``, ``find_one``, ``delete``, ``delete_bulk``) that also have asynchronous variants
+(``save_async``, ``find_async``, ``find_one_async``, ``delete_async``, ``delete_bulk_async``) that need to be called depending on the underlying
+database back-end that has been chosen.
+
+
+Base Field Type
+---------------
+
+This is the base field type that all others inherit from, it can be subclassed to create custom model fields to
+extend your models.
+
+.. automodule:: Mojo.ObjectMapper.FieldPrototype
+ :members:
+
+Default Mojo Field Types
+------------------------
+
+These fields are the default field types that come with Mojo and are used throughout the framework.
+
+.. automodule:: Mojo.ObjectMapper.Fields
+ :members:
+
+.. autoclass:: Mojo.ObjectMapper.ModelPrototype.EmbeddedModelField
+ :members:
+
+Models
+------
+
+``Models`` represent collections of ``Fields``, and are subclasses of ``dict``, so are easy to implement into Mongo-style queries
+which use BSON-style data structures.
+
+.. autoclass:: Mojo.ObjectMapper.ModelPrototype.Model
+ :members:
@@ -0,0 +1,16 @@
+Mojo.RequestHandlers
+====================
+
+The ``MojoRequestHandler`` is the basic ``RequestHandler`` class that you use in your application instead of the standard
+Tornado ``RequestHandler``::
+
+ class pageHandler(MojoRequestHandler, MojoAuthMixin, SessionMixin_Sync):
+ #You don't need to use the Mixins, but they make life a lot easier.
+
+ def get(self):
+ #Do some cool stuff
+
+ self.render('login.html', error=None)
+
+.. automodule:: Mojo.RequestHandlers.MojoHandler
+ :members:
@@ -0,0 +1,5 @@
+Mojo.ServerHelpers
+==================
+
+.. automodule:: Mojo.ServerHelpers.RunServer
+ :members:
@@ -0,0 +1,5 @@
+Mojo.SocketHandlers
+===================
+
+.. automodule:: Mojo.SocketHandlers.ControlConnection
+ :members:
@@ -20,6 +20,17 @@ Contents:
docs/socketio.rst
docs/authentication.rst
+API:
+
+.. toctree::
+ :maxdepth: 2
+
+ docs/api/Auth.rst
+ docs/api/Backends.rst
+ docs/api/ObjectMapper.rst
+ docs/api/RequestHandlers.rst
+
+
Indices and tables
==================
Oops, something went wrong.

0 comments on commit 1839d74

Please sign in to comment.