如何过滤与相应类别中的用户相关的问题?
views.py
questoes = Questao.objects.filter(idCategoria__in=[request.user.usuario.idCategoria])
models.py
class Categoria(models.Model):
idCategoria = models.CharField(primary_key=True)
class Usuario(models.Model):
idCategoria = models.ManyToManyField(Categoria)