Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class NacimientosView(ListView):
- """Vista partidas de nacimientos pero filtrados desde un formulario"""
- # queryset = PartidaNacimiento.objects.filter(folio=457).filter(ano=1980)
- model = PartidaNacimiento
- template_name = 'rcivil/nacimientos_listado.html'
- paginate_by = 10
- ordering = 'ano'
- def get_queryset(self):
- CAMPOS = [
- 'tomo': {'lookup': 'exact', 'cast': int},
- 'folio': {'lookup': 'icontains', 'cast': str},
- ]
- if self.request.method == 'GET':
- qs = super().get_queryset()
- logging.debug(qs)
- return qs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement