Skip to content
Snippets Groups Projects
Commit 929e0645 authored by Brian Moe's avatar Brian Moe
Browse files

Slot updates

parent e3cd7a97
No related branches found
No related tags found
No related merge requests found
......@@ -815,6 +815,10 @@ class EventSlot(APIView):
return Response("Event does not exist.",
status=status.HTTP_404_NOT_FOUND)
if not slotname:
return Response(dict([(s.name, s.value)
for s in Slot.objects.filter(event=event)]))
try:
slot = Slot.objects.filter(event=event).filter(name=slotname)[0]
except:
......
......@@ -243,6 +243,8 @@ class MultiBurstEvent(Event):
class Slot(models.Model):
"""Slot Model"""
# Does the slot need to have a submitter column?
class Meta:
unique_together = (('event', 'name'))
event = models.ForeignKey(Event)
name = models.CharField(max_length=100)
value = models.CharField(max_length=100)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment