Anpassungen für das Hosting bei Djangoeurope und damit verbundenen Versionen Django 1.8 und Python 2.7

This commit is contained in:
Christian Berg
2015-08-05 18:55:48 +02:00
committed by Christian Berg
parent cb4b15b3c6
commit 37d3cb78c1
1355 changed files with 7289 additions and 6858 deletions

View File

@@ -0,0 +1,21 @@
"""
Update feeds for Django community page. Requires Mark Pilgrim's excellent
Universal Feed Parser (http://feedparser.org)
"""
from django.core.management.base import BaseCommand
from aggregator.models import Feed
class Command(BaseCommand):
help = "Updates all RSS Feeds"
def handle(self, *args, **options):
verbose = int(options['verbosity']) > 0
for feed in Feed.objects.filter(is_functional=True):
if verbose:
print
print "%s - URL: %s" % (feed.title, feed.feed_url)
print '=' * 80
feed.parse()