Commits

Ali Afshar committed 47b996e

Fix documentation for new API

Comments (0)

Files changed (2)

 .. autoclass:: flaskext.principal.Principal
     :members:
 
-.. autofunction:: flaskext.principal.set_identity
 
 
 Predefined Need Types

flaskext/principal.py

 
         For example::
 
-        app = Flask(__name__)
+            app = Flask(__name__)
 
-        principals = Principals(app)
+            principals = Principals(app)
 
-        @principals.identity_loader
-        def load_identity_from_weird_usecase():
-            return Identity('ali')
+            @principals.identity_loader
+            def load_identity_from_weird_usecase():
+                return Identity('ali')
         """
         self.identity_loaders.appendleft(f)
         return f
 
         For example::
 
-        app = Flask(__name__)
+            app = Flask(__name__)
 
-        principals = Principals(app)
+            principals = Principals(app)
 
-        @principals.identity_saver
-        def save_identity_to_weird_usecase(identity):
-            my_special_cookie['identity'] = identity
+            @principals.identity_saver
+            def save_identity_to_weird_usecase(identity):
+                my_special_cookie['identity'] = identity
         """
         self.identity_savers.appendleft(f)
         return f