Replace flask_restful with flask_restx (#1282)

Co-authored-by: Kevin Chung <kchung@ctfd.io>
1318-submissions-api-improvements
‏‏Dave 2020-04-14 19:26:50 +00:00 committed by GitHub
parent 05e5730c54
commit 6f87129846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 22 additions and 22 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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_

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 (

View File

@ -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