Exemple #1
0
def collect_rss_items_view(request, source_id):
    """The view called when clicking on the button in the object admin form"""
    rss_source = get_object_or_404(RssSource, id=source_id)
    
    collect_rss_items(request.user, rss_source)
    
    url = reverse('admin:rss_sync_rssitem_changelist')+u'?source__id__exact={0}'.format(rss_source.id)
    return HttpResponseRedirect(url)
Exemple #2
0
def collect_rss_items_view(request, source_id):
    """The view called when clicking on the button in the object admin form"""
    rss_source = get_object_or_404(RssSource, id=source_id)

    collect_rss_items(request.user, rss_source)

    url = reverse('admin:rss_sync_rssitem_changelist'
                  ) + u'?source__id__exact={0}'.format(rss_source.id)
    return HttpResponseRedirect(url)
Exemple #3
0
def collect_rss_items_action(modeladmin, request, queryset):
    """The action called when executed from admin list of rss sources"""
    for source in queryset:
        collect_rss_items(request.user, source)
    url = reverse('admin:rss_sync_rssitem_changelist')
    return HttpResponseRedirect(url)
Exemple #4
0
def collect_rss_items_action(modeladmin, request, queryset):
    """The action called when executed from admin list of rss sources"""
    for source in queryset:
        collect_rss_items(request.user, source)
    url = reverse('admin:rss_sync_rssitem_changelist')
    return HttpResponseRedirect(url)