[web2py] Re: Many-to-many admin form

2011-12-28 Thread Christopher Steel
OK, Here are some resources you will want to check out if you have not found them on your own already. # Web2py Plugins ## http://web2py.com/plugins/default ### looks good http://web2py.com/plugins/default/tagging ### interesting http://web2py.com/plugins/default/multiselect

Re: [web2py] Re: Many-to-many admin form

2011-12-28 Thread Bruce Wade
OK thanks, I will take a look through the resources you have provided. -- Regards, Bruce On Wed, Dec 28, 2011 at 12:35 PM, Christopher Steel chris.st...@gmail.comwrote: OK, Here are some resources you will want to check out if you have not found them on your own already. # Web2py Plugins

Re: [web2py] Re: Many-to-many admin form

2011-12-25 Thread Christopher Steel
OK, If your database table is setup correctly then in the database examples section you should be able to create a form similar to the one in example 33 for a many to many relationship. http://web2py.com/examples/database_examples/buy (

[web2py] Re: Many-to-many admin form

2011-12-25 Thread Cliff
That example doesn't look like a true many-to-many it looks like a one-to-many. Because in the example it searches for both id's already being in the many-to-many table and if they are it only updates. Where as a true many to many you would have multiple entries IE: (1, 1, 20), (1, 1, 40),

Re: [web2py] Re: Many-to-many admin form

2011-12-25 Thread Christopher Steel
I think what you mean to say is that you are are looking for the ability to make multiple selections in one or more tables using a single form that allows you create a user record. So for example a table of users, a table of email address types and a table of email addresses but the user on

Re: [web2py] Re: Many-to-many admin form

2011-12-25 Thread Bruce Wade
Hi Christopher, * * *That is pretty much what I am after.* * * *table = keywords values ('Art', 'Games', 'Money') # Used to find all ads related based on keywords they select* *table = ad (* * url,* * created_by* * keywords - can have 0 or more keywords, keywords can belong to 0 or more ad's*

[web2py] Re: Many-to-many admin form

2011-12-24 Thread Christopher Steel
For an example of a Web2py database with a many to many relationship you can see example number 29 under the database examples section: http://web2py.com/examples/default/examples Go to the section called Database Examples See the first example

Re: [web2py] Re: Many-to-many admin form

2011-12-24 Thread Bruce Wade
I looked at the examples they seem to just show how to link at the database level. From my example code I already have that part working. It is at the form/view level I am looking at adding functionality. On Sat, Dec 24, 2011 at 9:41 AM, Christopher Steel chris.st...@gmail.comwrote: For an

[web2py] Re: Many-to-many admin form

2011-12-23 Thread Bruce Wade
I am guessing from the lack of responses this is not possible with Web2py's current admin? On Wed, Dec 21, 2011 at 4:49 PM, Bruce Wade bruce.w...@gmail.com wrote: Hello, I know django has this ability so I am assuming web2py also does. (Here is to hoping :D) First the models:

Re: [web2py] Re: Many-to-many admin form

2011-12-23 Thread Alvaro Lizama Molina
The web2py admin works diferently to the django admin. The web2py admin is for install apps and manage instances. 2011/12/23 Bruce Wade bruce.w...@gmail.com I am guessing from the lack of responses this is not possible with Web2py's current admin? On Wed, Dec 21, 2011 at 4:49 PM, Bruce

Re: [web2py] Re: Many-to-many admin form

2011-12-23 Thread Bruce Wade
I understand that, but you can also use the database portion to create new data. That is mainly the part I am talking about. When clicking database then insert in a table, it would be nice if the relationships could be linked on that insert. This would make performing inserts more efficiently.

[web2py] Re: Many-to-many admin form

2011-12-23 Thread DenesL
On Dec 23, 10:11 am, Bruce Wade bruce.w...@gmail.com wrote: Anyway which files should I start looking at to see how I can implement this functionality for myself and anyone else who wants it? Look for controller appadmin under your or any other app folder.

Re: [web2py] Re: Many-to-many admin form

2011-12-23 Thread Bruce Wade
I have solved these kinds of concerns with pyramid based applications using sqlalchemy. However I need to look into the core of how Web2py handles things to figure out the best way. Sqlachemy allows you to put everything in: 1) Transactions 2) Sessions So on submit you first create the parent

Re: [web2py] Re: Many-to-many admin form

2011-12-23 Thread Anthony
web2py wraps each request in a single transaction by default, so if you make multiple inserts during a request and the request ultimately fails due to an error, the inserts should be rolled back automatically. See http://web2py.com/books/default/chapter/29/4#Workflow and

[web2py] Re: Many-to-many admin form

2011-12-23 Thread Vincent
This something I would definitely be interested in seeing, as well as input forms for many-to-many in general (not just admin). Thanks Vincent On Dec 23, 12:50 pm, Anthony abasta...@gmail.com wrote: web2py wraps each request in a single transaction by default, so if you make multiple inserts