# HG changeset patch # User Madhusudan.C.S # Date 1258957882 -19800 # Node ID c8414e2b34ce09f3cce76c4ff4c27cfdd2335877 # Parent a09d54338547a31127de823321b805d18d90257b Added my talks list page. diff -r a09d54338547 -r c8414e2b34ce project/kiwipycon/talk/views.py --- 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, + })) diff -r a09d54338547 -r c8414e2b34ce project/static/css/styles.css --- a/project/static/css/styles.css Wed Nov 18 15:52:42 2009 +0530 +++ b/project/static/css/styles.css Mon Nov 23 12:01:22 2009 +0530 @@ -126,6 +126,32 @@ vertical-align: top; } +/* list my talks table layout */ +table.list-talks +{ + border: 1px solid #ddd; + font-size: 1.1em; +} + +table.list-talks td +{ + border: 1px solid #ddd; + padding: 5px 15px; +} + +table.list-talks th +{ + border: 1px solid #ddd; + font-weight: bold; + align: center; + padding: 5px 15px; +} + +table.list-talks a +{ + text-decoration: none; +} + .important { color: #337799; @@ -307,7 +333,7 @@ { font-weight: bold; font-family: Verdana, Arial, "Bitstream Vera Sans", Helvetica, sans-serif; - font-size: 1.3em; + font-size: 1em; padding-bottom: 15px; } /* forms */ diff -r a09d54338547 -r c8414e2b34ce project/templates/_menu.html --- a/project/templates/_menu.html Wed Nov 18 15:52:42 2009 +0530 +++ b/project/templates/_menu.html Mon Nov 23 12:01:22 2009 +0530 @@ -7,7 +7,10 @@
  • diff -r a09d54338547 -r c8414e2b34ce project/urls.py --- a/project/urls.py Wed Nov 18 15:52:42 2009 +0530 +++ b/project/urls.py Mon Nov 23 12:01:22 2009 +0530 @@ -18,9 +18,7 @@ # Blog & Admin urlpatterns = patterns( '', - url(r'^$', - direct_to_template, {"template": "home.html"}, - name='home'), + url(r'^$', direct_to_template, {"template": "home.html"}, name='home'), (r'^feeds/(?P.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}), (r'^comments/', include('django.contrib.comments.urls')), (r'^admin/(.*)', admin.site.root), @@ -32,6 +30,8 @@ url(r'^talks/talk/(?P\d+)/$', 'talk', name='talk_detail'), url(r'^submit-talk/$', 'submit_talk', name='kiwipycon_submit_talk'), url(r'^edit-talk/(?P\d+)/$', 'edit_talk', name='kiwipycon_edit_talk'), + url(r'^talks-cfp/list-talks/(?P\d+)/$', 'list_talks', + name='kiwipycon_list_talk'), ) # Registration