Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
崔为之
elp
Commits
8b1c09c9
Commit
8b1c09c9
authored
Nov 04, 2023
by
崔为之
💪🏽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update project
parent
704a5a87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
application/extensions/__init__.py
application/extensions/__init__.py
+2
-0
application/extensions/init_cors.py
application/extensions/init_cors.py
+24
-0
No files found.
application/extensions/__init__.py
View file @
8b1c09c9
...
...
@@ -13,6 +13,7 @@
from
flask
import
Flask
from
.init_config
import
init_config
from
.init_cors
import
init_cors
from
.init_logger
import
init_logger
from
.init_sqlalchemy
import
init_database
from
.init_bcrypt
import
init_bcrypt
...
...
@@ -31,3 +32,4 @@ def init_plugs(app: Flask) -> None:
init_apispec
(
app
)
init_marshmallow
(
app
)
init_elasticsearch
(
app
)
init_cors
(
app
)
application/extensions/init_cors.py
0 → 100644
View file @
8b1c09c9
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
# @Version : Python 3.11.4
# @Software : Sublime Text 4
# @Author : StudentCWZ
# @Email : StudentCWZ@outlook.com
# @Date : 2023/11/4 15:43
# @File : init_cors.py
# @Description :
"""
from
flask
import
Flask
from
flask_cors
import
CORS
def
init_cors
(
app
:
Flask
)
->
None
:
"""
Initialize the dynaconf extension
:param app: flask.Flask application instance
:return: None
"""
CORS
(
app
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment