Thats the way I found to perform LIKE() search in GAE, it is ugly (I know)
but works.. I am waiting for any feature to replace this.


@staticmethod
    def searchPages(string=None,nfmessage='Nothing found with %s'):
        """
        string: string to be found
        """
        found = set()
        string = request.vars.search
        if string:
            #search in slug
            pages =
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug)
            for page in pages:
                if page.slug.find(string) > -1:
                    found.add(page.slug)

            #search in page body
            pages =
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.body)
            for page in pages:
                if page.body.find(string) > -1:
                    found.add(page.slug)

            #search in page title
            pages =
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.title)
            for page in pages:
                if page.title.find(string) > -1:
                    found.add(page.slug)

            if found:
                cleanfound = set()
                for row in found:
                    if row[:4]!='meta':
                        cleanfound.add(row)

                return UL(*[LI(*[A(XML(db(db.plugin_wiki_page.slug==row)\

.select(db.plugin_wiki_page.title)[0].title),\

_href=URL(request.application,'plugin_wiki','page',args=[row,]))])\
                                for row in cleanfound])
            #r=request,f='page'
            else:
                return nfmessage % string

        else:
            return ''


2010/8/2 Martin.Mulone <mulone.mar...@gmail.com>

> I use like() to search, but in a near future this could be disabled.
>
> On Aug 2, 1:23 pm, Bruno Rocha <rochacbr...@gmail.com> wrote:
> > Running locally InstantPress looks awesome, quickly, beauty/clean layout
> and
> > I loved the way you treat Admin Buttons.
> >
> > Congratulations!
> >
> > But, this could not works on GAE, I saw a lot of code that is not allowed
> on
> > GAE, you are using .like() in get_lats_pots_with_search()
> >
> > Today I will try to run it on GAE, testing  some workarround, then I
> report
> > you.
> >
> > {{=thanks}}
> >
> > 2010/8/2 Martin.Mulone <mulone.mar...@gmail.com>
> >
> >
> >
> >
> >
> > > I don know I think yes, but I dont test it.
> >
> > > On Aug 2, 9:45 am, Bruno Rocha <rochacbr...@gmail.com> wrote:
> > > > Martin, is it able to work on GAE ?
> >
> > > > 2010/8/2 Martin.Mulone <mulone.mar...@gmail.com>
> >
> > > > > I am working in a cms *blog style* the idea is to be simple, ready
> to
> > > > > work, looking professional, and use ajax and effect in admin panel
> at
> > > > > least. You can see here:
> http://code.google.com/p/instant-press/Itis
> > > > > in developing state but many things are working. I am working on it
> in
> > > > > the last 2 or 3 weeks. All the ideas, bugs and others comments are
> > > > > welcome. Here where I work Iam prommoting web2py.
> >
> > > > > Can admin users.
> > > > > Can admin articles.
> > > > > Can admin comments.
> > > > > Can admin categories.
> > > > > Can admin information of the site.
> >
> > > > > On Aug 2, 7:16 am, Phyo Arkar <phyo.arkarl...@gmail.com> wrote:
> > > > > > Web2py is Great, Greatest framework that i had ever tried and
> stick
> > > onto
> > > > > it.
> >
> > > > > > But what it is lacking is publicity and lack of KILLER web-apps
> like
> > > > > those
> > > > > > Made PHP most popular web-development platform.
> > > > > > Here are some , what that had made PHP Popular and which will
> also
> > > make
> > > > > > Web2py + Python all together more popular and makes development
> > > > > enviorment
> > > > > > of Choice for web:
> >
> > > > > > Necessary APPS:
> >
> > > > > > *Database Administration:*
> >
> > > > > > phpMyAdmin - Is the Most used webbased Database Manager ever
> >
> > > > > > we have admin for web2py but that alone is not sufficient, we
> need a
> > > DB
> > > > > > Admin for every Databases on the current system .
> > > > > > Current commercial project i am doing have some features for it
> and
> > > when
> > > > > i
> > > > > > free i will start making dedicated one . I will need contributers
> > > later.
> >
> > > > > > Hows about PySQLAdmin sounds?
> >
> > > > > > *File Manager :*
> >
> > > > > > Those who work on LAMP , they usually use a file manager like
> > > net2ftp.
> > > > > > Current my  elFinder-web2py works well for this case, but i need
> > > > > > contributors .
> >
> > > > > > *CMS*
> >
> > > > > > KPAX exist but it is not dedicatedly maintained , we will need
> > > dedicated
> > > > > > maintainers for it , lets let Massimo dedicate his works on
> web2py.
> > > > > > KPAX should  not only be as Appliance , it should have its own
> Domain
> > > and
> > > > > > brand.And lets make it better than CMS.
> >
> > > > > > *Blog*
> >
> > > > > > There are many blog exist on the appliance , but we need a
> dedicate
> > > best
> > > > > one
> > > > > > that can go toes to toes against Wordpress.
> > > > > > + will need A Dedicated domain , and maintainer.
> > > > > > *
> > > > > > *
> > > > > > *
> > > > > > *
> > > > > > KILLER APP Ideas
> >
> > > > > > *Stack Overflow Clone:*
> >
> > > > > > For web2py community and as separate Open Source Project , lets
> make
> > > a SO
> > > > > > Clone?
> >
> > > > > > *Email Client:*
> > > > > > *
> > > > > > *
> > > > > > Python have a very rich Built-in mail handling libs , developing
> a
> > > > > > gmail-clone wont be hard at all.
> >
> > > > > > Ticketing Systems:
> >
> > > > > > Many enterprises needs a Help Desk/ Ticketing system . Best one i
> > > used is
> > > > > RT
> > > > > > (Perl based ticketing system). We can make a better one based on
> > > web2py.
> >
> > > > > > What i can contribute :
> >
> > > > > > I am planning to provide a site for hosting web2py app and demos
> for
> > > it.
> > > > > I
> > > > > > have server / space and good domain (www.web2pyhost.com,
> > > scaryhits.com)
> > > > >  or
> > > > > > should it be web2pyapps.com
> > > > > > for code hosting we can use google for that.
> >
> > > > > > *
> > > > > > *
> >
> > > > --
> >
> > > >http://rochacbruno.com.br
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br

Reply via email to