File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import logging
2+ import os
23import sys
34import pkg_resources
4- from flask import Flask
5+ from flask import Flask , send_from_directory
56from flask import render_template , url_for , redirect
67from flask_alembic import Alembic
78from flask_alembic .cli .click import cli as alembic_cli
@@ -65,9 +66,20 @@ def not_found(e):
6566 def internal_server_error (e ):
6667 return render_template ('errors/500.html' ), 500
6768
68- @app .route ('/pycon2016' )
69- def pycon2016 ():
70- return redirect (url_for ('wiki.detail' , title = 'PyCon US 2016' ))
69+ @app .route ('/.well-known/<path:path>' )
70+ def serve_lets_encrypt_challenge (path ):
71+ return send_from_directory (
72+ os .path .join (
73+ app .instance_path ,
74+ 'lets_encrypt_challenge' ,
75+ '.well-known'
76+ ),
77+ path
78+ )
79+
80+ @app .route ('/pycon' )
81+ def pycon ():
82+ return redirect (url_for ('wiki.detail' , title = 'PyCon US 2017' ))
7183
7284 if not app .debug :
7385 handler = logging .StreamHandler (sys .stderr )
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ <h2>print('Hello, World!')</h2>
1010 < p > Join us for chat in the < a href ="http://chat.stackoverflow.com/rooms/6/python "> Python room</ a > !</ p >
1111 </ div >
1212 < div class ="panel panel-info ">
13- < div class ="panel-heading "> PyCon US 2016 </ div >
14- < div class ="panel-body "> < p > < a href ="{{ url_for('pycon2016 ') }} "> We're at PyCon!</ a >
13+ < div class ="panel-heading "> PyCon US 2017 </ div >
14+ < div class ="panel-body "> < p > < a href ="{{ url_for('pycon ') }} "> We're at PyCon!</ a >
1515 David Lord (@davidism) is planning open spaces and meetups.
16- Ping @davidism in chat for more information.</ p > </ div >
16+ Ping @davidism in chat or on Twitter for more information.</ p > </ div >
1717 </ div >
1818 </ div > </ div >
1919{% endblock %}
You can’t perform that action at this time.
0 commit comments