Ejemplo n.º 1
0
 def index():
     title = 'Новости Python'
     weather = weather_by_city(app.config['WEATHER_DEFAULT_CITY'])
     news_list = get_python_news()
     return render_template('index.html',
                            page_title=title,
                            weather=weather,
                            news_list=news_list)
Ejemplo n.º 2
0
 def index():
     title = "Новости Python"
     weather = weather_by_city("Vladivostok, Russia")
     news_list = get_python_news()
     return render_template("index.html",
                            page_title=title,
                            weather=weather,
                            news_list=news_list)
Ejemplo n.º 3
0
from webapp import create_app
from webapp.python_org_news import get_python_news

app = create_app()
with app.app_context():
    get_python_news()