def export_data(request): now = datetime.utcnow() timestamp = now.strftime('%Y-%m-%d_%H-%M-%SZ') return excel.make_response_from_tables( [Team, Assessment, Measurement, Tag, Template, Attribute, Rating], 'xls', file_name=('measure_mate_export_%s' % timestamp))
def export_data(request, atype, queryset, fields): if atype == "sheet": return excel.make_response_from_a_table(ScoreSheet, 'xls', file_name="sheet") elif atype == "book": return excel.make_response_from_tables([ScoreSheet], 'xls', file_name="book") elif atype == "custom": return excel.make_response_from_query_sets(queryset, fields, 'xls', file_name='custom') else: return HttpResponseBadRequest("bad request, choose one")
def export_data(request, atype): if atype == "sheet": return excel.make_response_from_a_table(Question, 'xls') elif atype == "book": return excel.make_response_from_tables([Question, Choice], 'xls') elif atype == "custom": question = Question.objects.get(slug='ide') query_sets = Choice.objects.filter(question=question) column_names = ['choice_text', 'id', 'votes'] return excel.make_response_from_query_sets(query_sets, column_names, 'xls')
def download_studies(request): """ View for an administrator to make a database dump into an excell sheet. Each table will be emptied to a page inside the excell document. """ return excel.make_response_from_tables( [ Transaccion, Ingreso, Oficio, Periodo, Integrante, Familia, Comentario, Alumno, Tutor, Estudio, Seccion, Subseccion, Pregunta, OpcionRespuesta, Respuesta, Retroalimentacion, Beca, Escuela, Colegiatura ], 'xls', file_name="JP2_ESTUDIOS_SOCIOECONOMICOS")
def export_data(request, atype): if atype == "sheet": return excel.make_response_from_a_table( Question, 'xls', file_name="sheet") elif atype == "book": return excel.make_response_from_tables( [Question, Choice], 'xls', file_name="book") elif atype == "custom": question = Question.objects.get(slug='ide') query_sets = Choice.objects.filter(question=question) column_names = ['choice_text', 'id', 'votes'] return excel.make_response_from_query_sets( query_sets, column_names, 'xls', file_name="custom" ) else: return HttpResponseBadRequest("Bad request. please put one of these in your url suffix: sheet, book or custom")
def export_data(request, atype): if atype == "sheet": return excel.make_response_from_a_table(Item, 'xls', file_name="sheet") elif atype == "book": return excel.make_response_from_tables([Question, Choice], 'xls', file_name="book") elif atype == "custom": question = Question.objects.get(slug='ide') query_sets = Choice.objects.filter(question=question) column_names = ['choice_text', 'id', 'votes'] return excel.make_response_from_query_sets(query_sets, column_names, 'xls', file_name="custom") else: return HttpResponseBadRequest( "Bad request. please put one of these " + "in your url suffix: sheet, book or custom")
def export_sheet(request, atype): if atype == "sheet": return excel.make_response_from_a_table(Location, 'xls', status=200, file_name="Locations") elif atype == "book": return excel.make_response_from_tables([Location], 'xls', file_name="Locations") elif atype == "custom": query_sets = Location.objects.all() column_names = ['location_name', 'common_name', 'location_type'] return excel.make_response_from_query_sets(query_sets, column_names, 'xls', file_name="Locations") else: return HttpResponseBadRequest( "Bad request. please put one of these " + "in your url suffix: sheet, book or custom")
def download(request): return excel.make_response_from_tables([Source], 'xls')
def handson_table(request): return excel.make_response_from_tables([Question, Choice], 'handsontable.html')
def handson_table_accounting(request): return excel.make_response_from_tables([Accounting], 'handsontable.html')
def export_data(request): now = datetime.utcnow() timestamp = now.strftime('%Y-%m-%d_%H-%M-%SZ') return excel.make_response_from_tables( [Team, Assessment, Measurement, Tag, Template, Attribute, Rating], 'xls', file_name=('measure_mate_export_%s' % timestamp))
def handson_table(request): return excel.make_response_from_tables(Subscriber, 'excel/handsontable.html')
def export_data(request): return excel.make_response_from_tables( [DepartmentColombia, CitiesColombia], 'xls', file_name="colombia")
def download(request): return excel.make_response_from_tables([Source], 'xls')
def handson_table(request): return excel.make_response_from_tables( [Sheet1], 'handsontable.html')