mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
inline notifications-python-client
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
from flask import current_app, redirect, render_template, session, url_for
|
||||
from flask_login import current_user
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
from app import service_api_client
|
||||
from app.formatters import email_safe
|
||||
from app.main import main
|
||||
from app.main.forms import CreateServiceForm
|
||||
from app.utils.user import user_is_gov_user, user_is_logged_in
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
|
||||
def _create_service(service_name, organization_type, email_from, form):
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
from flask import jsonify, redirect, render_template, session, url_for
|
||||
from flask_login import current_user
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
from app import current_service, notification_api_client, service_api_client
|
||||
from app.main import main
|
||||
from app.main.forms import SearchByNameForm
|
||||
from app.models.template_list import TemplateList
|
||||
from app.utils.user import user_has_permissions
|
||||
from notifications_python_client.errors import HTTPError
|
||||
from notifications_utils.recipients import format_phone_number_human_readable
|
||||
from notifications_utils.template import SMSPreviewTemplate
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from flask import flash, redirect, render_template, request, url_for
|
||||
from flask_login import current_user
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
from app import user_api_client
|
||||
from app.event_handlers import create_archive_user_event
|
||||
@@ -8,6 +7,7 @@ from app.main import main
|
||||
from app.main.forms import AdminSearchUsersByEmailForm, AuthTypeForm
|
||||
from app.models.user import User
|
||||
from app.utils.user import user_is_platform_admin
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
|
||||
@main.route("/find-users-by-email", methods=["GET", "POST"])
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from flask import render_template, request
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
from app import user_api_client
|
||||
from app.main import main
|
||||
from app.main.forms import ForgotPasswordForm
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
|
||||
@main.route("/forgot-password", methods=["GET", "POST"])
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from flask import abort, flash, redirect, render_template, request, session, url_for
|
||||
from flask_login import current_user
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
from app import current_service, service_api_client
|
||||
from app.event_handlers import (
|
||||
@@ -24,6 +23,7 @@ from app.main.forms import (
|
||||
from app.models.user import InvitedUser, User
|
||||
from app.utils.user import is_gov_user, user_has_permissions
|
||||
from app.utils.user_permissions import permission_options
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
|
||||
@main.route("/services/<uuid:service_id>/users")
|
||||
|
||||
@@ -4,7 +4,6 @@ from functools import partial
|
||||
|
||||
from flask import flash, redirect, render_template, request, url_for
|
||||
from flask_login import current_user
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
from app import current_organization, org_invite_api_client, organizations_client
|
||||
from app.main import main
|
||||
@@ -27,6 +26,7 @@ from app.models.organization import AllOrganizations, Organization
|
||||
from app.models.user import InvitedOrgUser, User
|
||||
from app.utils.csv import Spreadsheet
|
||||
from app.utils.user import user_has_permissions, user_is_platform_admin
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
|
||||
@main.route("/organizations", methods=["GET"])
|
||||
|
||||
@@ -15,7 +15,6 @@ from flask import (
|
||||
session,
|
||||
url_for,
|
||||
)
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
from app import (
|
||||
billing_api_client,
|
||||
@@ -46,6 +45,7 @@ from app.utils.pagination import (
|
||||
get_page_from_request,
|
||||
)
|
||||
from app.utils.user import user_is_platform_admin
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
COMPLAINT_THRESHOLD = 0.02
|
||||
FAILURE_THRESHOLD = 3
|
||||
|
||||
@@ -17,7 +17,6 @@ from flask import (
|
||||
)
|
||||
from flask_login import current_user
|
||||
from markupsafe import Markup
|
||||
from notifications_python_client.errors import HTTPError
|
||||
from xlrd.biffh import XLRDError
|
||||
from xlrd.xldate import XLDateError
|
||||
|
||||
@@ -52,6 +51,7 @@ from app.utils import (
|
||||
from app.utils.csv import Spreadsheet, get_errors_for_csv
|
||||
from app.utils.templates import get_template
|
||||
from app.utils.user import user_has_permissions
|
||||
from notifications_python_client.errors import HTTPError
|
||||
from notifications_utils import SMS_CHAR_COUNT_LIMIT
|
||||
from notifications_utils.insensitive_dict import InsensitiveDict
|
||||
from notifications_utils.recipients import RecipientCSV, first_column_headings
|
||||
|
||||
@@ -12,7 +12,6 @@ from flask import (
|
||||
url_for,
|
||||
)
|
||||
from flask_login import current_user
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
from app import (
|
||||
billing_api_client,
|
||||
@@ -52,6 +51,7 @@ from app.main.forms import (
|
||||
from app.utils import DELIVERED_STATUSES, FAILURE_STATUSES, SENDING_STATUSES
|
||||
from app.utils.time import parse_naive_dt
|
||||
from app.utils.user import user_has_permissions, user_is_platform_admin
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
PLATFORM_ADMIN_SERVICE_PERMISSIONS = OrderedDict(
|
||||
[
|
||||
|
||||
@@ -3,7 +3,6 @@ from functools import partial
|
||||
from flask import abort, flash, jsonify, redirect, render_template, request, url_for
|
||||
from flask_login import current_user
|
||||
from markupsafe import Markup
|
||||
from notifications_python_client.errors import HTTPError
|
||||
|
||||
from app import (
|
||||
current_service,
|
||||
@@ -29,6 +28,7 @@ from app.models.template_list import TemplateList, TemplateLists
|
||||
from app.utils import NOTIFICATION_TYPES, should_skip_template_page
|
||||
from app.utils.templates import get_template
|
||||
from app.utils.user import user_has_permissions
|
||||
from notifications_python_client.errors import HTTPError
|
||||
from notifications_utils import SMS_CHAR_COUNT_LIMIT
|
||||
|
||||
form_objects = {
|
||||
|
||||
Reference in New Issue
Block a user