On Sunday, 26.02.06 at 04:36, neomlsra wrote:
> 
> I am working through the tutorial for Django and have had a dickens of
> a time displaying the values that are added through the admin. I have
> included my script below as I am using my own example vs. the Poll
> example to force me to think my way through it vs. just copying code
> examples. I have used a sqlite admin tool and the values are in the
> tables, they are simply not displaying in the admin console.
> 
> Windows XP 2nd Ed. Firefox 1.5, Django .91 Python 2.4
> 
> from django.core import meta
> 
> # Create your models here.
> 
> 
> from django.core import meta
> 
> class Character(meta.Model):
>     character_name = meta.CharField(maxlength=30)
>     character_class = meta.CharField(maxlength=25)
>     class META:
>         admin = meta.Admin()
>     def _repr_(self):
>         return "%s %s" (self.character_name, self.character_class)
> 
> 
> class Skill(meta.Model):
>     character=meta.ForeignKey(Character)
>     Strength = meta.IntegerField()
>     Wisdom = meta.IntegerField()
>     class META:
>         admin = meta.Admin()
>     def _repr_(self):
>         return "%s %s" (self.character, self.Strenth, self.Wisdom)
> 
> 

You might want to define __repr__ not _repr_
-Luis

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to