Perhaps someone can help with porting that last query. I made a start
but my DAL-fu was not quite up to the task. It works apart from the
parents/siblings:


parents_field = db.zf_topic.id.count()
siblings_field = db.zf_topic.id.count()
hits_field = db.zf_topic.hits.sum()
join = [db.zf_forum.on(db.zf_forum_category.id == db.zf_forum.cat_id),
        db.zf_topic.on((db.zf_forum.id == db.zf_topic.forum_id)  &
(db.zf_topic.disabled_flag == 0))]
groupby = db.zf_forum.id | db.zf_forum.forum_title |
db.zf_forum.forum_desc | db.zf_forum.moderation_flag |
db.zf_forum.anonymous_viewaccess |
db.zf_forum.add_postings_access_roles | db.zf_forum_category.id |
db.zf_forum_category.cat_name | db.zf_forum_category.cat_desc |
db.zf_forum_category.cat_visible_to | db.zf_forum_category.cat_sort |
db.zf_forum.reply_postings_access_roles | db.zf_forum.forum_sort
orderby = db.zf_forum_category.cat_sort | db.zf_forum.forum_sort
rows = db().select(
        db.zf_forum_category.id, db.zf_forum_category.cat_name,
db.zf_forum_category.cat_desc, db.zf_forum_category.cat_visible_to,
db.zf_forum_category.cat_sort,
        db.zf_forum.id, db.zf_forum.forum_title,
db.zf_forum.forum_desc, db.zf_forum.moderation_flag,
db.zf_forum.anonymous_viewaccess,
db.zf_forum.add_postings_access_roles,
db.zf_forum.reply_postings_access_roles, db.zf_forum.forum_sort,
        parents_field, siblings_field, hits_field,
        left=join,
        groupby=groupby,
        orderby=orderby
    )

for row in rows:
            cat_id = row.zf_forum_category.id
            cat_name = row.zf_forum_category.cat_name
            cat_desc = row.zf_forum_category.cat_desc
            cat_visible_to_str = row.zf_forum_category.cat_visible_to
            cat_sort = row.zf_forum_category.cat_sort
            forum_id = row.zf_forum.id
            forum_title = row.zf_forum.forum_title
            forum_desc = row.zf_forum.forum_desc
            moderation_flag = row.zf_forum.moderation_flag
            anonymous_viewaccess = row.zf_forum.anonymous_viewaccess
            add_postings_access_roles =
row.zf_forum.add_postings_access_roles
            reply_postings_access_roles =
row.zf_forum.reply_postings_access_roles
            forum_sort = row.zf_forum.forum_sort
            parents = row._extra[parents_field]
            siblings = row._extra[siblings_field]
            hits = row._extra[hits_field]


The original code is in the default.py controller.
Richard



