Skip to content

Commit 3f3f06d

Browse files
Removing trailing whitespace.
1 parent 5ce50c0 commit 3f3f06d

11 files changed

+37
-37
lines changed

docs/check_decorator.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ Lets start with an example permission::
1919
class FlatpagePermission(permissions.BasePermission):
2020
label = 'flatpage_permission'
2121
checks = ('can_do_foo',)
22-
22+
2323
def can_do_foo(self):
2424
# ...
25-
25+
2626
authority.register(Campaign, FlatpagePermission)
2727

2828
A decorator for such a simple view would look like::
@@ -53,12 +53,12 @@ a string on the decorator::
5353
@permission_required('flatpage_permission.can_do_foo', 'arg1', 'arg2')
5454
def my_view(required, arg1, arg2):
5555
# ...
56-
56+
5757
What happens under the hood?::
5858

5959
# Assumed the view gets called like this
6060
my_view(request, 'bla', 'blubb')
61-
61+
6262
# At the end, the decorator would been called like this
6363
can_do_foo('bla', 'blubb')
6464

@@ -78,9 +78,9 @@ Here is an example::
7878
# permission.py
7979
def can_do_foo(self, flatpage_instance=None):
8080
# ...
81-
82-
# views.py
83-
from django.contrib.flatpages.models import Flatpage
81+
82+
# views.py
83+
from django.contrib.flatpages.models import Flatpage
8484
@permission_required('flatpage_permission.can_do_foo', (Flatpage, 'url__iexact', 'url))
8585
def flatpage(required, url):
8686
# ...

docs/check_python.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
Check permissions in python code
55
================================
66

7-
*to be written*
7+
*to be written*

docs/check_templates.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Syntax and example::
5050

5151
{% get_permissions obj as "my_permissions" %}
5252
{% get_permissions obj for request.user as "my_permissions" %}
53-
53+
5454

5555
get_permission
5656
==============
@@ -66,7 +66,7 @@ Example::
6666

6767
{% get_permission "poll_permission.change_poll" for request.user and poll as "is_allowed" %}
6868
{% get_permission "poll_permission.change_poll" for request.user and poll,second_poll as "is_allowed" %}
69-
69+
7070
{% if is_allowed %}
7171
I've got ze power to change ze pollllllzzz. Muahahaa.
7272
{% else %}

docs/configuration.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. _configuration:
2-
2+
33
=============
44
Configuration
55
=============
@@ -31,7 +31,7 @@ context processors::
3131
'django.core.context_processors.media',
3232
'django.core.context_processors.request',
3333
)
34-
34+
3535
urls.py
3636
=======
3737

docs/create_basic_permission.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ In your python code
7070
-------------------
7171
::
7272

73-
def my_view(request):
73+
def my_view(request):
7474
check = FlatPagePermission(request.user)
7575
if check.change_flatpage():
7676
print "Yay, you can change a flatpage!"
@@ -84,9 +84,9 @@ Using the view decorator
8484
@permission_required_or_403('flatpage_permission.change_flatpage')
8585
def my_view(request):
8686
# ...
87-
87+
8888
See :ref:`check-decorator` how the decorator works in detail.
89-
89+
9090
In your templates
9191
-----------------
9292
::
@@ -108,7 +108,7 @@ applications. See :ref:`configuration` how to set up ``autodiscover``.
108108

109109
.. image:: .static/authority-permission-py.png
110110
:align: left
111-
111+
112112
We encourage you to place your permission classes in a file called
113113
``permissions.py`` inside your application directories. This will not only
114114
keep your application files clean, but it will also load every permission

docs/create_per_object_permission.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permission*. A description would be::
99

1010
Attach a <codename> to an object
1111
Attach a <codename> to an user
12-
12+
1313
If the user has <codename> and the object has <codename> then do-something,
1414
otherwise do-something-else.
1515

@@ -39,7 +39,7 @@ Create per-object permissions
3939

4040
Creating per-object permissions is super simple. See this piece of permission
4141
class code::
42-
42+
4343
class FlatPagePermission(BasePermission):
4444
label = 'flatpage_permission'
4545
checks = ('review',)
@@ -85,7 +85,7 @@ In your python code
8585
::
8686

8787
from myapp.permissions import FlatPagePermission
88-
def my_view(request):
88+
def my_view(request):
8989
check = FlatPagePermission(request.user)
9090
flatpage_object = Flatpage.objects.get(url='/homepage/')
9191
if check.review_flatpage(flatpage_object):
@@ -102,9 +102,9 @@ Using the view decorator
102102
(Flatpage, 'url__iexact', 'url')) # The flatpage_object
103103
def my_view(request, url):
104104
# ...
105-
105+
106106
See :ref:`check-decorator` how the decorator works in detail.
107-
107+
108108
In your templates
109109
-----------------
110110
::

docs/documentation_guidelines.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ Headline scheme
1313
===================================
1414
First level (equals top and bottom)
1515
===================================
16-
16+
1717
Second Level (equals bottom)
1818
============================
19-
19+
2020
Third level (dashes botton)
2121
---------------------------
22-
22+
2323
Fourth level (drunken dashes bottom)
2424
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2525

@@ -31,10 +31,10 @@ Overall salutation guidelines
3131
Use the *We* and *you*::
3232

3333
We think that you should send us a bottle of your local beer.
34-
34+
3535
Some thoughts
3636
=============
3737

3838
* Many internal links are good
3939
* Text should not be wider than 80 characters
40-
* Two pages are better than one ultra-long page
40+
* Two pages are better than one ultra-long page

docs/handling_python.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
Handling permissions in python code
55
===================================
66

7-
*to be written*
7+
*to be written*

docs/handling_template.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
Handling permissions using templates
55
====================================
66

7-
*to be written*
7+
*to be written*

docs/index.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ Documentation
3737

3838
.. toctree::
3939
:maxdepth: 1
40-
40+
4141
installation
4242
configuration
4343

4444
**Create and check permissions:**
45-
45+
4646
.. toctree::
4747
:maxdepth: 1
48-
48+
4949
create_basic_permission
5050
create_per_object_permission
5151
create_custom_permission
@@ -54,7 +54,7 @@ Documentation
5454

5555
.. toctree::
5656
:maxdepth: 2
57-
57+
5858
check_python
5959
check_decorator
6060
check_templates
@@ -63,21 +63,21 @@ Documentation
6363

6464
.. toctree::
6565
:maxdepth: 1
66-
66+
6767
handling_python
6868
handling_admin
6969
handling_template
7070

7171
Other pages
7272
===========
73-
73+
7474
* :ref:`search`
7575
* :ref:`genindex`
7676

7777
.. toctree::
7878
:maxdepth: 1
7979
:glob:
80-
80+
8181
tips_tricks
8282
support
8383
documentation_guidelines

docs/installation.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ The latest, stable version is always available via the `Python package index_`
1515
would prefer either ``pip`` or ``easy_install``::
1616

1717
pip install django-authority
18-
18+
1919
# .. or with easy_install:
20-
20+
2121
easy_install django-authority
2222

2323
.. _the site: http://pypi.python.org/pypi/django-authority/

0 commit comments

Comments
 (0)