RE: noob problem with Unicode

2007-07-29 Thread Donald Spears

Yep that did it, gesh, I feel dumb :P

Thanks,
Paul

-Original Message-
From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Parnell Springmeyer
Sent: Sunday, July 29, 2007 12:41 PM
To: django-users@googlegroups.com
Subject: Re: noob problem with Unicode


Make sure you are using the correct version, the documentation link
defaults to the repository code; you have to follow the 0.96 version
documentation link on the top.




--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: noob problem with Unicode

2007-07-29 Thread Parnell Springmeyer

Make sure you are using the correct version, the documentation link
defaults to the repository code; you have to follow the 0.96 version
documentation link on the top.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



noob problem with Unicode

2007-07-29 Thread dpsthree


I was following the tutorial 
(http://www.djangoproject.com/documentation/tutorial01/)  and can't get the
__unicode__ function to return properly.

I have the following in my models.py

from django.db import models
import datetime

class Poll(models.Model):
question = models.CharField(maxlength=200)
pub_date = models.DateTimeField('date published')

def __unicode__(self):
return self.question

def was_published_today(self):
return self.pub_date.date() == datetime.date.today()

class Choice(models.Model):
poll = models.ForeignKey(Poll)
choice = models.CharField(maxlength=200)
votes = models.IntegerField()

def __unicode__(self):
return self.choice

calling Poll.objects.all() returns:
[]

expected:

[]

The function was_published_today works properly, and I have my editor setup
to show all whitespace, so I know its not a tab problem.  I can't seem to
figure it out, but I'm sure its something simple.


Thanks in advance,

Paul
-- 
View this message in context: 
http://www.nabble.com/noob-problem-with-Unicode-tf4166369.html#a11853698
Sent from the django-users mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---