In the models there is a many to many fields as,
from emp.models import Name
def info(request):
name = models.ManyToManyField(Name)
And in emp.models the schema is as
class Name(models.Model):
name = models.CharField(max_length=512)
def __unicode__(self):
return self.name
Now when i want to query a particular id say for ex:
info= info.objects.filter(id=a)
for i in info:
logging.debug(i.name) //gives an error
how should the query be to get the name
Thanks..