• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python utils.run_export_task函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中tendenci.core.exports.utils.run_export_task函数的典型用法代码示例。如果您正苦于以下问题:Python run_export_task函数的具体用法?Python run_export_task怎么用?Python run_export_task使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了run_export_task函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: export

def export(request, template_name="stories/export.html"):
    """Export Stories"""
    
    if not request.user.is_superuser:
        raise Http403
    
    if request.method == 'POST':
        # initilize initial values
        file_name = "stories.csv"
        fields = [
            'guid',
            'title',
            'content',
            'syndicate',
            'full_story_link',
            'start_dt',
            'end_dt',
            'expires',
            'ncsortorder',
            'entity',
            'tags',
            'categories',
        ]
        export_id = run_export_task('stories', 'story', fields)
        return redirect('export.status', export_id)
        
    return render_to_response(template_name, {
    }, context_instance=RequestContext(request))
开发者ID:legutierr,项目名称:tendenci,代码行数:28,代码来源:views.py


示例2: export

def export(request, template_name="pages/export.html"):
    """Export Pages"""
    if not request.user.is_superuser:
        raise Http403

    if request.method == 'POST':

        fields = [
            'guid',
            'title',
            'slug',
            'header_image',
            'content',
            'view_contact_form',
            'design_notes',
            'syndicate',
            'template',
            'tags',
            'entity',
            'meta',
            'categories',
        ]

        export_id = run_export_task('pages', 'page', fields)
        return redirect('export.status', export_id)

    return render_to_response(template_name, {
    }, context_instance=RequestContext(request))
开发者ID:BillTheBest,项目名称:tendenci,代码行数:28,代码来源:views.py


示例3: export

def export(request, template_name="pages/export.html"):
    """Export Pages"""
    if not request.user.is_superuser:
        raise Http403

    if request.method == "POST":

        fields = [
            "guid",
            "title",
            "slug",
            "header_image",
            "content",
            "view_contact_form",
            "design_notes",
            "syndicate",
            "template",
            "tags",
            "entity",
            "meta",
            "categories",
        ]

        export_id = run_export_task("pages", "page", fields)
        return redirect("export.status", export_id)

    return render_to_response(template_name, {}, context_instance=RequestContext(request))
开发者ID:simonqiang,项目名称:tendenci,代码行数:27,代码来源:views.py


示例4: export

def export(request, template_name="locations/export.html"):
    """Export Locations"""

    if not request.user.is_superuser:
        raise Http403

    if request.method == 'POST':
        # initilize initial values
        fields = [
            'guid',
            'location_name',
            'description',
            'contact',
            'address',
            'address2',
            'city',
            'state',
            'zipcode',
            'country',
            'phone',
            'fax',
            'email',
            'website',
            'latitude',
            'longitude',
            'hq',
            'entity',
        ]

        export_id = run_export_task('locations', 'location', fields)
        EventLog.objects.log()
        return redirect('export.status', export_id)

    return render_to_response(template_name, {
    }, context_instance=RequestContext(request))
开发者ID:warhotdog,项目名称:tendenci,代码行数:35,代码来源:views.py


示例5: export

def export(request, template_name="help_files/export.html"):
    """Export Help Files"""
    
    if not request.user.is_superuser:
        raise Http403
    
    if request.method == 'POST':
        # initilize initial values
        file_name = "help_files.csv"
        fields = [
            'slug',
            'topics',
            'question',
            'answer',
            'level',
            'is_faq',
            'is_featured',
            'is_video',
            'syndicate',
            'view_totals',
        ]
        export_id = run_export_task('help_files', 'helpfile', fields)
        EventLog.objects.log()
        return redirect('export.status', export_id)
        
    return render_to_response(template_name, {
    }, context_instance=RequestContext(request))
开发者ID:DeepInTheCode,项目名称:tendenci,代码行数:27,代码来源:views.py


示例6: export

