Example #1
0
def index():
    noticias_template = u"""
		<a href="/noticia/{noticia[id]}">{noticia[title]}</a>
	"""
    todas_noticias = [
        noticias_template.format(noticia=noticia)
        for noticia in noticias.all()
    ]

    return render_template("news/index.html",
                           title="All news",
                           noticias=todas_noticias)
Example #2
0
def index():

    noticia_template = u"""
        <a href="/noticia/{noticia[id]}">{noticia[titulo]}</a>
    """

    # it's a kind of magic :)
    todas_as_noticias = [
        noticia_template.format(noticia=noticia) for noticia in noticias.all()
    ]

    return base_html.format(title=u"Todas as notícias",
                            body=u"<br />".join(todas_as_noticias),
                            logo_url=url_for('static',
                                             filename='generic_logo.gif'))
def index():
	todas_as_noticias = noticias.all()
	return render_template('index.html', noticias=todas_as_noticias, title=u"Todas as noticias")
Example #4
0
def index():
    todas_as_noticias = noticias.all()
    return render_template('index.html',
                           noticias=todas_as_noticias,
                           title=u"Todas as notícias")
Example #5
0
def index():
    todas_as_noticias = noticias.all()
    return render_template('noticia.html', noticia=noticia)
Example #6
0
def index():
    return jsonify(noticias=[noticia for noticia in noticias.all()])