Use {% load url from future %} in schedule templates
Using https://github.com/futurecolors/django-future-url
This commit is contained in:
		
							parent
							
								
									4c912da4ac
								
							
						
					
					
						commit
						76a5e08e2f
					
				
					 5 changed files with 16 additions and 7 deletions
				
			
		|  | @ -1,3 +1,4 @@ | |||
| {% load url from future %} | ||||
| <table class="calendar table table-bordered"> | ||||
|     <thead> | ||||
|         <tr> | ||||
|  | @ -15,9 +16,9 @@ | |||
|                     <td class="slot slot-{{ slot.kind.label }}" colspan="{{ slot.colspan }}" rowspan="{{ slot.rowspan }}"> | ||||
|                         {% if slot.kind.label == "talk" or slot.kind.label == "tutorial" %} | ||||
|                             {% if not slot.content %} | ||||
|                                 <a class="btn btn-mini edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">+</a> | ||||
|                                 <a class="btn btn-mini edit-slot" data-action="{% url 'schedule_slot_edit' schedule.section.slug slot.pk %}" href="#">+</a> | ||||
|                             {% else %} | ||||
|                                 <span class="title"><a class="edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">{{ slot.content.title }}</a></span> | ||||
|                                 <span class="title"><a class="edit-slot" data-action="{% url 'schedule_slot_edit' schedule.section.slug slot.pk %}" href="#">{{ slot.content.title }}</a></span> | ||||
|                                 <span class="speaker">{{ slot.content.speaker }}</span> | ||||
|                             {% endif %} | ||||
|                         {% else %} | ||||
|  | @ -26,7 +27,7 @@ | |||
|                             {% else %} | ||||
|                                 {{ slot.kind.label }} | ||||
|                             {% endif %} | ||||
|                             — <a class="edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">edit</a> | ||||
|                             — <a class="edit-slot" data-action="{% url 'schedule_slot_edit' schedule.section.slug slot.pk %}" href="#">edit</a> | ||||
|                         {% endif %} | ||||
|                     </td> | ||||
|                 {% endfor %} | ||||
|  |  | |||
|  | @ -1,3 +1,4 @@ | |||
| {% load url from future %} | ||||
| <table class="calendar table table-bordered"> | ||||
|     <thead> | ||||
|         <tr> | ||||
|  | @ -17,7 +18,7 @@ | |||
|                             {% if not slot.content %} | ||||
|                             {% else %} | ||||
|                                 <span class="title"> | ||||
|                                     <a href="{% url schedule_presentation_detail slot.content.pk %}">{{ slot.content.title }}</a> | ||||
|                                     <a href="{% url 'schedule_presentation_detail' slot.content.pk %}">{{ slot.content.title }}</a> | ||||
|                                 </span> | ||||
|                                 <span class="speaker"> | ||||
|                                     {{ slot.content.speakers|join:", " }} | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| {% load url from future %} | ||||
| {% load i18n bootstrap_tags %} | ||||
| <form id="slotEditForm" class="modal-form" method="POST" action="{% url schedule_slot_edit slug slot.pk %}"> | ||||
| <form id="slotEditForm" class="modal-form" method="POST" action="{% url 'schedule_slot_edit' slug slot.pk %}"> | ||||
|     <div class="modal-header"> | ||||
|         <a class="close" data-dismiss="modal">×</a> | ||||
|         <h3>{% trans "Edit Slot" %}</h3> | ||||
|  |  | |||
|  | @ -1,5 +1,8 @@ | |||
| {% extends "site_base.html" %} | ||||
| 
 | ||||
| {% load url from future %} | ||||
| 
 | ||||
| 
 | ||||
| {% load sitetree %} | ||||
| 
 | ||||
| {% block head_title %}Presentation: {{ presentation.title }}{% endblock %} | ||||
|  | @ -17,7 +20,7 @@ | |||
| 
 | ||||
|     <h4> | ||||
|         {% for speaker in presentation.speakers %} | ||||
|             <a href="{% url speaker_profile speaker.pk %}">{{ speaker }}</a>{% if not forloop.last %}, {% endif %}{% endfor %} | ||||
|             <a href="{% url 'speaker_profile' speaker.pk %}">{{ speaker }}</a>{% if not forloop.last %}, {% endif %}{% endfor %} | ||||
|     </h4> | ||||
| 
 | ||||
|     <dl class="dl-horizontal"> | ||||
|  |  | |||
|  | @ -1,5 +1,8 @@ | |||
| {% extends "site_base.html" %} | ||||
| 
 | ||||
| {% load url from future %} | ||||
| 
 | ||||
| 
 | ||||
| {% load i18n %} | ||||
| {% load cache %} | ||||
| {% load sitetree %} | ||||
|  | @ -33,7 +36,7 @@ | |||
|         {% for presentation in presentations %} | ||||
|             <div class="row"> | ||||
|                 <div class="span8 presentation well"> | ||||
|                     <h3><a href="{% url schedule_presentation_detail presentation.pk %}">{{ presentation.title }}</a></h3> | ||||
|                     <h3><a href="{% url 'schedule_presentation_detail' presentation.pk %}">{{ presentation.title }}</a></h3> | ||||
|                     <h4>{{ presentation.speakers|join:", " }}</h4> | ||||
|                     {{ presentation.description }} | ||||
|                     {% if presentation.slot %} | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Rebecca Lovewell
						Rebecca Lovewell