from django.db import models
class Poll(models.Model):
question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')
def __unicode__(self):
return self.question
class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice = models.CharField(max_length=200)
votes = models.IntegerField()
def __unicode__(self):
return self.choice
after "pythonmanage.py syncdb" it shows "no fixtures found" as if i haven't
even wrote that code...and after all in 127.0.0.1/admin it doesn't show the
the written text it shows only the class name.....spasibo)
On 15 September 2010 16:26, bagheera <[email protected]> wrote:
> Dnia 15-09-2010 o 12:47:55 Hayko <[email protected]> napisaĆ(a):
>
>
> my django version is 1.2.1 but the __unicode__() doesn't seem to
>> work.... what shall i do?
>> thanx a lot...!
>>
>>
> Post code and traceback. We ain't wizards with crystal balls :D
>
> --
> Linux user
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<django-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en.