add schedule list
This commit is contained in:
		
							parent
							
								
									9bcfcb62e4
								
							
						
					
					
						commit
						13bc9ffacb
					
				
					 3 changed files with 29 additions and 1 deletions
				
			
		|  | @ -7,4 +7,5 @@ urlpatterns = patterns("symposion.schedule.views", | ||||||
|     url(r"^(\w+)/edit/$", "schedule_detail", name="schedule_detail"), |     url(r"^(\w+)/edit/$", "schedule_detail", name="schedule_detail"), | ||||||
|     url(r"^(\w+)/edit/$", "schedule_edit", name="schedule_edit"), |     url(r"^(\w+)/edit/$", "schedule_edit", name="schedule_edit"), | ||||||
|     url(r"^edit/slot/(?P<slot_pk>\d+)/", "schedule_slot_edit", name="schedule_slot_edit"), |     url(r"^edit/slot/(?P<slot_pk>\d+)/", "schedule_slot_edit", name="schedule_slot_edit"), | ||||||
|  |     url(r"^list/$", "schedule_list", name="schedule_list"), | ||||||
| ) | ) | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ from django.shortcuts import render, get_object_or_404, redirect | ||||||
| from django.contrib.auth.decorators import login_required | from django.contrib.auth.decorators import login_required | ||||||
| 
 | 
 | ||||||
| from symposion.schedule.forms import SlotEditForm | from symposion.schedule.forms import SlotEditForm | ||||||
| from symposion.schedule.models import Schedule, Day, Slot | from symposion.schedule.models import Schedule, Day, Slot, Presentation | ||||||
| from symposion.schedule.timetable import TimeTable | from symposion.schedule.timetable import TimeTable | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -24,6 +24,14 @@ def schedule_detail(request, slug=None): | ||||||
|     return render(request, "schedule/schedule_detail.html", ctx) |     return render(request, "schedule/schedule_detail.html", ctx) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | def schedule_list(request): | ||||||
|  |     presentations = Presentation.objects.order_by("id") | ||||||
|  |     ctx = { | ||||||
|  |         "presentations": presentations, | ||||||
|  |     } | ||||||
|  |     return render(request, "schedule/schedule_list.html", ctx) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| @login_required | @login_required | ||||||
| def schedule_edit(request, slug=None): | def schedule_edit(request, slug=None): | ||||||
|      |      | ||||||
|  |  | ||||||
							
								
								
									
										19
									
								
								symposion/templates/schedule/schedule_list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								symposion/templates/schedule/schedule_list.html
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,19 @@ | ||||||
|  | {% extends "site_base.html" %} | ||||||
|  | 
 | ||||||
|  | {% load i18n %} | ||||||
|  | 
 | ||||||
|  | {% block head_title %}Presentation Listing{% endblock %} | ||||||
|  | 
 | ||||||
|  | {% block body %} | ||||||
|  |     {% for presentation in presentations %} | ||||||
|  |         <div class="row"> | ||||||
|  |             <div class="span8 well"> | ||||||
|  |                 <h3>{{ presentation.title }}</h3> | ||||||
|  |                 <h4>{{ presentation.speaker }} in {{ presentation.proposal.track }}</h4> | ||||||
|  |                 <p> | ||||||
|  |                     {{ presentation.description }} | ||||||
|  |                 </p> | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |     {% endfor %} | ||||||
|  | {% endblock %} | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Luke Hatcher
						Luke Hatcher