Docs: Added first drafts of documents of the basic structure of the docs.

This commit is contained in:
Martin Mahner 2009-07-12 12:31:26 +02:00
parent 1794466b7a
commit df85c0e626
12 changed files with 98 additions and 21 deletions

View file

@ -23,3 +23,4 @@ develop-eggs/*.egg-link
src/authority/_models/*
src/example/example.db
docs/build
upload_docs.sh

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -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

View file

@ -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).

View file

@ -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`

View file

@ -0,0 +1,5 @@
.. _permission_admin_handling:
===================================================
Handling permissions using Django's admin interface
===================================================

View file

@ -0,0 +1,5 @@
.. _permission_check_in_templates:
==================================
Check for permissions in templates
==================================

View file

@ -0,0 +1,5 @@
.. _permission_check_in_views:
===================================
Check for permissions in your views
===================================

View file

@ -0,0 +1,5 @@
.. _permission_check_using_the_decorator:
=======================================
Check for permissions using a decorator
=======================================

View 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

View file

@ -0,0 +1,9 @@
.. _permission_create_key_lock:
==============================
Create a *key-lock* permission
==============================
Using the admin
===============

View file

@ -0,0 +1,5 @@
.. _permission_create_your_own:
==========================
Create your own permission
==========================