I had worked for an ORM for Web2py.
I'm not a python programmer but I like Web2py very much and I try to
do my best.
Anyway, because I don't have much experience with python I decided to
show my work, maybe somebody can help and make something usable.

http://code.google.com/p/web2pyorm/

The modules:
http://code.google.com/p/web2pyorm/source/browse/modules/orm.py
http://code.google.com/p/web2pyorm/source/browse/modules/dao.py

Sample application:
http://web2pyorm.googlecode.com/files/web2py.app.web2pyorm.w2p

Online test application:
http://www.uparts.ca/web2pyorm/default/index

I wait for feedback.

Thanks.



On May 13, 11:48 am, Thadeus Burgess <[email protected]> wrote:
> Why not...
>
> define_table('post', Field('title'), Field('content', 'text'))
>
> class Post(object):
>   �...@staticmethod
>    def get_permalinkI(post):
>       return URL(slugify(post.title))
>
> Then just
>
> for post in db().select(db.post.ALL):
>    print Post.get_permalink(post)
>
> --
> Thadeus
>
> On Thu, May 13, 2010 at 1:44 AM, vihang <[email protected]> wrote:
> > Maybe we could inherit in some way, but I need to inherit a bunch.
> > Hence it does not help.
>
> > On May 12, 8:08 pm, Thadeus Burgess <[email protected]> wrote:
> >> VirtualFields?
>
> >> --
> >> Thadeus
>
> >> On Tue, May 11, 2010 at 11:59 PM, vihang <[email protected]> wrote:
> >> > Some of the apps I am working currently are much more easy to build if
> >> > the models can be defined as a class with methods that act on them.
>
> >> > On May 12, 5:51 am, Álvaro Justen <[email protected]> wrote:
> >> >> On Tue, May 11, 2010 at 21:38, Richard <[email protected]> wrote:
> >> >> > there was a discussion about this on the developers mailing list last
> >> >> > week:
> >> >> >http://groups.google.com/group/web2py-developers/browse_thread/thread...
>
> >> >> Yes, started by me.
>
> >> >> > On May 7, 12:50 am, vihang <[email protected]> wrote:
> >> >> >> Hello,
>
> >> >> >> A long time back, someone (mostly probably massimo) had written a few
> >> >> >> lines of code showing how DAL could be extended to be used in class,
> >> >> >> and effective likeORM. I have spent a lot of time searching for this
> >> >> >> on this group, but unable to find it. Any help would be appreciated.
>
> >> >> vihang, why do you want anORM? :)
>
> >> >> >> Thanks
> >> >> >> Vihang
>
> >> >> --
> >> >> Álvaro Justen - Turicas
> >> >>  http://blog.justen.eng.br/
> >> >>  21 9898-0141

Reply via email to