Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Pagina principal: buscador de pacientes #9

Open
mgaitan opened this issue Oct 30, 2016 · 1 comment
Open

Pagina principal: buscador de pacientes #9

mgaitan opened this issue Oct 30, 2016 · 1 comment

Comments

@mgaitan
Copy link
Member

mgaitan commented Oct 30, 2016

la pagina principal (en url "/") debe ser un buscador de pacientes. La vista es análoga a cualquier vista de procesamiento de formulario, donde se envia un formular

ejemplo

def buscador(request):
      pacientes = []    # por defecto no se muestra ningun resultado)
      form = BuscadorForm()
      if request.method == 'POST': 
             form = BuscadorForm(request.POST)
             if form.is_valid():
                    pacientes = Paciente.objects.filter(apellido__icontains=form.cleaned_data['busqueda'])
      return render(request, 'buscador.html', {'form': form, 'pacientes': pacientes})

El buscador debe encontrar pacientes que coincidan por apellido, dni o id.

@mgaitan
Copy link
Member Author

mgaitan commented Nov 1, 2016

en el proyecto de estrellas amarillas hay un issue casi igual, pueden ayudarse entre los dos grupos

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant