This may not be relevant, but you just need to ask,
IF the object is passed from the views to the template, and in the template I can request many different fields
Model Code:
class Info(models.Model): xls_answer = models.TextField(null=True,blank=True) class Upload(models.Model): access = models.IntegerField() info = models.ManyToManyField(Info) time = models.CharField(max_length=8, null=True,blank=True) error_flag = models.IntegerField() def __unicode__(self): return self.access
Views:
// obj_Arr contains all the objects of upload for objs in obj_Arr: logging.debug(objs.access) logging.debug(objs.time) return render_to_response('upload/new_index.html', {'obj_arr': obj_Arr , 'load_flag' : 2})
In the template, you can decode the many to many field, as we pass the object
Thanks..
python django django-models django-templates django-views
Hulk
source share