diff --git a/.idea/MarioWeb.iml b/.idea/MarioWeb.iml new file mode 100644 index 0000000..37901ac --- /dev/null +++ b/.idea/MarioWeb.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/artifacts/Mario_AI_Interface_jar.xml b/.idea/artifacts/Mario_AI_Interface_jar.xml deleted file mode 100644 index 619f216..0000000 --- a/.idea/artifacts/Mario_AI_Interface_jar.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - $USER_HOME$/Documents/MarioGAN/cheerpj_2.3 - - - - - \ No newline at end of file diff --git a/.idea/libraries/Mario_AI_Interface.xml b/.idea/libraries/Mario_AI_Interface.xml deleted file mode 100644 index 1c80183..0000000 --- a/.idea/libraries/Mario_AI_Interface.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 0e05be0..d56657a 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,4 @@ - - - + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 3e4201b..8086adc 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 35eb1dd..94a25f7 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b1d20ac..7dd98c7 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,14 +1,15 @@ - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/Flask/main.py b/Flask/main.py deleted file mode 100644 index 5596b44..0000000 --- a/Flask/main.py +++ /dev/null @@ -1,16 +0,0 @@ -# This is a sample Python script. - -# Press Shift+F10 to execute it or replace it with your code. -# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. - - -def print_hi(name): - # Use a breakpoint in the code line below to debug your script. - print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint. - - -# Press the green button in the gutter to run the script. -if __name__ == '__main__': - print_hi('PyCharm') - -# See PyCharm help at https://www.jetbrains.com/help/pycharm/ diff --git a/__pycache__/main.cpython-39.pyc b/__pycache__/main.cpython-39.pyc new file mode 100644 index 0000000..ac829f0 Binary files /dev/null and b/__pycache__/main.cpython-39.pyc differ diff --git a/main.py b/main.py new file mode 100644 index 0000000..2b96db4 --- /dev/null +++ b/main.py @@ -0,0 +1,22 @@ +from flask import Flask, render_template, request, redirect, url_for + +app = Flask(__name__,static_folder='') + +@app.route('/') +def index(): + py2htmlstr = 'py2html test str' + return render_template('play.html',py2htmlstr = py2htmlstr) + +@app.route('/dataPage') +def dataPage(data): + return data + +@app.route('/',methods = ['POST']) +def getData(): + if request.method == 'POST': + print("POST") + print(request.json) + return redirect(url_for('dataPage',data = request.json)) + +if __name__ == '__main__': + app.run(debug=True) \ No newline at end of file diff --git a/play.html b/play.html index 78aaca8..9ef3ebc 100644 --- a/play.html +++ b/play.html @@ -4,14 +4,26 @@ CheerpJ test + +
{{ py2htmlstr }} + + + + +
{{ py2htmlstr }} + + \ No newline at end of file