[tg-trunk] Re: How about the model reference

2007-02-05 Thread Jorge Vargas
On 2/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 I've rewrote the 'Defining your model' and 'Using your model' docs.
 Now they should look better XD

 http://docs.turbogears.org/1.0/GettingStarted/DefineDatabase
 http://docs.turbogears.org/1.0/GettingStarted/UseDatabase


great work just one thing you should link to
http://docs.turbogears.org/1.0/AlternativeDatabaseAccess which I think could
be renamed for db dependant things like do not name a column as the same way
of a reserved db keyword. I just upadted that with proper links.

 How about appending the  create a 'template reference for kid'  on the
 todo-list of doc sprint?

well isn't that what the language specs are for?
http://kid-templating.org/language.html I agree that the name is a bit scary
but that is exactly what it's supposed to do.

I really don't want to get into duplicating documentation efforts and I'm
sure that if people are complaining of lack of docs in (and lets use kid as
an example) the kid folks will be more then happy with us contributing docs
to them.

--
 Fred


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears Trunk group.
To post to this group, send email to turbogears-trunk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~--~~~~--~~--~--~---



[tg-trunk] Re: How about the model reference

2007-02-05 Thread Florent Aide

On 2/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 I've rewrote the 'Defining your model' and 'Using your model' docs.
 Now they should look better XD

 http://docs.turbogears.org/1.0/GettingStarted/DefineDatabase
 http://docs.turbogears.org/1.0/GettingStarted/UseDatabase

Great work.

One small point that has already been discussed in the ML though.
*Please* note I do not intend to begin a flame war, this is just a
simple question/suggestion.

I see that you use

from sqlobject import *


wouldn't it be better to have something like:
in the UseDatabase code

from sqlobject import SQLObject

and in the Define Database code

from sqlobject import SQLObject, StringCol, RelatedJoin


My reasoning behind this is two-fold:

first: I personally prefer to have explicit imports of what I want.
But I am aware that this reasoning is a personal preference and can
vary from one person to another.

second: when you are new to python (and even when you are not) it is
easier to read some code and to say: aah! the StringCol comes from
the  sqlobject module, than to wonder: ergh! from which import *
does this come from ?

I think the explicit import makes code easier to read.
When I first started using TG I had a hard time figuring out from
which import * came each item in the quickstarted controller/model.

Regards,

Florent.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears Trunk group.
To post to this group, send email to turbogears-trunk@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~--~~~~--~~--~--~---