[Twisted-web] documentation -- Techno Turkey's fifth adventure

L. Daniel Burr ldanielburr at mac.com
Mon Jul 17 13:08:36 CDT 2006


Hi Valentino,


On Mon, 17 Jul 2006 12:48:33 -0500, Valentino Volonghi aka Dialtone  
<dialtone at divmod.com> wrote:

> On Sat, 15 Jul 2006 15:40:24 -0400 (EDT), lloyd at paisite.com wrote:
>> I haven't had a chance yet to finish setting up my own Twisted  
>> development
>> environment, so I haven't been able to test it. In preparing to set up  
>> my
>> environment, however, I realized that there may be conventions in the
>> community (directory layout and naming, for example) that would be very
>> helpful for turkey's like me.
>
> There is no such thing for directories AFAIK. It's usually left to the  
> developer and I'd say the follow standard python code organization. The  
> coding standard instead is the Twisted coding style.
>
> http://twistedmatrix.com/projects/core/documentation/howto/policy/coding-standard.html
>

I'd like to jump in right here and talk abut directory organization for  
just a second.
While you are correct that no specific directory layout conventions have  
been blessed
by the core development team, I think that there is a lot of value in  
providing one,
if only to give really new users some kind of structural anchor point from  
which to
begin learning web-app development with twisted.

A good example is actually the layout used by the various Divmod apps.  Is  
the set
of directory conventions there the One, True, Code Layout?  Surely not,  
but I think
that they are more than adequate for a newbie, and will give them one less  
thing to
think about while getting started.

So, that said, I propose we use the following directory layout convention  
in the
Turkey Adventures (with the clear understanding that this convention is  
not any
kind of officially mandated thing):

/ProjectName
   /packagename
     /static
       /css
       /js
       /images
     module1.py
     module2.py
     ...

I think this is plenty simple, and will prevent the reader from being  
distracted by
a bunch choices that are less important than learning the actual framework.

Anyway, that's my 2 cents on the issue of directory layout for the  
examples.  I
think the new tutorial looks great!

L. Daniel Burr



More information about the Twisted-web mailing list