from forum.settings import MAINTAINANCE_MODE, APP_LOGO, APP_TITLE\r
-from django.http import HttpResponseGone\r
-from django.template.loader import render_to_string\r
\r
+from forum.http_responses import HttpResponseServiceUnavailable\r
\r
class RequestUtils(object):\r
def __init__(self):\r
ip = request.META['REMOTE_ADDR']\r
\r
if not ip in MAINTAINANCE_MODE.value['allow_ips']:\r
- return HttpResponseGone(render_to_string('410.html', {\r
- 'message': MAINTAINANCE_MODE.value.get('message', ''),\r
- 'app_logo': APP_LOGO,\r
- 'app_title': APP_TITLE\r
- }))\r
+ return HttpResponseServiceUnavailable(MAINTAINANCE_MODE.value.get('message', ''))\r
\r
if request.session.get('redirect_POST_data', None):\r
request.POST = request.session.pop('redirect_POST_data')\r