Thanks Joshua!
I'll fetch the dev version of Django instead.
I guess I was confused by the phrases "SVN release" and  "official
release". I just thought the SVN release would be the official release
:p

Thanks a log again


----- Original Message ----
From: Joshua Jonah <[EMAIL PROTECTED]>
To: django-users@googlegroups.com
Sent: Monday, July 14, 2008 11:58:18 PM
Subject: Re: newbie help

maxlength was changed in the trunk to max_length. You are probably
using an older version of Django, the tutorial you were following
refers to the latest version:
http://code.djangoproject.com/ticket/6457

As for the returning the text thing, same deal. If you go to this page: 
http://www.djangoproject.com/documentation/tutorial01/ and look at
where it explains to do that, it has a little note below it explaining
that this wil happen in the older version.

If i were you, I'd either upgrade your Django, or start following the
0.96 tutorial from here.

Joshua

Mario Zorz wrote: 
Hello all,

I'm following the Django tutorial [1] I'm using windows xp, python 2.5
and SQLite. For some reason I found these 2 things not being appropiate
as followed in the tutorial:

1) When tried "python manage.py sql polls" I got this 
TypeError: __init__() got an unexpected keyword argument 'max_length'. 

I could only run it successfully by changing the linea
    question = models.CharField(max_length=200)
to
    question = models.CharField(maxlength=200)
(stripped off the undrescore in "max_length")

2) Continuing down to the "Playing with the API" section, and once I
saved some poll objects to the DB, etc I executed the following command
as specified in the tutorial:

Poll.objects.all()


For some reason, the result I get from the shell is
>>> Poll.objects.all()
[<Poll: Poll object>]


Even when I inserted the __unicode__() method in models.py as follows:
class Poll(models.Model):
    question = models.CharField(maxlength=200)
    pub_date = models.DateTimeField('date published')
    def __unicode__(self):
        return self.question

Anything I'm doing wrong?
Thanks a lot
regards
Mario

[1] http://www.djangoproject.com/documentation/tutorial01/







      
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to