2019-08-16 09:28:06 -04:00
|
|
|
from flask import Flask, Response
|
2019-08-16 09:20:05 -04:00
|
|
|
app = Flask(__name__)
|
|
|
|
|
2019-08-16 09:28:06 -04:00
|
|
|
@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')
|
|
|
|
|
2019-08-16 09:20:05 -04:00
|
|
|
@app.route('/')
|
|
|
|
def homepage():
|
2019-08-16 09:28:06 -04:00
|
|
|
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>
|
|
|
|
'''
|
2019-08-16 09:20:05 -04:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
app.run(debug=True, use_reloader=True)
|