project/kiwipycon/talk/views.py
changeset 40 c8414e2b34ce
parent 11 ccd48e1468bd
child 52 5a108419f709
equal deleted inserted replaced
39:a09d54338547 40:c8414e2b34ce
   180         'register_form' : register_form,
   180         'register_form' : register_form,
   181         'message' : message,
   181         'message' : message,
   182         'login_form' : login_form
   182         'login_form' : login_form
   183     }))
   183     }))
   184 
   184 
       
   185 @login_required
       
   186 def list_talks(request, id, template_name='talk/list-talks.html'):
       
   187     '''List all the tasks submitted by a user.
       
   188     '''
       
   189 
       
   190     speaker = User.objects.get(pk=id)
       
   191     talks = Talk.objects.filter(speaker=speaker)
       
   192 
       
   193     return render_to_response(template_name, RequestContext(request, {
       
   194         'talk_list': talks,
       
   195     }))