diff --git a/judge/middleware.py b/judge/middleware.py index f04b708..73fb2c9 100644 --- a/judge/middleware.py +++ b/judge/middleware.py @@ -114,5 +114,6 @@ class SubdomainMiddleware(object): reverse("auth_login") + "?next=" + urlquote(request.path) ) except ObjectDoesNotExist: - pass + scheme = "https" if settings.DMOJ_SSL > 0 else "http" + return HttpResponseRedirect(scheme + "://" + site) return self.get_response(request) diff --git a/judge/views/submission.py b/judge/views/submission.py index 484d23e..e8e6489 100644 --- a/judge/views/submission.py +++ b/judge/views/submission.py @@ -783,7 +783,10 @@ class AllSubmissions(SubmissionsListBase): def get_context_data(self, **kwargs): context = super(AllSubmissions, self).get_context_data(**kwargs) - context["dynamic_update"] = context["page_obj"].number == 1 + print(self.request.organization) + context["dynamic_update"] = ( + context["page_obj"].number == 1 + ) and not self.request.organization context["last_msg"] = event.last() context["stats_update_interval"] = self.stats_update_interval return context