25 lines
605 B
Python
25 lines
605 B
Python
from flask import Flask, Response
|
|
app = Flask(__name__)
|
|
|
|
@app.route('/feed.xml')
|
|
def feed():
|
|
lines = []
|
|
with open('feed.xml', 'r') as f:
|
|
for l in f.readlines():
|
|
lines.append(l)
|
|
return Response('\n'.join(lines),
|
|
mimetype='application/rss+xml')
|
|
|
|
@app.route('/')
|
|
def homepage():
|
|
return '''
|
|
<h1>Whoops!</h1>
|
|
<p>
|
|
Hey! We're currently having some problems with our website,
|
|
since our server is down. We'll be back soon though. Thanks
|
|
for your patience!
|
|
</p>
|
|
'''
|
|
|
|
if __name__ == '__main__':
|
|
app.run(debug=True, use_reloader=True)
|