mirror of
https://github.com/jazzband/django-authority.git
synced 2026-03-16 22:20:28 +00:00
Docs: Added first drafts of documents of the basic structure of the docs.
This commit is contained in:
parent
1794466b7a
commit
df85c0e626
12 changed files with 98 additions and 21 deletions
|
|
@ -23,3 +23,4 @@ develop-eggs/*.egg-link
|
|||
src/authority/_models/*
|
||||
src/example/example.db
|
||||
docs/build
|
||||
upload_docs.sh
|
||||
|
|
|
|||
BIN
docs/.static/authority-permission-py.png
Normal file
BIN
docs/.static/authority-permission-py.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
|
|
@ -46,6 +46,7 @@ copyright = u'2009, Jannis Leidel'
|
|||
#
|
||||
# The short X.Y version.
|
||||
version = '0.1'
|
||||
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.1'
|
||||
|
||||
|
|
@ -147,7 +148,7 @@ html_static_path = ['.static']
|
|||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
html_show_sourcelink = False
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
Configuration
|
||||
=============
|
||||
|
||||
settings.py
|
||||
===========
|
||||
|
||||
To enable django-authority just need to add the package to your
|
||||
``INSTALLED_APPS`` setting within your ``settings.py``::
|
||||
|
||||
|
|
@ -13,6 +16,20 @@ To enable django-authority just need to add the package to your
|
|||
'authority',
|
||||
)
|
||||
|
||||
Make sure your ``settings.py`` contains the following settings to enable the
|
||||
context processors::
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.core.context_processors.auth',
|
||||
'django.core.context_processors.debug',
|
||||
'django.core.context_processors.i18n',
|
||||
'django.core.context_processors.media',
|
||||
'django.core.context_processors.request',
|
||||
)
|
||||
|
||||
urls.py
|
||||
=======
|
||||
|
||||
You also have to modify your root URLConf (e.g. ``urls.py``) to include the
|
||||
app's URL configuration and automatically discover all the permission
|
||||
classes you defined::
|
||||
|
|
@ -25,15 +42,5 @@ classes you defined::
|
|||
(r'^authority/', include('authority.urls')),
|
||||
)
|
||||
|
||||
Make sure your ``settings.py`` contains the following settings to enable the
|
||||
context processors::
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.core.context_processors.auth',
|
||||
'django.core.context_processors.debug',
|
||||
'django.core.context_processors.i18n',
|
||||
'django.core.context_processors.media',
|
||||
'django.core.context_processors.request',
|
||||
)
|
||||
|
||||
That's all (for now).
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@ through ``django.contrib.auth`` and your application:
|
|||
|
||||
.. image:: .static/authority-scheme-layer.png
|
||||
|
||||
.. note:: django-authority does not add any voodoo-schmoodoo to Django's
|
||||
contrib.auth system so your existing permission system keeps intact!
|
||||
|
||||
Summarized this application provides three abilities:
|
||||
|
||||
1. It gives you the ability to add permissions like Django's generic permissions
|
||||
|
|
@ -21,21 +18,44 @@ Summarized this application provides three abilities:
|
|||
as row level permissions)
|
||||
|
||||
3. It wraps Django's generic permissions so you can use the same syntax as
|
||||
for the above ones.
|
||||
for the above ones. But note that django-authority does not add any
|
||||
voodoo-code to Django's ``contrib.auth`` system so your existing permission
|
||||
system keeps intact!
|
||||
|
||||
Before staring please have a look on the topics:
|
||||
Documentation
|
||||
=============
|
||||
|
||||
**Installation topics:**
|
||||
|
||||
.. toctree::
|
||||
|
||||
:maxdepth: 1
|
||||
|
||||
installation
|
||||
configuration
|
||||
|
||||
**Creating permissions:**
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
permission_create_basic
|
||||
permission_create_your_own
|
||||
permission_create_key_lock
|
||||
permission_admin_handling
|
||||
|
||||
**Checking permissions:**
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
permission_check_in_views
|
||||
permission_check_using_the_decorator
|
||||
permission_check_in_templates
|
||||
|
||||
Other pages
|
||||
===========
|
||||
|
||||
.. * :ref:`genindex`
|
||||
.. * :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
||||
.. * :ref:`genindex`
|
||||
.. * :ref:`modindex`
|
||||
5
docs/permission_admin_handling.txt
Normal file
5
docs/permission_admin_handling.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.. _permission_admin_handling:
|
||||
|
||||
===================================================
|
||||
Handling permissions using Django's admin interface
|
||||
===================================================
|
||||
5
docs/permission_check_in_templates.txt
Normal file
5
docs/permission_check_in_templates.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.. _permission_check_in_templates:
|
||||
|
||||
==================================
|
||||
Check for permissions in templates
|
||||
==================================
|
||||
5
docs/permission_check_in_views.txt
Normal file
5
docs/permission_check_in_views.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.. _permission_check_in_views:
|
||||
|
||||
===================================
|
||||
Check for permissions in your views
|
||||
===================================
|
||||
5
docs/permission_check_using_the_decorator.txt
Normal file
5
docs/permission_check_using_the_decorator.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.. _permission_check_using_the_decorator:
|
||||
|
||||
=======================================
|
||||
Check for permissions using a decorator
|
||||
=======================================
|
||||
14
docs/permission_create_basic.txt
Normal file
14
docs/permission_create_basic.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.. _permission_create_basic:
|
||||
|
||||
=========================
|
||||
Create a basic permission
|
||||
=========================
|
||||
|
||||
|
||||
How permissions are discovered
|
||||
==============================
|
||||
|
||||
.. image:: .static/authority-permission-py.png
|
||||
:align: left
|
||||
|
||||
lala
|
||||
9
docs/permission_create_key_lock.txt
Normal file
9
docs/permission_create_key_lock.txt
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
.. _permission_create_key_lock:
|
||||
|
||||
==============================
|
||||
Create a *key-lock* permission
|
||||
==============================
|
||||
|
||||
|
||||
Using the admin
|
||||
===============
|
||||
5
docs/permission_create_your_own.txt
Normal file
5
docs/permission_create_your_own.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
.. _permission_create_your_own:
|
||||
|
||||
==========================
|
||||
Create your own permission
|
||||
==========================
|
||||
Loading…
Reference in a new issue