Skip to content

Commit

Permalink
docs: add information clarifying that resource class is supposed to b…
Browse files Browse the repository at this point in the history
…e extended by othe models
  • Loading branch information
ergo committed Jan 9, 2016
1 parent 9c6a2eb commit 748f6bf
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,33 @@ inside your models file, to extend your existing models (if following the basic
class ExternalIdentity(ExternalIdentityMixin, Base):
pass
# you can define multiple resource derived models to build a complex
# application like CMS, forum or other permission based solution
class ResourceDerivedModel(Resource):
"""
Resource of `entry` type
"""
__tablename__ = 'entries'
__mapper_args__ = {'polymorphic_identity': 'entry'}
resource_id = sa.Column(sa.Integer(),
sa.ForeignKey('resources.resource_id',
onupdate='CASCADE',
ondelete='CASCADE', ),
primary_key=True, )
some_property = sa.Column(sa.UnicodeText())
ziggurat_model_init(User, Group, UserGroup, GroupPermission, UserPermission,
UserResourcePermission, GroupResourcePermission, Resource,
ExternalIdentity, passwordmanager=None)
.. hint::

Because some systems can't utilize bcypt password manager you can pass your own
cryptacular compatible password manager to ziggurat_model_init, it will be used
passlib compatible password manager to ziggurat_model_init, it will be used
instead of creating default one.

Configure Ziggurat with Pyramid Framework
Expand Down Expand Up @@ -233,6 +252,11 @@ resources, you can configure your view to expect "edit" or "delete" permissions:
Ziggurat Foundations can provide some shortcuts that help build pyramid
applications faster.

.. hint::

This approach will also work properly for all models inheriting
from `Resource` class.

Automatic user sign in/sign out
-------------------------------

Expand Down

0 comments on commit 748f6bf

Please sign in to comment.