class TYFilter(django_filters.FilterSet):
class Meta:
model = Technical_Y
fields = ['number_ty', 'date_ty', 'fullname']
def generalTY(request, number_z=None):
ty = Technical_Y.objects.filter(group=request_group)
filtered_ty = TYFilter(request.GET, queryset=Technical_Y.objects.all())
return render(request, 'ty.html', {'filtered_ty': filtered_ty, 'ty':ty})