mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 14:48:25 -04:00
@@ -1,10 +1,12 @@
|
|||||||
import ago
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import urllib
|
import urllib
|
||||||
import dateutil
|
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
|
from time import monotonic
|
||||||
|
|
||||||
|
import dateutil
|
||||||
import pytz
|
import pytz
|
||||||
|
import ago
|
||||||
from flask import (
|
from flask import (
|
||||||
Flask,
|
Flask,
|
||||||
session,
|
session,
|
||||||
@@ -16,14 +18,12 @@ from flask import (
|
|||||||
request,
|
request,
|
||||||
g,
|
g,
|
||||||
url_for)
|
url_for)
|
||||||
|
|
||||||
from flask._compat import string_types
|
from flask._compat import string_types
|
||||||
from flask.globals import _lookup_req_object
|
from flask.globals import _lookup_req_object
|
||||||
from flask_login import LoginManager
|
from flask_login import LoginManager
|
||||||
from flask_wtf import CsrfProtect
|
from flask_wtf import CsrfProtect
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from monotonic import monotonic
|
|
||||||
from notifications_python_client.errors import HTTPError
|
from notifications_python_client.errors import HTTPError
|
||||||
from notifications_utils import logging
|
from notifications_utils import logging
|
||||||
from notifications_utils.recipients import validate_phone_number, InvalidPhoneError
|
from notifications_utils.recipients import validate_phone_number, InvalidPhoneError
|
||||||
@@ -373,6 +373,7 @@ def useful_headers_after_request(response):
|
|||||||
|
|
||||||
def register_errorhandlers(application):
|
def register_errorhandlers(application):
|
||||||
def _error_response(error_code):
|
def _error_response(error_code):
|
||||||
|
application.logger.exception('Admin app errored with %s', error_code)
|
||||||
resp = make_response(render_template("error/{0}.html".format(error_code)), error_code)
|
resp = make_response(render_template("error/{0}.html".format(error_code)), error_code)
|
||||||
return useful_headers_after_request(resp)
|
return useful_headers_after_request(resp)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ boto3==1.3.0
|
|||||||
Pygments==2.0.2
|
Pygments==2.0.2
|
||||||
py-gfm==0.1.2
|
py-gfm==0.1.2
|
||||||
blinker==1.4
|
blinker==1.4
|
||||||
monotonic==0.3
|
|
||||||
lxml==3.6.0
|
lxml==3.6.0
|
||||||
pyexcel==0.2.1
|
pyexcel==0.2.1
|
||||||
pyexcel-io==0.1.0
|
pyexcel-io==0.1.0
|
||||||
|
|||||||
Reference in New Issue
Block a user