You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clean up all whitespace throughout project (#5578)
* Remove trailing whitespace from lines
* Remove trailing nad leading whitespace from files
Allows for cleaner diffs in future changes. For editors that
automatically clean up whitespace on save, will avoid unrelated line
changes in diffs.
Copy file name to clipboardExpand all lines: docs/api-guide/generic-views.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,11 +113,11 @@ For example:
113
113
114
114
Note that if your API doesn't include any object level permissions, you may optionally exclude the `self.check_object_permissions`, and simply return the object from the `get_object_or_404` lookup.
115
115
116
-
#### `filter_queryset(self, queryset)`
116
+
#### `filter_queryset(self, queryset)`
117
117
118
-
Given a queryset, filter it with whichever filter backends are in use, returning a new queryset.
118
+
Given a queryset, filter it with whichever filter backends are in use, returning a new queryset.
Copy file name to clipboardExpand all lines: docs/api-guide/permissions.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,15 +197,15 @@ If you need to test if a request is a read operation or a write operation, you s
197
197
---
198
198
199
199
Custom permissions will raise a `PermissionDenied` exception if the test fails. To change the error message associated with the exception, implement a `message` attribute directly on your custom permission. Otherwise the `default_detail` attribute from `PermissionDenied` will be used.
200
-
200
+
201
201
from rest_framework import permissions
202
202
203
203
class CustomerAccessPermission(permissions.BasePermission):
204
204
message = 'Adding customers not allowed.'
205
-
205
+
206
206
def has_permission(self, request, view):
207
207
...
208
-
208
+
209
209
## Examples
210
210
211
211
The following is an example of a permission class that checks the incoming request's IP address against a blacklist, and denies the request if the IP has been blacklisted.
0 commit comments