Ejemplo n.º 1
0
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 only 1 item processed (checked)
    if queryset.count() == 1:
        return HttpResponseRedirect(art.get_edit_url())  # redirect to cms article edit page
Ejemplo n.º 2
0
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 only 1 item processed (checked)
    if queryset.count() == 1:
        return HttpResponseRedirect(art.get_edit_url())  # redirect to cms article edit page
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
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