def export(request, template_name="resumes/export.html"):
    """Export Resumes"""
    
    if not request.user.is_superuser:
        raise Http403
    
    if request.method == 'POST':
        # initilize initial values
        file_name = "resumes.csv"
        fields = [
            'guid',
            'title',
            'slug',
            'description',
            'location',
            'skills',
            'experience',
            'education',
            'is_agency',
            'list_type',
            'requested_duration',
            'activation_dt',
            'expiration_dt',
            'resume_url',
            'syndicate',
            'contact_name',
            'contact_address',
            'contact_address2',
            'contact_city',
            'contact_state',
            'contact_zip_code',
            'contact_country',
            'contact_phone',
            'contact_phone2',
            'contact_fax',
            'contact_email',
            'contact_website',
            'allow_anonymous_view',
            'allow_user_view',
            'allow_member_view',
            'allow_user_edit',
            'allow_member_edit',
            'create_dt',
            'update_dt',
            'creator',
            'creator_username',
            'owner',
            'owner_username',
            'status',
            'status_detail',
            'meta',
            'tags',
        ]
        export_id = run_export_task('resumes', 'resume', fields)
        return redirect('export.status', export_id)
        
    return render_to_response(template_name, {
    }, context_instance=RequestContext(request))
开发者ID:repos-python,项目名称:tendenci,代码行数:58,代码来源:views.py


示例7: export

def export(request, template_name="resumes/export.html"):
    """Export Resumes"""

    if not request.user.is_superuser:
        raise Http403

    if request.method == "POST":
        # initilize initial values
        file_name = "resumes.csv"
        fields = [
            "guid",
            "title",
            "slug",
            "description",
            "location",
            "skills",
            "experience",
            "education",
            "is_agency",
            "list_type",
            "requested_duration",
            "activation_dt",
            "expiration_dt",
            "resume_url",
            "syndicate",
            "contact_name",
            "contact_address",
            "contact_address2",
            "contact_city",
            "contact_state",
            "contact_zip_code",
            "contact_country",
            "contact_phone",
            "contact_phone2",
            "contact_fax",
            "contact_email",
            "contact_website",
            "allow_anonymous_view",
            "allow_user_view",
            "allow_member_view",
            "allow_anonymous_edit",
            "allow_user_edit",
            "allow_member_edit",
            "create_dt",
            "update_dt",
            "creator",
            "creator_username",
            "owner",
            "owner_username",
            "status",
            "status_detail",
            "meta",
            "tags",
        ]
        export_id = run_export_task("resumes", "resume", fields)
        return redirect("export.status", export_id)

    return render_to_response(template_name, {}, context_instance=RequestContext(request))
开发者ID:eloyz,项目名称:tendenci,代码行数:58,代码来源:views.py


示例8: export

def export(request, template_name="directories/export.html"):
    """Export Directories"""

    if not request.user.is_superuser:
        raise Http403

    if request.method == 'POST':
        # initilize initial values
        file_name = "directories.csv"
        fields = [
            'guid',
            'slug',
            'timezone',
            'headline',
            'summary',
            'body',
            'source',
            'logo',
            'first_name',
            'last_name',
            'address',
            'address2',
            'city',
            'state',
            'zip_code',
            'country',
            'phone',
            'phone2',
            'fax',
            'email',
            'email2',
            'website',
            'list_type',
            'requested_duration',
            'pricing',
            'activation_dt',
            'expiration_dt',
            'invoice',
            'payment_method',
            'syndicate',
            'design_notes',
            'admin_notes',
            'tags',
            'enclosure_url',
            'enclosure_type',
            'enclosure_length',
            'entity',
        ]
        export_id = run_export_task('directories', 'directory', fields)
        EventLog.objects.log()
        return redirect('export.status', export_id)
        
    return render_to_response(template_name, {
    }, context_instance=RequestContext(request))
开发者ID:guyt101z,项目名称:tendenci,代码行数:54,代码来源:views.py


示例9: export

def export(request, template_name="forms/export.html"):
    """Export forms"""
    if not request.user.is_superuser:
        raise Http403

    if request.method == "POST":
        export_id = run_export_task("forms_builder.forms", "form", [])
        EventLog.objects.log()
        return redirect("export.status", export_id)

    return render_to_response(template_name, {}, context_instance=RequestContext(request))
开发者ID:bleven,项目名称:tendenci,代码行数:11,代码来源:views.py


示例10: export

def export(request, template_name="directories/export.html"):
    """Export Directories"""

    if not request.user.is_superuser:
        raise Http403

    if request.method == "POST":
        # initilize initial values
        file_name = "directories.csv"
        fields = [
            "guid",
            "slug",
            "timezone",
            "headline",
            "summary",
            "body",
            "source",
            "logo",
            "first_name",
            "last_name",
            "address",
            "address2",
            "city",
            "state",
            "zip_code",
            "country",
            "phone",
            "phone2",
            "fax",
            "email",
            "email2",
            "website",
            "list_type",
            "requested_duration",
            "pricing",
            "activation_dt",
            "expiration_dt",
            "invoice",
            "payment_method",
            "syndicate",
            "design_notes",
            "admin_notes",
            "tags",
            "enclosure_url",
            "enclosure_type",
            "enclosure_length",
            "entity",
        ]
        export_id = run_export_task("directories", "directory", fields)
        EventLog.objects.log()
        return redirect("export.status", export_id)

    return render_to_response(template_name, {}, context_instance=RequestContext(request))
