Permalink
Browse files

inventory and todo_today only show the tasks of the logged user

  • Loading branch information...
1 parent 00026da commit d72c2aaf8b7154dd9b5b0165c31bd5befe14b96d @pedrolinhares committed Dec 18, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 apps/pomodoro/views.py
@@ -11,12 +11,18 @@ def dashboard(request):
@login_required
def todo_today(request):
- tasks_in_todo = Task.objects.filter(worksheet="todo")
+ user = request.user
+ user = UserProfile.objects.get(user=user)
+
+ tasks_in_todo = Task.objects.filter(worksheet="todo", user=user)
return render_to_response('todo-today.html', { 'tasks_in_todo': tasks_in_todo })
@login_required
def inventory(request):
- tasks_in_inventory = Task.objects.filter(worksheet="inventory")
+ user = request.user
+ user = UserProfile.objects.get(user=user)
+
+ tasks_in_inventory = Task.objects.filter(worksheet="inventory", user=user)
return render_to_response('inventory.html', { 'tasks_in_inventory': tasks_in_inventory })
@login_required

0 comments on commit d72c2aa

Please sign in to comment.