def pagos_list(request): ''' Todos los pagos realizados. ''' pagos = Pago.objects.order_by('-fecha') query = 'q' MODEL_MAP = { Paciente: ['nombre', 'apellidoPaterno', 'apellidoMaterno', 'credencialPaciente'], } objects = [] for model, fields in MODEL_MAP.iteritems(): objects += generic_search(request, model, fields, query) paginator, page_obj, object_list, is_paginated = paginate_objects( request, objects, 20) return render( request, 'pago-list.html', { 'pagos': pagos, 'objects': object_list, 'page_obj': page_obj, 'paginator': paginator, 'is_paginated': is_paginated, 'search_string': request.GET.get(query, ''), 'r_active': 'active' })
def paciente_search(request): ''' Aqui empieza el flujo de clinica. Busqueda de paciente por nombre o DNI. ''' query = 'q' MODEL_MAP = { Paciente: ['nombre', 'apellidoPaterno', 'apellidoMaterno', 'credencialPaciente'], } objects = [] for model, fields in MODEL_MAP.iteritems(): objects += generic_search(request, model, fields, query) paginator, page_obj, object_list, is_paginated = paginate_objects( request, objects, 20) return render( request, 'paciente-search.html', { 'objects': object_list, 'page_obj': page_obj, 'paginator': paginator, 'is_paginated': is_paginated, 'search_string': request.GET.get(query, '') })
def paciente_search(request): ''' Lista de pacientes con pagos pendientes. ''' query = 'q' MODEL_MAP = { Paciente: ['nombre', 'apellidoPaterno', 'apellidoMaterno', 'credencialPaciente'], } objects = [] for model, fields in MODEL_MAP.iteritems(): objects += generic_search(request, model, fields, query) paginator, page_obj, object_list, is_paginated = paginate_objects( request, objects, 20) return render( request, 'pago-paciente-search.html', { 'objects': object_list, 'page_obj': page_obj, 'paginator': paginator, 'is_paginated': is_paginated, 'search_string': request.GET.get(query, ''), 'rp_active': 'active' })
def paciente_search(request): ''' Aqui empieza el flujo de clinica. Busqueda de paciente por nombre o DNI. ''' query = 'q' MODEL_MAP = { Paciente: [ 'nombre', 'apellidoPaterno', 'apellidoMaterno', 'credencialPaciente' ], } objects = [] for model, fields in MODEL_MAP.iteritems(): objects += generic_search(request, model, fields, query) paginator, page_obj, object_list, is_paginated = paginate_objects( request, objects, 20) return render(request, 'paciente-search.html', { 'objects': object_list, 'page_obj': page_obj, 'paginator': paginator, 'is_paginated': is_paginated, 'search_string': request.GET.get(query, '') })
def pagos_list(request): ''' Todos los pagos realizados. ''' pagos = Pago.objects.order_by('-fecha') query = 'q' MODEL_MAP = { Paciente: [ 'nombre', 'apellidoPaterno', 'apellidoMaterno', 'credencialPaciente' ], } objects = [] for model, fields in MODEL_MAP.iteritems(): objects += generic_search(request, model, fields, query) paginator, page_obj, object_list, is_paginated = paginate_objects( request, objects, 20) return render(request, 'pago-list.html', { 'pagos': pagos, 'objects': object_list, 'page_obj': page_obj, 'paginator': paginator, 'is_paginated': is_paginated, 'search_string': request.GET.get(query, ''), 'r_active': 'active' })
def paciente_search(request): ''' Lista de pacientes con pagos pendientes. ''' query = 'q' MODEL_MAP = { Paciente: [ 'nombre', 'apellidoPaterno', 'apellidoMaterno', 'credencialPaciente' ], } objects = [] for model, fields in MODEL_MAP.iteritems(): objects += generic_search(request, model, fields, query) paginator, page_obj, object_list, is_paginated = paginate_objects( request, objects, 20) return render(request, 'pago-paciente-search.html', { 'objects': object_list, 'page_obj': page_obj, 'paginator': paginator, 'is_paginated': is_paginated, 'search_string': request.GET.get(query, ''), 'rp_active': 'active' })
def busqueda(request): query = 'q' MODEL_MAP = { Producto: ['nombre', 'porciones'], } objects = [] for model, fields in MODEL_MAP.iteritems(): objects += generic_search(request, model, fields, query) paginator, page_obj, object_list, is_paginated = paginate_objects( request, objects, 20) return render(request, 'producto-search.html', { 'objects': object_list, 'page_obj': page_obj, 'paginator': paginator, 'is_paginated': is_paginated, 'search_string': request.GET.get(query, ''), 's_active': 'active' })
def busqueda(request): query = 'q' MODEL_MAP = { Producto: ['nombre', 'porciones'], } objects = [] for model, fields in MODEL_MAP.iteritems(): objects += generic_search(request, model, fields, query) paginator, page_obj, object_list, is_paginated = paginate_objects( request, objects, 20) return render( request, 'producto-search.html', { 'objects': object_list, 'page_obj': page_obj, 'paginator': paginator, 'is_paginated': is_paginated, 'search_string': request.GET.get(query, ''), 's_active': 'active' })