-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add support for MAINTENANCE_MODE
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from django.http import HttpResponse | ||
from django.shortcuts import render | ||
|
||
|
||
def maintenance(get_response): | ||
def middleware(request): | ||
response = HttpResponse( | ||
render(request, "maintenance.html"), | ||
status=200, | ||
) | ||
return response | ||
|
||
return middleware |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block header %}{% endblock %} | ||
{% block sidebar %}{% endblock %} | ||
|
||
{% block content %} | ||
<div class="divider"><span></span><span><h2>AI Arena is currently under maintenance</h2></span><span></span></div> | ||
<div id="inner_content"> | ||
<center> | ||
AI Arena is currently under scheduled technical maintenance. <br /> | ||
We are upgrading our systems to improve site performance and reliability.<br /> | ||
Please check back in a while. It shouldn't take longer than 60 minutes. | ||
</center> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters