def ManageFeeRegisterPrintView(PrintView): Voucher = [] if PrintView.method == 'POST': InComing = PrintView.POST Clas = InComing.get('class') Sect = InComing.get('sect') Month = InComing.get('month') gr = get_list_or_404(Gr, section=Sect, current_class=Clas) for i in gr: Voucher.append( get_list_or_404(FeeRegister, gr_number=i.gr_number, month=Month)) context = { 'voucher': Voucher, } pdf = PdfMaker('FeesRegister/Print/print.html', context) return HttpResponse(pdf, content_type='application/pdf') # return render(PrintView,'FeesRegister/Print/print.html',context) else: classes = Class.objects.all() sec = Section.objects.all() context = { 'class': classes, 'section': sec, } return render(PrintView, 'FeesRegister/Print/ask.html', context)
def ManageQuestionPrintPdfView(PrintView): Quest = Question_Bank.objects.all() context = { 'abc': Quest, } pdf = PdfMaker('Question_Bank/Question_Bank/print.html', context) return HttpResponse(pdf, content_type='application/pdf')
def ManagePublisherPrintPdfView(PrintView): publi = Publisher.objects.all() context = { 'abc': publi, } pdf = PdfMaker('Question_Bank/Publishers/print.html', context) return HttpResponse(pdf, content_type='application/pdf')
def ManageChapterPrintPdfView(PrintView): chp = Chapter.objects.all() context = { 'abc': chp, } pdf = PdfMaker('Question_Bank/Chapters/print.html', context) return HttpResponse(pdf, content_type='application/pdf')
def ManageFamilyPrintPdfView(PrintView): fami = Family.objects.all() context = { 'abc': fami, } pdf = PdfMaker('Dependencies/Family/print.html', context) return HttpResponse(pdf, content_type='application/pdf')
def markprint(request): data = [] if request.method == 'POST': rawdata = request.POST gr_ = rawdata.getlist('gr', default='1') class_ = rawdata.getlist('class', default='1') subject_ = rawdata.getlist('subject', default='1') exam_ = rawdata.getlist('exam', default='1') semister_ = rawdata.getlist('semister', default='1') breakup_ = rawdata.getlist('breakup', default='1') quarter_ = rawdata.getlist('quarter', default='1') assesment_ = rawdata.getlist('assesment', default='1') count = '0' for i in gr_: count = int(count) + 1 gr__ = gr_[int(count) - 1] class__ = class_[int(count) - 1] subject__ = subject_[int(count) - 1] exam__ = exam_[int(count) - 1] semister__ = semister_[int(count) - 1] breakup__ = breakup_[int(count) - 1] quarter__ = quarter_[int(count) - 1] assesment__ = assesment_[int(count) - 1] abc = (gr__, class__, subject__, exam__, semister__, breakup__, quarter__, assesment__) data.append(abc) context = { 'data': data, } pdf = PdfMaker("mark/mark_print.html", context) return HttpResponse(pdf, content_type='application/pdf')
def query_print(request): data = [] if request.method == 'POST': rawdata = request.POST Code_ = rawdata.getlist('Code' , default='1') for i in Code_: data.append(get_object_or_404(Entry_data , Query_code = i)) context = { 'data' : data , } pdf = PdfMaker("query/query_print.html",context) return HttpResponse(pdf , content_type='application/pdf')
def ManageGrPrintPdfView(PrintView, clas, sect): if PrintView.method == 'POST': Class_ = get_object_or_404(Class, class_name=clas) Sect = get_object_or_404(Section, sect_name=sect) lis = get_list_or_404(Gr, current_class=Class_.class_code, section=Sect.sect_code) context = { 'abc': lis, 'one': clas, 'two': sect, } pdf = PdfMaker('Student/Print/print.html', context) return HttpResponse(pdf, content_type='application/pdf')
def attendance_print(request): if request.method == 'POST': rawdata = request.POST InClass = rawdata.get('class') OutClass = get_object_or_404(Class , class_code = InClass ) InSection = rawdata.get('section') OutSection = get_object_or_404(Section , sect_code = InSection ) InDate = rawdata.get('date') lis = get_list_or_404(SaveAttendence , classes = InClass , sections = InSection , date = InDate) context = { 'InClass' : OutClass , 'InSection' : OutSection , 'InDate' : InDate , 'abc' : lis , } pdf = PdfMaker('attendence_print.html', context) return HttpResponse(pdf, content_type='application/pdf')
def ManageBookPrintPdfView(PrintView, clas, subj, publ): if PrintView.method == 'POST': Class_ = get_object_or_404(Class, class_name=clas) Sub = get_object_or_404(Subject, subjects=subj) publi = get_object_or_404(Publisher, publisher_name=publ) lis = get_list_or_404(Book, classes=Class_.class_code, subject=Sub.subject_code, publisher=publi.publisher_code) context = { 'abc': lis, 'one': clas, 'two': subj, 'three': publ, } pdf = PdfMaker('Question_Bank/Books/print.html', context) return HttpResponse(pdf, content_type='application/pdf')