Questions tagged as 'django-filter'

1
answer

Filter with ChoiceField (Django)

Consider my form: forms.py status_list = ( ('', ''), ('c', 'cancelado'), ('elab', 'em elaboração'), ('p', 'pendente'), ('co', 'concluido'), ('a', 'aprovado') ) class StatusSearchForm(forms.Form): status = forms....
asked by 25.07.2015 / 06:46
1
answer

Treating search field error with text and integer (Django)

The following code searches for values in the template. But it finds by text, and when I type, for example, 2015 to find by year, it returns an error because the field must be an integer and not a number, how to handle this error so that it find...
asked by 31.07.2015 / 18:57
1
answer

Using search and pagination field with Function Based View in Django

I have the following code: #decorators.py from django.contrib.auth.decorators import user_passes_test def superuser_required(func): return user_passes_test( lambda u: u.is_authenticated() and u.is_superuser)(func) # views.py @su...
asked by 30.06.2016 / 05:36
0
answers

Display relationship field 0x1, object of a filter, in a Django view

I am not able to access a field of a relationship in filter, I am bringing the objects through the context of a DetailView.    View Server class HistoricoProgressoes(DetailView): model = Servidor def get_context_data(self, **kwargs):...
asked by 01.10.2018 / 22:14