On Tue, Mar 17, 2009 at 5:27 PM, AKK <andrewkenyon...@gmail.com> wrote:
> > Hi, > > I've got the django adming setup but if i look at posts for example i > just get a with post object loads of times. How can i it so it > displays the post title? > > In my admin.py i have: > > admin.site.register(Post) > > and the model is: > > post_title = models.CharField(max_length=750) > ......... > post_tags = models.ManyToManyField(Tag) > > def _str_(self): > return self.post_title > > if i had to guess i imangine this would be sommet to do with def_str_ > > thanks, > > Andrew > > > You have def _str_ it should be __str__(2 underscores before and after), also if you're on 1.0 you should probably be using __unicode__ instead). Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---