Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Commit

Permalink
Fix prehook example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
bruth committed Dec 26, 2013
1 parent d946c6d commit 3a62cc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ For applying conditional logic, a function can be used:
```python
from functools import partial

def filter_by_user(queryset, user):
if not user.is_superuser:
queryset = queryset.filter(user=user)
def filter_by_user(queryset, request):
if not request.user.is_superuser:
queryset = queryset.filter(user=request.user)
return queryset

def view(request):
Expand Down

0 comments on commit 3a62cc9

Please sign in to comment.