#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), )
for group in groups: obj = [group.id, group.name_cn] res.append(obj) else: return HttpResponseNotFound(u'错误请求') else: return HttpResponseNotFound(u'错误请求') result = simplejson.dumps(res) 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'),
#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), )
#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), )
@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+)/',
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'), )