mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-15 14:16:08 -06:00
switch to flask-restx instead of flask-restplus which is no longer maintained
This commit is contained in:
parent
08e60b7ca5
commit
e0a61cd6bc
10 changed files with 16 additions and 16 deletions
|
|
@ -14,7 +14,7 @@ import uuid
|
|||
import hashlib
|
||||
|
||||
from flask import Blueprint, Response, request, current_app, session, abort, g
|
||||
from flask_restplus import Api as ApiPlus
|
||||
from flask_restx import Api as ApiPlus
|
||||
from flask_login import current_user
|
||||
from importlib import import_module
|
||||
from functools import wraps
|
||||
|
|
@ -95,7 +95,7 @@ def check_acl(func):
|
|||
|
||||
|
||||
class Api(ApiPlus):
|
||||
"""Wrapper class around :class:`flask_restplus.Api`"""
|
||||
"""Wrapper class around :class:`flask_restx.Api`"""
|
||||
logger = logger
|
||||
# TODO: should use global object instead of reference
|
||||
loaded = False
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ from ..decorators import browser_cache
|
|||
from ..ext.cache import cache
|
||||
from ..exceptions import BUIserverException
|
||||
|
||||
from flask_restplus.marshalling import marshal
|
||||
from flask_restplus import inputs
|
||||
from flask_restx.marshalling import marshal
|
||||
from flask_restx import inputs
|
||||
from flask import current_app, request
|
||||
from flask_login import current_user
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
|
||||
"""
|
||||
import flask_restplus.fields
|
||||
import flask_restx.fields
|
||||
|
||||
from flask_restplus.fields import * # noqa # pylint: disable=locally-disabled, wildcard-import, unused-wildcard-import
|
||||
from flask_restx.fields import * # noqa # pylint: disable=locally-disabled, wildcard-import, unused-wildcard-import
|
||||
from .my_fields import DateTime, DateTimeHuman, BackupNumber, SafeString, LocalizedString # noqa
|
||||
|
||||
__all__ = flask_restplus.fields.__all__ + \
|
||||
__all__ = flask_restx.fields.__all__ + \
|
||||
(DateTime, DateTimeHuman, BackupNumber, SafeString, LocalizedString)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import arrow
|
|||
|
||||
from ...ext.i18n import get_locale
|
||||
|
||||
from flask_restplus import fields
|
||||
from flask_restx import fields
|
||||
from flask_babel import gettext as _
|
||||
from flask import escape
|
||||
from tzlocal import get_localzone
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@
|
|||
import inspect
|
||||
import json
|
||||
|
||||
from flask_restplus import Resource as ResourcePlus
|
||||
from flask_restplus.errors import abort
|
||||
from flask_restx import Resource as ResourcePlus
|
||||
from flask_restx.errors import abort
|
||||
|
||||
from ...tools.logging import logger
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ class Resource(ResourcePlus):
|
|||
"""
|
||||
Properly abort the current request
|
||||
|
||||
See: :func:`~flask_restplus.errors.abort`
|
||||
See: :func:`~flask_restx.errors.abort`
|
||||
"""
|
||||
if message and not isinstance(message, str):
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ from time import gmtime, strftime, time
|
|||
from flask import Response, send_file, make_response, after_this_request, \
|
||||
current_app
|
||||
from flask_login import current_user
|
||||
from flask_restplus import inputs
|
||||
from flask_restx import inputs
|
||||
from werkzeug.datastructures import Headers
|
||||
from werkzeug.exceptions import HTTPException
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from ..utils import NOTIF_INFO
|
|||
from flask_babel import gettext as _, refresh
|
||||
from flask import jsonify, request, url_for, current_app, g, session, render_template_string
|
||||
from flask_login import current_user
|
||||
from flask_restplus import inputs
|
||||
from flask_restx import inputs
|
||||
from jinja2 import Environment, meta
|
||||
from ..datastructures import ImmutableMultiDict, MultiDict
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ from zlib import adler32
|
|||
from flask import url_for, Response, current_app, after_this_request, \
|
||||
send_file, request, g, session
|
||||
from flask_babel import gettext as _
|
||||
from flask_restplus import inputs
|
||||
from flask_restx import inputs
|
||||
from flask_login import current_user
|
||||
from datetime import timedelta
|
||||
from werkzeug.datastructures import Headers
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ def browser_cache(expires=None):
|
|||
"""
|
||||
from wsgiref.handlers import format_date_time
|
||||
from flask import g
|
||||
from flask_restplus.utils import unpack
|
||||
from flask_restx.utils import unpack
|
||||
|
||||
def cache_decorator(view):
|
||||
@wraps(view)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Flask-Login==0.4.1
|
|||
Flask-Bower==1.3.0
|
||||
Flask-Babel==0.12.2
|
||||
Flask-WTF==0.14.2
|
||||
flask-restplus==0.13.0
|
||||
flask-restx==0.1.1
|
||||
Flask-Caching==1.8.0
|
||||
Flask-Session==0.3.1
|
||||
WTForms==2.2.1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue