mirror of https://github.com/JohnHammond/CTFd.git
Replace flask_restful with flask_restx (#1282)
Co-authored-by: Kevin Chung <kchung@ctfd.io>1318-submissions-api-improvements
parent
05e5730c54
commit
6f87129846
|
@ -1,5 +1,5 @@
|
||||||
from flask import Blueprint, current_app
|
from flask import Blueprint, current_app
|
||||||
from flask_restplus import Api
|
from flask_restx import Api
|
||||||
|
|
||||||
from CTFd.api.v1.awards import awards_namespace
|
from CTFd.api.v1.awards import awards_namespace
|
||||||
from CTFd.api.v1.challenges import challenges_namespace
|
from CTFd.api.v1.challenges import challenges_namespace
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.cache import clear_standings
|
from CTFd.cache import clear_standings
|
||||||
from CTFd.utils.config import is_teams_mode
|
from CTFd.utils.config import is_teams_mode
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from flask import abort, request, url_for
|
from flask import abort, request, url_for
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
from sqlalchemy.sql import and_
|
from sqlalchemy.sql import and_
|
||||||
|
|
||||||
from CTFd.cache import clear_standings
|
from CTFd.cache import clear_standings
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.cache import clear_config, clear_standings
|
from CTFd.cache import clear_config, clear_standings
|
||||||
from CTFd.models import Configs, db
|
from CTFd.models import Configs, db
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.models import Files, db
|
from CTFd.models import Files, db
|
||||||
from CTFd.schemas.files import FileSchema
|
from CTFd.schemas.files import FileSchema
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.models import Flags, db
|
from CTFd.models import Flags, db
|
||||||
from CTFd.plugins.flags import FLAG_CLASSES, get_flag_class
|
from CTFd.plugins.flags import FLAG_CLASSES, get_flag_class
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.models import Hints, HintUnlocks, db
|
from CTFd.models import Hints, HintUnlocks, db
|
||||||
from CTFd.schemas.hints import HintSchema
|
from CTFd.schemas.hints import HintSchema
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import current_app, request
|
from flask import current_app, request
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.models import Notifications, db
|
from CTFd.models import Notifications, db
|
||||||
from CTFd.schemas.notifications import NotificationSchema
|
from CTFd.schemas.notifications import NotificationSchema
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.cache import clear_pages
|
from CTFd.cache import clear_pages
|
||||||
from CTFd.models import Pages, db
|
from CTFd.models import Pages, db
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.cache import cache, make_cache_key
|
from CTFd.cache import cache, make_cache_key
|
||||||
from CTFd.models import Awards, Solves, Teams
|
from CTFd.models import Awards, Solves, Teams
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from flask_restplus import Namespace
|
from flask_restx import Namespace
|
||||||
|
|
||||||
statistics_namespace = Namespace(
|
statistics_namespace = Namespace(
|
||||||
"statistics", description="Endpoint to retrieve Statistics"
|
"statistics", description="Endpoint to retrieve Statistics"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from flask_restplus import Resource
|
from flask_restx import Resource
|
||||||
from sqlalchemy import func
|
from sqlalchemy import func
|
||||||
from sqlalchemy.sql import or_
|
from sqlalchemy.sql import or_
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from flask_restplus import Resource
|
from flask_restx import Resource
|
||||||
from sqlalchemy import func
|
from sqlalchemy import func
|
||||||
|
|
||||||
from CTFd.api.v1.statistics import statistics_namespace
|
from CTFd.api.v1.statistics import statistics_namespace
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from flask_restplus import Resource
|
from flask_restx import Resource
|
||||||
|
|
||||||
from CTFd.api.v1.statistics import statistics_namespace
|
from CTFd.api.v1.statistics import statistics_namespace
|
||||||
from CTFd.models import Teams
|
from CTFd.models import Teams
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from flask_restplus import Resource
|
from flask_restx import Resource
|
||||||
from sqlalchemy import func
|
from sqlalchemy import func
|
||||||
|
|
||||||
from CTFd.api.v1.statistics import statistics_namespace
|
from CTFd.api.v1.statistics import statistics_namespace
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.cache import clear_standings
|
from CTFd.cache import clear_standings
|
||||||
from CTFd.models import Submissions, db
|
from CTFd.models import Submissions, db
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.models import Tags, db
|
from CTFd.models import Tags, db
|
||||||
from CTFd.schemas.tags import TagSchema
|
from CTFd.schemas.tags import TagSchema
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
from flask import abort, request, session
|
from flask import abort, request, session
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.cache import clear_standings
|
from CTFd.cache import clear_standings
|
||||||
from CTFd.models import Awards, Submissions, Teams, Unlocks, Users, db
|
from CTFd.models import Awards, Submissions, Teams, Unlocks, Users, db
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from flask import request, session
|
from flask import request, session
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.models import Tokens, db
|
from CTFd.models import Tokens, db
|
||||||
from CTFd.schemas.tokens import TokenSchema
|
from CTFd.schemas.tokens import TokenSchema
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import request
|
from flask import request
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.cache import clear_standings
|
from CTFd.cache import clear_standings
|
||||||
from CTFd.models import Unlocks, db, get_class_by_tablename
|
from CTFd.models import Unlocks, db, get_class_by_tablename
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from flask import abort, request, session
|
from flask import abort, request, session
|
||||||
from flask_restplus import Namespace, Resource
|
from flask_restx import Namespace, Resource
|
||||||
|
|
||||||
from CTFd.cache import clear_standings
|
from CTFd.cache import clear_standings
|
||||||
from CTFd.models import (
|
from CTFd.models import (
|
||||||
|
|
|
@ -21,7 +21,7 @@ redis==3.3.11
|
||||||
datafreeze==0.1.0
|
datafreeze==0.1.0
|
||||||
gevent==1.4.0
|
gevent==1.4.0
|
||||||
python-dotenv==0.10.3
|
python-dotenv==0.10.3
|
||||||
flask-restplus==0.13.0
|
flask-restx==0.1.1
|
||||||
pathlib2==2.3.5
|
pathlib2==2.3.5
|
||||||
flask-marshmallow==0.10.1
|
flask-marshmallow==0.10.1
|
||||||
marshmallow-sqlalchemy==0.17.0
|
marshmallow-sqlalchemy==0.17.0
|
||||||
|
|
Loading…
Reference in New Issue