本文整理汇总了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;未经允许,请勿转载。 |
请发表评论