本文整理汇总了Python中tendenci.core.exports.utils.run_export_task函数的典型用法代码示例。如果您正苦于以下问题:Python run_export_task函数的具体用法?Python run_export_task怎么用?Python run_export_task使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了run_export_task函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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))
示例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)
)
示例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))