开发者ID:bleven,项目名称:tendenci,代码行数:53,代码来源:views.py


示例11: export

def export(request, template_name="boxes/export.html"):
    """Export Boxes"""

    if not request.user.is_superuser:
        raise Http403

    if request.method == "POST":
        # initilize initial values
        fields = ["title", "content", "tags"]
        export_id = run_export_task("boxes", "box", fields)
        return redirect("export.status", export_id)

    return render_to_response(template_name, {}, context_instance=RequestContext(request))
开发者ID:kaisatec,项目名称:tendenci,代码行数:13,代码来源:views.py


示例12: export

def export(request, template_name="navs/export.html"):
    """Export Navs"""
    if not request.user.is_superuser:
        raise Http403

    if request.method == 'POST':
        export_id = run_export_task('navs', 'nav', [])

        EventLog.objects.log()

        return redirect('export.status', export_id)

    return render_to_response(template_name, {
    }, context_instance=RequestContext(request))
开发者ID:Spacepoints,项目名称:tendenci,代码行数:14,代码来源:views.py


示例13: membership_export

def membership_export(request):
    template_name = 'memberships/export.html'
    form = ExportForm(request.POST or None, user=request.user)

    if request.method == 'POST':
        if form.is_valid():
            # reset the password_promt session
            request.session['password_promt'] = False
            app = form.cleaned_data['app']
            export_id = run_export_task('memberships', 'membership', [], app)
            return redirect('export.status', export_id)

    return render_to_response(template_name, {
            'form': form
            }, context_instance=RequestContext(request))
开发者ID:repos-python,项目名称:tendenci,代码行数:15,代码来源:views.py


示例14: export

def export(request, template_name="profiles/export.html"):
    """Create a csv file for all the users
    """

    if not request.user.profile.is_staff:
        raise Http404

    form = ExportForm(request.POST or None, user=request.user)

    if request.method == "POST":
        if form.is_valid():
            export_id = run_export_task("profiles", "profile", [])
            return redirect("export.status", export_id)

    return render_to_response(
        template_name, {"form": form, "user_this": None}, context_instance=RequestContext(request)
    )
开发者ID:kunthar,项目名称:tendenci,代码行数:17,代码来源:views.py


示例15: export

def export(request, template_name="redirects/export.html"):
    """Export redirects"""
    
    if not request.user.is_superuser:
        raise Http403
    
    if request.method == 'POST':
        # initilize initial values
        file_name = "redirects.csv"
        fields = [
            'from_url',
            'to_url',
            'http_status',
            'status',
            'uses_regex',
            'create_dt',
            'update_dt',
        ]
        export_id = run_export_task('redirects', 'redirect', fields)
        return redirect('export.status', export_id)
        
    return render_to_response(template_name, {
    }, context_instance=RequestContext(request))
开发者ID:DeepInTheCode,项目名称:tendenci,代码行数:23,代码来源:views.py


示例16: export

def export(request, template_name="news/export.html"):
    """Export News"""

    if not request.user.is_superuser:
        raise Http403

    if request.method == "POST":
        fields = [
            "guid",
            "timezone",
            "slug",
            "headline",
            "summary",
            "body",
            "source",
            "first_name",
            "last_name",
            "phone",
            "fax",
            "email",
            "website",
            "release_dt",
            "syndicate",
            "design_notes",
            "enclosure_url",
            "enclosure_type",
            "enclosure_length",
            "use_auto_timestamp",
            "tags",
            "entity",
            "categories",
        ]
        EventLog.objects.log()
        export_id = run_export_task("news", "news", fields)
        return redirect("export.status", export_id)

    return render_to_response(template_name, {}, context_instance=RequestContext(request))
开发者ID:githubber,项目名称:tendenci,代码行数:37,代码来源:views.py



注:本文中的tendenci.core.exports.utils.run_export_task函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.get_notice_recipients函数代码示例发布时间:2022-05-27
下一篇:
Python template_tags.parse_tag_kwargs函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap