projects
/
matthijs
/
projects
/
xerxes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
040f43f
)
* Use a relationship spanning lookup to get the list of a player's influences, inste...
author
Matthijs Kooijman
<matthijs@stdin.nl>
Sun, 10 Feb 2008 14:19:10 +0000
(15:19 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Sun, 10 Feb 2008 14:19:10 +0000
(15:19 +0100)
influences/views.py
patch
|
blob
|
history
diff --git
a/influences/views.py
b/influences/views.py
index 1ff4dcbd02088c5eb0ea53295fe888a891f6d1a3..cd8d4a942d61a30c3e0bd2aab72496bc56acd7bf 100644
(file)
--- a/
influences/views.py
+++ b/
influences/views.py
@@
-62,8
+62,9
@@
def addCharacter(request):
@login_required
def index(request):
+ # Only show this player's characters and influences
characters = request.user.character_set.all()
- influences = Influence.objects.filter(character__
in=characters
)
+ influences = Influence.objects.filter(character__
player=request.user
)
return render_to_response('influences/index.html', {'characters' : characters, 'influences' : influences}, RequestContext(request))
@login_required