def clean(self):
super(SlotCreationForm,self).clean()<EOL>startDate = self.cleaned_data.get('<STR_LIT>')<EOL>endDate = self.cleaned_data.get('<STR_LIT>')<EOL>startTime = self.cleaned_data.get('<STR_LIT>')<EOL>endTime = self.cleaned_data.get('<STR_LIT>')<EOL>instructor = self.cleaned_data.get('<STR_LIT>')<EOL>existingSlots = InstructorAvailabilitySlot.objects.filter(<EOL>instructor=instructor,<EOL>startTime__gt=(<EOL>ensure_localtime(datetime.combine(startDate,startTime)) -<EOL>timedelta(minutes=getConstant('<STR_LIT>'))<EOL>),<EOL>startTime__lt=ensure_localtime(datetime.combine(endDate,endTime)),<EOL>)<EOL>if existingSlots.exists():<EOL><INDENT>raise ValidationError(_('<STR_LIT>'),code='<STR_LIT>')<EOL><DEDENT>
Only allow submission if there are not already slots in the submitted window,
and only allow rooms associated with the chosen location.