docs: def dispatch(self, request, *args, **kwargs):
          '''
          Check that registration is online before proceeding.  If this is a POST
          request, determine whether the response should be provided in JSON form.
          '''
          self.returnJson = (request.POST.get('json') in ['true', True])
  
          regonline = getConstant('registration__registrationEnabled')
          if not regonline:
              returnUrl = reverse('registrationOffline')
  
              if self.returnJson:
                  return JsonResponse({'status': 'success', 'redirect': returnUrl})
              return HttpResponseRedirect(returnUrl)
  
          return super().dispatch(request, *args, **kwargs)