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...
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...
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):...