initial commit
This commit is contained in:
7
autoreply_editor/__init__.py
Normal file
7
autoreply_editor/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from flask import Flask
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
import autoreply_editor.main
|
||||
|
||||
app.config.from_pyfile("config.py")
|
||||
1
autoreply_editor/config.py
Normal file
1
autoreply_editor/config.py
Normal file
@@ -0,0 +1 @@
|
||||
MESSAGE_FILE = "message.txt"
|
||||
9
autoreply_editor/main.py
Normal file
9
autoreply_editor/main.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from autoreply_editor import app
|
||||
from flask import render_template
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
with open(app.config.get("MESSAGE_FILE"), "r") as f:
|
||||
content = f.read()
|
||||
|
||||
return render_template("index.html", content=content)
|
||||
3
autoreply_editor/templates/index.html
Normal file
3
autoreply_editor/templates/index.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
Hello! {{ content }}
|
||||
</p>
|
||||
Reference in New Issue
Block a user