Added Slot.content_override
Slots can now be controlled through content_override if custom content is needed in non-talk slots.
This commit is contained in:
		
							parent
							
								
									06ea84331c
								
							
						
					
					
						commit
						d7ac510555
					
				
					 3 changed files with 11 additions and 2 deletions
				
			
		|  | @ -48,6 +48,7 @@ class Slot(models.Model): | |||
|     kind = models.ForeignKey(SlotKind) | ||||
|     start = models.TimeField() | ||||
|     end = models.TimeField() | ||||
|     content_override = models.TextField(blank=True) | ||||
|      | ||||
|     def assign(self, content): | ||||
|         """ | ||||
|  |  | |||
|  | @ -18,7 +18,11 @@ | |||
|                             <div class="speaker">{{ slot.content.speaker }}</div> | ||||
|                         {% endif %} | ||||
|                     {% else %} | ||||
|                         {{ slot.kind.label }} | ||||
|                         {% if slot.content_override %} | ||||
|                             {{ slot.content_override|safe }} | ||||
|                         {% else %} | ||||
|                             {{ slot.kind.label }} | ||||
|                         {% endif %} | ||||
|                     {% endif %} | ||||
|                 </td> | ||||
|             {% endfor %} | ||||
|  |  | |||
|  | @ -17,7 +17,11 @@ | |||
|                             <div class="speaker">{{ slot.content.speaker }}</div> | ||||
|                         {% endif %} | ||||
|                     {% else %} | ||||
|                         {{ slot.kind.label }} | ||||
|                         {% if slot.content_override %} | ||||
|                             {{ slot.content_override|safe }} | ||||
|                         {% else %} | ||||
|                             {{ slot.kind.label }} | ||||
|                         {% endif %} | ||||
|                     {% endif %} | ||||
|                 </td> | ||||
|             {% endfor %} | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Brian Rosner
						Brian Rosner