On Fri, Apr 15, 2011 at 4:23 AM, pbreit <[email protected]> wrote:
> 1) there's a lot of duplicate code that I bet you could reduce. For
> example, all the controllers could be collapsed down into one controller
> since they are all nearly identical.
>
Thank you so much for your adviced, I'll try to simplified my controllers
and my views.
>
> 2) this is a personal preference but indenting with spaces is more common
> among Python programmers
>
Thank you so much for your adviced, I'll try to change my programming style
into python programmers.
>
> 3) also a personal preference but Python programmers tend to write their
> without as many newlines. Just read some other people's code and you will
> see a lot of commonality on when to start a new line, etc.
>
Thank you so much for your adviced, I'll try to change my programming
style.
>
> 4) you might want to put the define_tables in db.py which is common. and
> the menus in menu.py.
>
Thank you so much for your adviced, I've already changed it.
>
> 5) there is a db feature called "auth.signature" which will take care of
> the created_by/modified_by/modified_on. Ise it like this:
> db.define_table('tablename', Field('fieldname'), auth.signature)
>
Thank you so much for your adviced, Did you mean :
http://web2py.com/book/default/chapter/06#Table-Inheritance ?
I've follow those link to use db signature, because when i tested :
db.define_table('tablename', Field('fieldname'), auth.signature)
it's not going to work
any other reference?
>
> 6) you should make it so that app/default/index works since that is usually
> where people start.
>
Thank you so much for your adviced, I'll try to change my apps into
default.
>
> 7) you might want to create your own layout that is different from the
> default web2py look-and-feel
>
Thank you so much for your adviced, I'll try to modified it.
>
> 8) if you are going to be making improvements to the service, you might
> consider using version control (Mercurial) and hosting it Google Code or
> Bitbucket
>
Thank you so much for your adviced, I've tried to installed it, but an error
occured :
*error: Setup script exited with Python headers are required to build
Mercurial*
do you know how to fixed it?
currently i'm using ubuntu 10.10 64 bit