>     # schema.py
>     from web.schema import Schema, Table, Column, Unique, types, constants
>
>     blog_table = Table('blog',
>         Column('id', types.integer, primary_key=True),
>         Column('created', types.timestamp, default=constants.utc_now),

This is too wordy. What about:

import web.schema as s

blog_table = s.Table('blog',
   s.Column('id', s.t.integer, primary_key=True)
   s.Column('created', s.t.timestamp, default=s.c.utc_now),
   ...

or even just s.utc_now and s.integer?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to