[web2py] Re: Weird problems generating menu from database

2014-01-29 Thread web2pygroup
rection or thinking on this please? Thanks! On Thursday, January 23, 2014 6:40:53 AM UTC-6, web2pygroup wrote: > > After disabling the key constraints none of those errors about it have > appeared. I am grateful for the assistance and will return it anyway I > can. I will post a

[web2py] Re: Weird problems generating menu from database

2014-01-23 Thread web2pygroup
After disabling the key constraints none of those errors about it have appeared. I am grateful for the assistance and will return it anyway I can. I will post a summary here for anyone attempting this also. Thanks a million! On Wednesday, January 22, 2014 12:03:26 PM UTC-6, web2pygroup

[web2py] Re: Weird problems generating menu from database

2014-01-22 Thread web2pygroup
27;,args=x.slug),menu_rec(x\ > .children)) for x in items or []] > response.menu = menu_rec(db(db.store_catalog).select().as_trees()) > print response.menu > > On Tuesday, 21 January 2014 12:17:19 UTC-6, web2pygroup wrote: >> >> Here's what I've tried so far and her

[web2py] Re: Weird problems generating menu from database

2014-01-21 Thread web2pygroup
Ok figured out I needed to change that to "as_trees". However the database suggestion you gave is causing a "IntegrityError: FOREIGN KEY constraint failed" error immediately upon trying to put any data into any field. For example if I put Animals in the title and leave the other field "paren

[web2py] Re: Weird problems generating menu from database

2014-01-21 Thread web2pygroup
I have also been trying your solution and have gotten to this point, when I try to run the shell to test it errors out immediately with: AttributeError: 'Rows' object has no attribute 'as_tree' Any hints on how to fix? Or something else I might try? I do have the 2.8.2 version.. I noticed whe

[web2py] Re: Weird problems generating menu from database

2014-01-21 Thread web2pygroup
I decided to try and make "Catalog" my first choice in the menu by setting it as the first entry in the DB. Then I put "Animals" with "Catalog" as its parent, then I added "Dogs" and set that with "Animals" as the parent. Unfortunately it does not show the "Dogs" category. Have I possibly done

[web2py] Re: Weird problems generating menu from database

2014-01-21 Thread web2pygroup
Ok that works, and I'm curious about that variable if you could please explain maybe I could use it and not have to ask to many more questions :) Also I was wondering how I could incorporate what I had also posted originally -> "([T(' Catalog'), False, ''" <- where this was the heading for the m

[web2py] Re: Weird problems generating menu from database

2014-01-21 Thread web2pygroup
ieve the same effect? Thanks On Tuesday, January 21, 2014 12:29:04 PM UTC-6, James Burke wrote: > > Sorry, I had the parent declared as catelog_parent in the table. If you > change it to parent it should work ;) > > Also += is the same as append. > > On Wednesday, Januar

[web2py] Re: Weird problems generating menu from database

2014-01-21 Thread web2pygroup
en), even removed the negative slice ([-1]) for the main categories iteration and when I do it clearly shows that it is actually doing the negative slice properly because the brackets come back at the end of Animals, unlike the subcategories that do not appear to be removing the bracket(s) On

[web2py] Re: Weird problems generating menu from database

2014-01-21 Thread web2pygroup
o see that the bracket only encompasses the subcategories. So I'm wondering how I can get that one bracket out of here (again if I'm correct about the format). I appreciate all the code samples but, it appears I'm doing something trivially wrong which doesn't suffice replacing

[web2py] Re: Weird problems generating menu from database

2014-01-21 Thread web2pygroup
I am unable to make it past the point of the database definition. I put exactly what you have below in my db.py, and in my menu.py I left response.menu=[] so that I could populate the database because the function "def menu_rec" doesn't have anything so I thought to just avoid errors and for s