I recommand used "print [modal]" in the views and see what happend in
the terminal.

PS: you'd better try replace :

       def __str__(self):
            return self.SampleID
with:
        def __unicode__(self):
                return self.SampleID

On May 22, 11:55 pm, Herta <herta...@gmail.com> wrote:
> hi, everyone,
>
> i have a question about model. i define some models, but some will
> return the records, while some only return the counts of the records
> on the web page?
>
> class cancer(models.Model):         # it returns the count of records
>     CancerID = models.CharField(max_length=8)
>     NCIID = models.CharField(max_length=8, null= True,blank=True)
>     OMIMID = models.CharField(max_length=8, null= True,blank=True)
>     Cancer = models.CharField(max_length=45)
>        def __str__(self):
>             return self.CancerID
>
> class psm2protein(models.Model):           #but this one returns
> records
>     SampleID = models.CharField(max_length=8)
>     Protein = models.CharField(max_length=45)
>     Protein_IPI = models.CharField(max_length=12)
>        def __str__(self):
>             return self.SampleID
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to