On Wed, 2006-05-03 at 15:43 -0700, Sean Perry wrote:
> Following the new tutorial this morning I ran into a few problems:
> * tutorial and other docs go back and forth between Poll and Blog apps. 

It's a rewrite in progress.

> Choosing one would be nice.
> 
> * __str__ vs __repr__
> The tutorial01 says defining __str__ will then cause Model.objects.all() 
> to show a human readable string, i.e. Poll.question. But it doesn't. I 
> have to define __repr__ or I get the <Poll object> text instead. __str__ 
> does work in the Admin interface as promised though.

Again, rewrite in progress; it will be fixed. Defining __str__ for the
user-friendly string is better practice, but it does change the output
slightly, particularly at the interactive prompt. There was a thread
about this recently:
http://groups.google.com/group/django-users/browse_frm/thread/9f6f205e0f9cbc8e/#

>  From tutorial02: <QUOTE>By default, Django displays the ``repr()`` of 
> each object. But it'd be more helpful if we could display individual 
> fields.</QUOTE>
> But it uses __str__ if that is defined.
> 
> * the tutorial03 example for urls.py removes the admin site from the 
> list. 04 continues this trend of ignoring the Admin urls.

OK, for all of these, all I can suggest is to just wait a little longer
and it will be fixed. The tutorials are some of the last documents that
have not been given papal blessing yet.

> As an aside, when I specify --pythonpath to django-admin startproject it 
> would be nice if the resulting manage.py inherited the setting. (Will 
> add this one to the bug system).

Yeah, this requires a ticket. Sounds like a reasonable request.

Cheers,
Malcolm


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

Reply via email to