def edit_extended_bill(request, resource_type_id):
#start_time = time.time()
rt = get_object_or_404(EconomicResourceType, pk=resource_type_id)
output_ctype, inheritance = rt.main_producing_process_type_relationship()
#import pdb; pdb.set_trace()
nodes = rt.generate_xbill()
resource_type_form = EconomicResourceTypeChangeForm(instance=rt)
feature_form = FeatureForm()
names = EconomicResourceType.objects.values_list('name', flat=True)
resource_names = '~'.join(names)
#end_time = time.time()
#print("edit_extended_bill view elapsed time was %g seconds" % (end_time - start_time))
return render_to_response("valueaccounting/edit_xbill.html", {
"resource_type": rt,
"output_ctype": output_ctype,
"nodes": nodes,
"photo_size": (128, 128),
"big_photo_size": (200, 200),
"resource_type_form": resource_type_form,
"feature_form": feature_form,
"resource_names": resource_names,
"help": get_help("ed_asmbly_recipe"),
}, context_instance=RequestContext(request))
评论列表
文章目录