def create_cms_article_action(modeladmin, request, queryset): """The action called when executed from admin list of rss items""" for item in queryset: art = create_cms_article(request.user, item) if queryset.count() == 1: #if only 1 item processed (checked) return HttpResponseRedirect( art.get_edit_url()) #redirect to cms article edit page
def create_cms_article_action(modeladmin, request, queryset): """The action called when executed from admin list of rss items""" for item in queryset: art = create_cms_article(request.user, item) if queryset.count()==1: #if only 1 item processed (checked) return HttpResponseRedirect(art.get_edit_url()) #redirect to cms article edit page
def create_cms_article_view(request, item_id): """The view called when clicking on the button in admin object form""" item = get_object_or_404(RssItem, id=item_id) art = create_cms_article(request.user, item) return HttpResponseRedirect(art.get_edit_url()) #redirect to cms article edit page
def create_cms_article_view(request, item_id): """The view called when clicking on the button in admin object form""" item = get_object_or_404(RssItem, id=item_id) art = create_cms_article(request.user, item) return HttpResponseRedirect( art.get_edit_url()) #redirect to cms article edit page