#encoding:utf-8 from mcview.decorator import render_to from mcview import pageman from service.core import _term, _document from mc import enums from django.contrib.auth.decorators import login_required @login_required @render_to('index.html') def index(request): current_term = _term.get_cur_term() reports = _document.get_regional_report_document(current_term, enums.AREA_ALL) return locals() url_list = pageman.patterns('NationalReport', '', pageman.MyUrl(None, index, name=None), )
url_list = pageman.patterns( 'DealerReport', '', pageman.MyUrl(None, index, name=None), pageman.MyUrl('dealeranalysis', dealer_analysis, name='dealeranalysis'), pageman.MyUrl('advancedfilter', advanced_filter, name='advancedfilter'), pageman.MyUrl('dealerlogin', dealerLogin, name='dealerlogin'), pageman.MyUrl('dealerfilter', dealer_filter, name='dealerfilter'), pageman.MyUrl('ajaxfilter', ajax_filter, name='ajaxfilter'), pageman.MyUrl('dealerlist', dealer_list, name='dealerlist'), pageman.MyUrl('paperscompare', papers_compare, name='paperscompare'), pageman.MyUrl('downloadreports', downloadreports, name='downloadreports'), pageman.MyUrl('ajaxgetoption', ajax_get_option, name='ajax_get_option'), pageman.MyUrl('advancedsearch/(?P<kind>\w+)/', advanced_search, name='advancedsearch'), pageman.MyUrl('ajaxdealergroupresult', ajax_dealer_group_result, name='ajaxdealergroupresult'), url(r'^DealerReport/HNFTrendReport/(?P<kind>\w+)/(?P<report_id>\d+)/$', history_now_future_group_report, name="DealerReport/HNFTrendReport"), pageman.MyUrl('advancedbrand', advanced_brand, name='advancedbrand'), pageman.MyUrl('ajaxbrandresult', ajax_brand_result, name='ajaxbrandresult'), pageman.MyUrl('itemscompare', items_compare, name='itemscompare'), pageman.MyUrl('allfilter/(?P<kind>\w+)/', all_filter, name='allfilter'), pageman.MyUrl('ajaxallfilter', ajax_all_filter, name='ajaxallfilter'), pageman.MyUrl('otherreportcompare', otherreport_compare, name='otherreportcompare'), url(r'^DealerReport/HNFDealerReport/(?P<report_id>\d+)/$', history_now_future_report, name="DealerReport/HNFDealerReport"), url(r'^DealerReport/DetailDealerReport/(?P<report_id>\d+)/$', report, name="DealerReport/DetailDealerReport"), url(r'^DealerReport/downloadreport/(?P<dealer_id>\d+)/(?P<term_id>\d+)/$', download_report, name="DealerReport/downloadreport"), pageman.MyUrl( 'downloadhistoryreport/(?P<dealer_id>\d+)/(?P<term_id>\d+)/$', download_history_report, name='downloadhistoryreport'), pageman.MyUrl('ajax_gen_compare_excel', ajax_gen_compare_excel, name='ajaxgencompareexcel'), pageman.MyUrl('ajax_gen_other_compare_excel', ajax_gen_other_compare_excel, name='ajaxgenothercompareexcel'))
#encoding:utf-8 from mcview.decorator import render_to from mcview import pageman from service.core import _term, _document from mc import enums from django.contrib.auth.decorators import login_required @login_required @render_to('index.html') def index(request): current_term = _term.get_cur_term() reports = _document.get_regional_report_document(current_term, enums.AREA_ALL) return locals() url_list = pageman.patterns( 'NationalReport', '', pageman.MyUrl(None, index, name=None), )
cp_no_score_list = ['Q4b', 'Q4c', 'Q4d', 'Q4e', 'Q7b', 'Q8b', 'Q9b', 'Q11b', 'Q12b', 'Q12c', 'Q12d', 'Q12e', 'Q12f', 'Q12g', 'Q12h', 'Q12i', 'Q13b', 'Q13c', 'Q13d', 'Q16b', 'Q16c', 'Q16d', 'Q34b', 'Q35b', 'Q35c', 'Q43b', 'Q43c', 'Q44b', 'Q46b'] cp_score_dict = {'Q4a':10, 'Q7a':10, 'Q8a':4, 'Q9a':4, 'Q11a':6, 'Q12a':17, 'Q13a':12, 'Q16a':12, 'Q34a':10, 'Q35a':9, 'Q43a':9, 'Q44a':10, 'Q46a':6} type_id = request.POST.get('type_id') if type_id == '1': qa_list = QuestionQANew.objects.filter(brand='BMW') if type_id == '2': qa_list = QuestionQANew.objects.filter(brand='MINI') if type_id == '3': qa_list = QuestionQANew.objects.filter(brand='BMW_2015') if type_id == '4': qa_list = QuestionQANew.objects.filter(brand='MINI_2015') for qa in qa_list: qa.child_list = QuestionQANew.objects.filter(parent=qa) for cqa in qa.child_list: cqa.qid = 'Q%s' % cqa.number cqa.child_list = QuestionQANew.objects.filter(parent=cqa) cqa.child_length = len(cqa.child_list) cqa.rowspan = cp_score_dict.get(cqa.qid) template_file = "questionqa/contentDiv.html" ret = locals() html = render_to_string(template_file, ret) sdicts['html'] = html return HttpResponse(simplejson.dumps(sdicts, ensure_ascii=False)) url_list = pageman.patterns('QuestionnaireQA', '', pageman.MyUrl(None, questionqa, name=None), pageman.MyUrl('change', questionqa_change, name='questionqa_change'), )
#encoding:utf-8 from django.contrib.auth.decorators import login_required from mcview.decorator import render_to from mcview import pageman from survey.models import QuestionQANew @login_required @render_to('questionqa.html') def questionqabmw(request): qa_list = QuestionQANew.objects.filter(brand='BMW') for qa in qa_list: qa.child_list = QuestionQANew.objects.filter(parent=qa) for cqa in qa.child_list: cqa.child_list = QuestionQANew.objects.filter(parent=cqa) cqa.child_length = len(cqa.child_list) return locals() url_list = pageman.patterns('QuestionnaireQABMW', '', pageman.MyUrl(None, questionqabmw, name=None), )
return project_status.paper_conflict(request) @render_to('paper_conflict_result.html') def ajax_paper_conflict(request): return project_status.ajax_paper_conflict(request) @render_to('paper_conflict_details.html') def paper_conflict_detail(request, paperdiff_id): return project_status.paper_conflict_detail(request, paperdiff_id) @csrf_exempt def ajax_bmw_update_question(request): return project_status.ajax_bmw_update_question(request) url_list = pageman.patterns('ProjectStatus', '', pageman.MyUrl(None, index, name=None), #url(r'^ProjectStatus/$', index,name="ProjectStatus"), pageman.MyUrl('national', national, name='national'), #url(r'^ProjectStatus/$', index,name="ProjectStatus"), pageman.MyUrl('reginal', reginal, name='reginal'), pageman.MyUrl('dealer', dealer, name='dealer'), pageman.MyUrl('mini', mini, name='mini'), pageman.MyUrl('others', others, name='others'), pageman.MyUrl('ajaxdbroute', ajax_db_route, name='ajaxdbroute'), pageman.MyUrl('route', route, name='route'), pageman.MyUrl('ajaxroute', ajax_route, name='ajaxroute'), pageman.MyUrl('paperconflict', paper_conflict, name='paperconflict'), pageman.MyUrl('ajaxpaperconflict', ajax_paper_conflict, name='ajaxpaperconflict'), pageman.MyUrl('paperconflictdetail/(?P<paperdiff_id>\d+)/', paper_conflict_detail, name='paperconflictdetail'), pageman.MyUrl('ajaxbmwupdatequestion', ajax_bmw_update_question, name='ajaxbmwupdatequestion'), )
#encoding:utf-8 from django.contrib.auth.decorators import login_required from mcview.decorator import render_to from mcview import pageman from survey.models import QuestionQANew @login_required @render_to('questionqa.html') def questionqabmw(request): qa_list = QuestionQANew.objects.filter(brand='BMW') for qa in qa_list: qa.child_list = QuestionQANew.objects.filter(parent=qa) for cqa in qa.child_list: cqa.child_list = QuestionQANew.objects.filter(parent=cqa) cqa.child_length = len(cqa.child_list) return locals() url_list = pageman.patterns( 'QuestionnaireQABMW', '', pageman.MyUrl(None, questionqabmw, name=None), )
return HttpResponse(result) url_list = pageman.patterns('DealerReport', '', pageman.MyUrl(None, index, name=None), pageman.MyUrl('dealeranalysis', dealer_analysis, name='dealeranalysis'), pageman.MyUrl('advancedfilter', advanced_filter, name='advancedfilter'), pageman.MyUrl('dealerlogin', dealerLogin, name='dealerlogin'), pageman.MyUrl('dealerfilter', dealer_filter, name='dealerfilter'), pageman.MyUrl('ajaxfilter', ajax_filter, name='ajaxfilter'), pageman.MyUrl('dealerlist', dealer_list, name='dealerlist'), pageman.MyUrl('paperscompare', papers_compare, name='paperscompare'), pageman.MyUrl('downloadreports', downloadreports, name='downloadreports'), pageman.MyUrl('ajaxgetoption', ajax_get_option, name='ajax_get_option'), pageman.MyUrl('advancedsearch/(?P<kind>\w+)/', advanced_search, name='advancedsearch'), pageman.MyUrl('ajaxdealergroupresult', ajax_dealer_group_result, name='ajaxdealergroupresult'), url(r'^DealerReport/HNFTrendReport/(?P<kind>\w+)/(?P<report_id>\d+)/$', history_now_future_group_report, name="DealerReport/HNFTrendReport"), pageman.MyUrl('advancedbrand', advanced_brand, name='advancedbrand'), pageman.MyUrl('ajaxbrandresult', ajax_brand_result, name='ajaxbrandresult'), pageman.MyUrl('itemscompare', items_compare, name='itemscompare'), pageman.MyUrl('allfilter/(?P<kind>\w+)/', all_filter, name='allfilter'), pageman.MyUrl('ajaxallfilter', ajax_all_filter, name='ajaxallfilter'), pageman.MyUrl('otherreportcompare', otherreport_compare, name='otherreportcompare'), url(r'^DealerReport/HNFDealerReport/(?P<report_id>\d+)/$', history_now_future_report, name="DealerReport/HNFDealerReport"), url(r'^DealerReport/DetailDealerReport/(?P<report_id>\d+)/$', report, name="DealerReport/DetailDealerReport"), url(r'^DealerReport/downloadreport/(?P<dealer_id>\d+)/(?P<term_id>\d+)/$', download_report, name="DealerReport/downloadreport"), pageman.MyUrl('downloadhistoryreport/(?P<dealer_id>\d+)/(?P<term_id>\d+)/$', download_history_report, name='downloadhistoryreport'), pageman.MyUrl('ajax_gen_compare_excel', ajax_gen_compare_excel, name='ajaxgencompareexcel'), pageman.MyUrl('ajax_gen_other_compare_excel', ajax_gen_other_compare_excel, name='ajaxgenothercompareexcel') )
#encoding:utf-8 from django.contrib.auth.decorators import login_required from mcview.decorator import render_to from mcview import pageman from survey.models import QuestionQANew @login_required @render_to('questionqa.html') def questionqamini(request): qa_list = QuestionQANew.objects.filter(brand='MINI') for qa in qa_list: qa.child_list = QuestionQANew.objects.filter(parent=qa) for cqa in qa.child_list: cqa.child_list = QuestionQANew.objects.filter(parent=cqa) cqa.child_length = len(cqa.child_list) return locals() url_list = pageman.patterns('QuestionnaireQAMINI', '', pageman.MyUrl(None, questionqamini, name=None), )
#encoding:utf-8 from django.contrib.auth.decorators import login_required from mcview.decorator import render_to from mcview import pageman from survey.models import QuestionQANew @login_required @render_to('questionqa.html') def questionqamini(request): qa_list = QuestionQANew.objects.filter(brand='MINI') for qa in qa_list: qa.child_list = QuestionQANew.objects.filter(parent=qa) for cqa in qa.child_list: cqa.child_list = QuestionQANew.objects.filter(parent=cqa) cqa.child_length = len(cqa.child_list) return locals() url_list = pageman.patterns( 'QuestionnaireQAMINI', '', pageman.MyUrl(None, questionqamini, name=None), )
@csrf_exempt def ajax_bmw_update_question(request): return project_status.ajax_bmw_update_question(request) url_list = pageman.patterns( 'ProjectStatus', '', pageman.MyUrl(None, index, name=None), #url(r'^ProjectStatus/$', index,name="ProjectStatus"), pageman.MyUrl('national', national, name='national'), #url(r'^ProjectStatus/$', index,name="ProjectStatus"), pageman.MyUrl('reginal', reginal, name='reginal'), pageman.MyUrl('dealer', dealer, name='dealer'), pageman.MyUrl('mini', mini, name='mini'), pageman.MyUrl('others', others, name='others'), pageman.MyUrl('ajaxdbroute', ajax_db_route, name='ajaxdbroute'), pageman.MyUrl('route', route, name='route'), pageman.MyUrl('ajaxroute', ajax_route, name='ajaxroute'), pageman.MyUrl('paperconflict', paper_conflict, name='paperconflict'), pageman.MyUrl('ajaxpaperconflict', ajax_paper_conflict, name='ajaxpaperconflict'), pageman.MyUrl('paperconflictdetail/(?P<paperdiff_id>\d+)/', paper_conflict_detail, name='paperconflictdetail'), pageman.MyUrl('ajaxbmwupdatequestion', ajax_bmw_update_question, name='ajaxbmwupdatequestion'), )
type_id = request.POST.get('type_id') if type_id == '1': qa_list = QuestionQANew.objects.filter(brand='BMW') if type_id == '2': qa_list = QuestionQANew.objects.filter(brand='MINI') if type_id == '3': qa_list = QuestionQANew.objects.filter(brand='BMW_2015') if type_id == '4': qa_list = QuestionQANew.objects.filter(brand='MINI_2015') for qa in qa_list: qa.child_list = QuestionQANew.objects.filter(parent=qa) for cqa in qa.child_list: cqa.qid = 'Q%s' % cqa.number cqa.child_list = QuestionQANew.objects.filter(parent=cqa) cqa.child_length = len(cqa.child_list) cqa.rowspan = cp_score_dict.get(cqa.qid) template_file = "questionqa/contentDiv.html" ret = locals() html = render_to_string(template_file, ret) sdicts['html'] = html return HttpResponse(simplejson.dumps(sdicts, ensure_ascii=False)) url_list = pageman.patterns( 'QuestionnaireQA', '', pageman.MyUrl(None, questionqa, name=None), pageman.MyUrl('change', questionqa_change, name='questionqa_change'), )
#encoding:utf-8 from mcview.decorator import render_to from mcview import pageman @render_to('index.html') def index(request): return locals() url_list = pageman.patterns( 'ProjectOverview', '', pageman.MyUrl(None, index, name=None), )
#encoding:utf-8 from mcview.decorator import render_to from mcview import pageman @render_to('index.html') def index(request): return locals() url_list = pageman.patterns('ProjectOverview', '', pageman.MyUrl(None, index, name=None), )