You know what I am trying to solve this for about 2 days. Thank you so
much it worked :) All my respects to your brain :)

On 26 Mart, 20:04, Karen Tracey <kmtra...@gmail.com> wrote:
> On Fri, Mar 26, 2010 at 8:00 PM, Asim Yuksel <a.sinanyuk...@gmail.com>wrote:
>
> > I've tried this.
> > The model is
>
> > class Advisors(models.Model):
> >     advisorid = models.IntegerField(primary_key=True,
> > db_column='advisorId') # Field name made lowercase.
> >    maphdid = models.ForeignKey(Tblmaphds, db_column='maPhDId') #
> > Field name made lowercase.
> >    rank = models.SmallIntegerField()
> >    def __unicode__(self):
> >        return self.maphdid
> >    class Meta:
> >        db_table = u'Advisors'
>
> You are showing a __unicode__ method for the Advisors model. A ForeignKey
> field where the related model is a Tblmaphds will use the __unicode__ method
> of the Tblmaphds model to display the value of the related field. You need
> to add a __unicode__ method to the Tblmaphds model.
>
> Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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