Beispiel #1
0
    def clean(self):
        application = self.save(commit=False)
        # This will validate if forms can be submitted or not

        if application.is_submitted:
            raise forms.ValidationError("Applications was already submitted")

        if not SiteSettingService.is_rush_open():
            raise forms.ValidationError("Application is late")

        if 'submit_btn' in self.data:
            application.is_submitted = True
Beispiel #2
0
 def get(self, request, format=None):
     return Response({ 'rush': SiteSettingService.is_rush_open()})
Beispiel #3
0
 def is_open_for_signup(self, request):
     return SiteSettingService.is_rush_open()