##// END OF EJS Templates
Minor import cleanup. Added forgotten fetch command file to mercurial
Minor import cleanup. Added forgotten fetch command file to mercurial

File last commit:

r1979:b71d904c default
r1979:b71d904c default
Show More
fetch_from_sources.py
16 lines | 412 B | text/x-python | PythonLexer
from django.core.management import BaseCommand
from django.db import transaction
from boards.models.source import ThreadSource
__author__ = 'neko259'
class Command(BaseCommand):
help = 'Fetches data from sources and posts into appropriate threads'
@transaction.atomic
def handle(self, *args, **options):
for source in ThreadSource.objects.all():
source.fetch_latest_posts()