mirror of
https://github.com/jazzband/django-authority.git
synced 2026-04-24 08:44:44 +00:00
Merging
--HG-- files : docs/tips_tricks.txt
This commit is contained in:
commit
d7be0bf5f7
6 changed files with 27 additions and 23 deletions
|
|
@ -101,4 +101,8 @@ described upper:
|
|||
* permission_required_or_403
|
||||
|
||||
In a nutshell, ``permission_required_or_403`` does the same as ``permission_required``
|
||||
except it returns a Http403 Response instead of redirecting to the login page.
|
||||
except it returns a Http403 Response instead of redirecting to the login page.
|
||||
|
||||
.. index::
|
||||
single: permission_required
|
||||
single: permission_required_or_403
|
||||
|
|
@ -1,10 +1,5 @@
|
|||
.. _check-templates:
|
||||
|
||||
.. index::
|
||||
single: ifhasperm
|
||||
single: get_permissions
|
||||
single: get_permission
|
||||
|
||||
==============================
|
||||
Check permissions in templates
|
||||
==============================
|
||||
|
|
@ -71,4 +66,9 @@ Example::
|
|||
I've got ze power to change ze pollllllzzz. Muahahaa.
|
||||
{% else %}
|
||||
Meh. No power for meeeee.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
.. index::
|
||||
single: ifhasperm
|
||||
single: get_permissions
|
||||
single: get_permission
|
||||
|
|
@ -1,9 +1,4 @@
|
|||
.. _configuration:
|
||||
|
||||
.. index::
|
||||
single: urls.py
|
||||
single: settings.py
|
||||
single: autodiscover
|
||||
|
||||
=============
|
||||
Configuration
|
||||
|
|
@ -49,3 +44,8 @@ classes you defined::
|
|||
|
||||
|
||||
That's all (for now).
|
||||
|
||||
.. index::
|
||||
single: urls.py
|
||||
single: settings.py
|
||||
single: autodiscover
|
||||
|
|
@ -1,10 +1,5 @@
|
|||
.. _create-basic-permission:
|
||||
|
||||
.. index::
|
||||
single: autodiscover
|
||||
single: permissions.py
|
||||
single: BasePermission
|
||||
|
||||
=========================
|
||||
Create a basic permission
|
||||
=========================
|
||||
|
|
@ -116,4 +111,9 @@ this behaviour will keep your application structure clean, if you use
|
|||
loaded at runtime.
|
||||
|
||||
If you really want, you can place these permission-classes in other files
|
||||
that are loaded at runtime. ``__init__.py`` or ``models.py`` are such files.
|
||||
that are loaded at runtime. ``__init__.py`` or ``models.py`` are such files.
|
||||
|
||||
.. index::
|
||||
single: autodiscover
|
||||
single: permissions.py
|
||||
single: BasePermission
|
||||
|
|
@ -74,7 +74,7 @@ o'clock::
|
|||
Check custom permissions
|
||||
========================
|
||||
|
||||
The permission check is similiar to :ref:`create-basic-permisson` and
|
||||
The permission check is similar to :ref:`create-basic-permission` and
|
||||
:ref:`create-per-object-permission`.
|
||||
|
||||
.. warning:: Until *per-object* permissions gets under the hood translated to
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
.. _support:
|
||||
|
||||
.. index::
|
||||
single: Support
|
||||
|
||||
=======
|
||||
Support
|
||||
=======
|
||||
|
|
@ -10,4 +7,7 @@ Support
|
|||
We've created a `google group`_ for django-authority. If you have questions or
|
||||
suggestions, please drop us a note.
|
||||
|
||||
.. _google group: http://groups.google.com/group/django-authority
|
||||
.. _google group: http://groups.google.com/group/django-authority
|
||||
|
||||
.. index::
|
||||
single: Support
|
||||
Loading…
Reference in a new issue