project/kiwipycon/talk/views.py
changeset 40 c8414e2b34ce
parent 11 ccd48e1468bd
child 52 5a108419f709
--- a/project/kiwipycon/talk/views.py	Wed Nov 18 15:52:42 2009 +0530
+++ b/project/kiwipycon/talk/views.py	Mon Nov 23 12:01:22 2009 +0530
@@ -182,3 +182,14 @@
         'login_form' : login_form
     }))
 
+@login_required
+def list_talks(request, id, template_name='talk/list-talks.html'):
+    '''List all the tasks submitted by a user.
+    '''
+
+    speaker = User.objects.get(pk=id)
+    talks = Talk.objects.filter(speaker=speaker)
+
+    return render_to_response(template_name, RequestContext(request, {
+        'talk_list': talks,
+    }))