Hello,  don't know to how configure views.py and urls.py in myapp. for 
filter a list between dates from an input date in a template.

This is my models.py:

class Paciente(models.Model):
   tipo_doc = models.ForeignKey(Tipo_doc)
   num_doc = models.CharField(max_length=20, primary_key=True)
   ...
class Consulta (models.Model):
   numero = models.ForeignKey(Paciente)
   fecha = models.DateField()
   ...      

This is my file "lista.html" in templates:

<h5>
  Fecha desde: <input class="inputDate" id="fechadesde" value={{ fecha_d }} />
  Fecha hasta: <input class="inputDate" id="fechahasta" value={{ fecha_h }} />
  <a href="/clinica/filtrar_consulta" class="button">Filtrar</a></h5>
<ul class="actions">
 ...             

I need to filter the list by paciente and between 2 dates (fecha_d, fecha_h), 
but I don't know how to pass parameters in url. Thank You

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/676db00a-8a99-461b-b811-dc96b50ca5e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to