On Sep 1, 12:39 am, Julio <ju...@techfuel.net> wrote:
> Yes, pyforum is (still) tied up to MySQL, let me correct that, it is
> tied up to any RDBMS (MySQL, Postgres and possibly MSSQL), the reason
> is only one single query (out of the literally dozens) that I need to
> port to the DAL, a "nasty" query in a sense of that it gives you lots
> of information in one single call (it generates the entire main page
> in a second or less).
>
> As for the other question that popped up before, yes, google, openId
> is on the plate.
>
> The two items I just mentioned are at the top of my list.
>
> Thanks,
>
> Julio
>
> On Aug 30, 6:05 pm, Yarko Tymciurak <yark...@gmail.com> wrote:
>
> > also, is pyforms still tied to MySQL?  It would be good to update for
> > DAL usage (e.g. db independent), and would be interesting to see it
> > running on GAE.
>
> > On Sun, Aug 30, 2009 at 8:05 PM, Yarko Tymciurak<yark...@gmail.com> wrote:
> > > better or worse, the best place for information is where people use
> > > it, and questions and answers accumulate (e.g. content trumps function
> > > to a large degree).  Ultimately, people will go where they can find
> > > answers (either through replies or searching).  In general, even the
> > > forums are google searchable, so the forums themselves would have to
> > > be searched / searchable by google indexing (how does work for
> > > database-stored content?)
>
> > > On Sun, Aug 30, 2009 at 7:44 PM, JorgeR<jorgeh...@gmail.com> wrote:
>
> > >> I dont like to have a clugged email box. So, for instance, I dont
> > >> receive email updates from this group, and from no other, really.
>
> > >> A forum is better organized given that it has sub forums and the
> > >> threads are more easy to search-find.
>
> > >> Google groups has been ok when the user base is still a newborn.
>
> > >> But we must prepare for bigtime, and the best way is a forum.
>
> > >> On Aug 30, 7:25 pm, Richard <richar...@gmail.com> wrote:
> > >>> I really like pyforum and consider it the best available web2py app
> > >>> out there.
>
> > >>> However Google Groups has worked well - no downtime, low amount of
> > >>> spam, good search support, email updates, etc. (It is a much better
> > >>> system than Yahoo Groups.)
> > >>> Is pyforum ready for all that?
> > >>> And I like with Google Groups that I can use my existing Google
> > >>> account and not have to remember another password. Are there plans to
> > >>> add OpenID support to pyforum?
>
> > >>> Also what would be done about the discussions created until now? Could
> > >>> they be exported? Because I personally use this group more for
> > >>> searching old threads with the same problem as me than asking new
> > >>> questions.
>
> > >>> If people are keen on pyforum perhaps the new python-developers
> > >>> mailing list could try it first.
>
> > >>> Richard
>
> > >>> On Aug 30, 6:18 am, Julio <ju...@techfuel.net> wrote:
>
> > >>> > I am up for it :)
>
> > >>> > I do believe pyforum is ready for prime time (though for obvious
> > >>> > reasons I am a bit biased), Being in this wonderful group I kinda know
> > >>> > who is who in a way, so I'd be happy to give admin to anyone here that
> > >>> > requires it, just so you get a "feel" of the administrative area of
> > >>> > pyForum, something few have been able to experience.
>
> > >>> > The way I see it, pyForum is a good "start" and it's been stable since
> > >>> > the 1.x release, another interesting thing about it is that the server
> > >>> > is physically located in Chicago IL (though I live in Washington
> > >>> > (state)).
>
> > >>> > pyForum has some nifty things that are handled in the back-end, such
> > >>> > as batch notification emails ran via cron job, auto-removal of out-of-
> > >>> > date administrator requests, also has a PM Messaging system for 
> > >>> > member-
> > >>> > to-member communications, complete user management and system
> > >>> > configuration TTW, I do still think though, I need a (new) logo/title
> > >>> > for the site, as I think my strengths are more in the back-end process
> > >>> > rather than UI.
>
> > >>> > Even if Massimo/Yarko want to move it to their own servers I am also
> > >>> > fine with that., as with all software there are several "gotchas" (I'd
> > >>> > like to thing of them as "paradigms" or "patterns" :) ) that one need
> > >>> > to understand to implement it properly, but it is still an easy system
> > >>> > to install.
>
> > >>> > Cheers,
>
> > >>> > Julio
>
> > >>> > On Aug 29, 11:51 am, "mr.freeze" <nat...@freezable.com> wrote:
>
> > >>> > > Also, I think a web framework that eats it's own dog food is more
> > >>> > > convincing.
>
> > >>> > > On Aug 29, 1:34 pm, "mr.freeze" <nat...@freezable.com> wrote:
>
> > >>> > > > Whoops! I was looking at the topic count but I still think google
> > >>> > > > groups suck.  It seems like the search doesn't go back very far 
> > >>> > > > and
> > >>> > > > nothing is categorized so it's not a good reference.
>
> > >>> > > > On Aug 29, 12:04 pm, Jonathan Lundell <jlund...@pobox.com> wrote:
>
> > >>> > > > > On Aug 29, 2009, at 9:33 AM, mr.freeze wrote:
>
> > >>> > > > > > Google is eating our messages.  It shows only 4625 messages.  
> > >>> > > > > > Massimo
> > >>> > > > > > does that many in a week :)  web2py should use pyforum 
> > >>> > > > > > instead and
> > >>> > > > > > take back control!
>
> > >>> > > > > Are you sure? When I looked just now 
> > >>> > > > > <http://groups.google.com/group/web2py?hl=en
> > >>> > > > >  >, it had 29347 messages. I haven't noticed any dropped 
> > >>> > > > > messages; I
> > >>> > > > > wonder if perhaps somebody's spam filter isn't doing the eating 
> > >>> > > > > (in
> > >>> > > > > which case switching pyforum isn't going to help).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to