Exemple #1
0
Fichier : web.py Projet : mylk/ojah
def news(request):
    template = loader.get_template('web/news.html')

    news_items = NewsItem.find_positive(settings.SENTIMENT_POLARITY_THRESHOLD,
                                        settings.WEB_NEWS_ITEMS_COUNT)

    context = {'news_items': news_items}

    return HttpResponse(template.render(context))
Exemple #2
0
 def items():
     return NewsItem.find_positive(settings.SENTIMENT_POLARITY_THRESHOLD,
                                   settings.RSS_FEED_NEWS_ITEMS_COUNT)