[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-01 Thread Sushant Taneja
Hi, I tried with form.validate() and also with form.process().accepted. Can you provide some sample code on how do I achieve the above ? I am already providing the name of the form while declaring it. How is it different from web2py generated _formname ? On Monday, April 2, 2012 5:07:14 AM UTC+

[web2py] Re: Deployment sqlite question

2012-04-01 Thread pbreit
That seems risky to automatically pull in changes but I guess it could work. In general, I think it should work fine what you are doing. Can you let us know the exact error message? One issue you can run into with SQLite is that I believe you can't drop columns and then re-add them. Maybe that'

[web2py] Re: auth.messages.logged_out not flashing unless next redirect specified

2012-04-01 Thread Massimo Di Pierro
In gluon/tools.py there is self.settings.logout_next = URL('index') On Sunday, 1 April 2012 22:37:12 UTC-5, weheh wrote: > > I did a global search with eclipse and couldn't find anything that set > auth.settings.logout_next. I am inspecting request.env.path_info through > eclipse and it takes on

Re: [web2py] Re: Facing Trouble in Cascading drop-down with ajax

2012-04-01 Thread Sanjeet Kumar
Thanks Antony I got it On Fri, Mar 30, 2012 at 6:55 PM, Anthony wrote: > > onchange="ajax('admin_assign',**['org_name'],'shadow_clone');" >> >> Wouldn't the 'shadow_clone' be specified as '#shadow_clone'? (as it is an >> element selected by id) >> > > No, the third argument of ajax() is just the

[web2py] Re: auth.messages.logged_out not flashing unless next redirect specified

2012-04-01 Thread weheh
I did a global search with eclipse and couldn't find anything that set auth.settings.logout_next. I am inspecting request.env.path_info through eclipse and it takes on a variety of values because of all the LOADs I do. What should I be looking for? On Monday, April 2, 2012 3:53:12 AM UTC+8, Mas

[web2py] Deployment sqlite question

2012-04-01 Thread rdodev
Folks, I've a question. I'm using a semi automated approach to deploying my app. I manage my code through a private BitBucket repo. On my server I have a cron job checking for changes a few times per day. When it finds changes in the repo stops apache (mod_wsgi), pulls source, restarts apache.

Re: [web2py] wb2py with existing database

2012-04-01 Thread Ruben Orduz
Nice work Manuele, I'll keep an eye on that project. On Sun, Apr 1, 2012 at 4:48 PM, Manuele Pesenti wrote: > Il 01/04/2012 18:25, Anthony ha scritto: > >> You should replace the Sourceforge link on the web2pyslices post with the >> above link. > > already added it in a comment... what's the pro

Re: [web2py] adding an item in a list:reference :

2012-04-01 Thread Massimo Di Pierro
Not efficient in searches but supported by all backends. On Sunday, 1 April 2012 18:30:31 UTC-5, Kenny wrote: > > Im curious on this as well. Also, is list:reference valid for mysql? > On Apr 1, 2012 2:23 PM, "bussiere adrien" wrote: > >> ok i see the example : >> >> >>> db.define_table('tag',Fie

[web2py] Re: SpatiaLite support now in trunk

2012-04-01 Thread Massimo Di Pierro
why the renaming? Any way we can make it automatic? On Sunday, 1 April 2012 18:20:51 UTC-5, DenesL wrote: > > > SpatiaLite support using new DB adapter now in trunk: > > db=DAL('spatialite://...') > > NOTES: > > After installation of the required SpatiaLite libraries Windows users > *must* rename

[web2py] Re: web service using validate_and_insert quick question

2012-04-01 Thread Matt
Hey Anthony, Thanks for that suggestion will try your approach. Thanks again, Matt On Monday, 2 April 2012 12:00:55 UTC+12, Anthony wrote: > > db.table('person', >> Field('company', 'integer', required = True), >> Field('photo_image', 'upload', required = True, requires = IS_IMAGE()) >>

[web2py] Re: is_in_db two tables

2012-04-01 Thread Anthony
> > db.define_table("articles", > Field('reference', db.sidemenu, requires=IS_IN_DB(db, 'sidemenu.id', > '%(title)s')), *# here i need smth like : db.sidemenu | db.topmenu ... and > is_in_db(db,'sidemenu.id' or 'topmenu.id')* > Field('image', 'upload'), > Field("title",label=T('Titl

[web2py] Re: membership

2012-04-01 Thread Anthony
You can use auth.has_membership(role='some_role') to test whether the logged in user has membership in a given group. You can use that to conditionally display the links in the view as well as to restrict access to the grid (i.e., redirect somewhere if access is restricted). Anthony On Sunday,

[web2py] Re: web service using validate_and_insert quick question

2012-04-01 Thread Anthony
> > db.table('person', > Field('company', 'integer', required = True), > Field('photo_image', 'upload', required = True, requires = IS_IMAGE()) > > def webservice_name(): > person_id = db.person.insert(company = request.vars.company_id, > photo

[web2py] membership

2012-04-01 Thread CtrlSoft
how to hide tables based on user membership? i have following functin in controller: def view(): table = request.args(0) grid = SQLFORM.grid(db[table],args=request.args[:1], ui = dict(widget='', header='', content='', default='', cornerall='',

[web2py] Re: Multiple custom SQLFORMs on a page only able to submit one.

2012-04-01 Thread Anthony
> > In the method which defines the registration form, I return upload_form > alongside as : > > return(reg_form=reg_form,upload_form=upload_form) > > The problem is that the _formkey and _formname hidden fields are created when you call form.accepts() -- so you have to call form.accepts() both

Re: [web2py] adding an item in a list:reference :

2012-04-01 Thread Kenny Chung
Im curious on this as well. Also, is list:reference valid for mysql? On Apr 1, 2012 2:23 PM, "bussiere adrien" wrote: > ok i see the example : > > >>> db.define_table('tag',Field('name'),format='%(name)s') > >>> db.define_table('product', > Field('name'), > Field('tags','list:refe

[web2py] SpatiaLite support now in trunk

2012-04-01 Thread DenesL
SpatiaLite support using new DB adapter now in trunk: db=DAL('spatialite://...') NOTES: After installation of the required SpatiaLite libraries Windows users *must* rename libspatialite-2.dll as libspatialite.dll for it to be picked-up by web2py. Support under Linux and Mac has not been test

[web2py] web service using validate_and_insert quick question

2012-04-01 Thread Matt
Hi there, Assuming I've got a simple "webservice" that accepts a company_id, and photo_image via a form POST. db.table('person', Field('company', 'integer', required = True), Field('photo_image', 'upload', required = True, requires = IS_IMAGE()) def webservice_name(): person_id = db.p

Re: [web2py] Re: How to prevent form within component submitting?

2012-04-01 Thread Ronghui Yu
It works, thanks simon. By the way, is it possible to add some extra attribute to the form works as a validator, so that the validator could be run before submit, if it returns false, just stop submit. In that case, this will decrease a little bit work. On Mon, Apr 2, 2012 at 2:32 AM, simon wrot

[web2py] Re: Separate form elements in a view ?

2012-04-01 Thread bussiere adrien
i will dig it regards. Bussiere Le dimanche 1 avril 2012 18:33:48 UTC+2, Anthony a écrit : > > See http://web2py.com/books/default/chapter/29/7#Custom-forms and > http://web2py.com/books/default/chapter/29/7#SQLFORM-in-HTML . Forms are > also web2py HTML helper objects, so if you just need to

[web2py] adding an item in a list:reference :

2012-04-01 Thread bussiere adrien
ok i see the example : >>> db.define_table('tag',Field('name'),format='%(name)s') >>> db.define_table('product', Field('name'), Field('tags','list:reference tag')) >>> a = db.tag.insert(name='red') >>> b = db.tag.insert(name='green') >>> c = db.tag.insert(name='blue') >>> db.produ

Re: [web2py] is_in_db two tables

2012-04-01 Thread CtrlSoft
it's a good idea, but i'm using sqlform.grid in app admin and this will create confusion in rows ..., i need to hide rows that are in sidemenu or in top menu.

Re: [web2py] is_in_db two tables

2012-04-01 Thread Manuele Pesenti
Il 01/04/2012 19:52, CtrlSoft ha scritto: i have the follwing tables: || db.define_table('topmenu', Field('parent',type='integer', requires=IS_EMPTY_OR(IS_IN_DB(db, 'topmenu.id', '%(title)s'))), Field('link', type='string', label=T('Link')), Field('title', type='string',label=T('Ti

Re: [web2py] wb2py with existing database

2012-04-01 Thread Manuele Pesenti
Il 01/04/2012 18:25, Anthony ha scritto: You should replace the Sourceforge link on the web2pyslices post with the above link. already added it in a comment... what's the problem with sourceforge? M.

[web2py] Re: auth.messages.logged_out not flashing unless next redirect specified

2012-04-01 Thread Massimo Di Pierro
do you have an auth.settings.logout_next = ... somewhere? Try add a print request.env.path_info in the db.py. I suspect somehow in the latter case you have two redirects and that causes the flash do be eaten by the first redirect On Sunday, 1 April 2012 12:55:28 UTC-5, weheh wrote: > > Is the

[web2py] Re: Will a corrected version of the 4th edition pdf be available ?

2012-04-01 Thread Massimo Di Pierro
There will be a revised edition. asap. On Sunday, 1 April 2012 12:31:38 UTC-5, Nomad wrote: > > bump > > On Friday, March 30, 2012 7:04:22 AM UTC-5, Nomad wrote: >> >> Marco et all, >> >> I've been monitoring the google group a bit bit now and it appears that >> several people have found bugs in

[web2py] Re: How to prevent form within component submitting?

2012-04-01 Thread simon
The submit is trapped by web2py.js This can be prevented by adding " _class=no_trap" to the form. On Sunday, 1 April 2012 16:50:18 UTC+1, Ronghui Yu wrote: > > Hi, All, > > I have a piece of HTML that generated by LOAD helper. And there is a form > in it, quite similar to that component plugin_

[web2py] auth.messages.logged_out not flashing unless next redirect specified

2012-04-01 Thread weheh
Is there a good reason why auth.messages.logged_out doesn't flash upon logout unless there is a next argument? # this flashes def logout(): auth.messages.logged_out = 'bye bye' return dict(form=auth.logout(next=URL(c='mycontroller', f='index'))) # this does not flash def logout(): au

[web2py] is_in_db two tables

2012-04-01 Thread CtrlSoft
i have the follwing tables: db.define_table('topmenu', Field('parent',type='integer', requires=IS_EMPTY_OR(IS_IN_DB(db, 'topmenu.id', '%(title)s'))), Field('link', type='string', label=T('Link')), Field('title', type='string',label=T('Title Ro')), Field('content', type='text',labe

[web2py] Re: Will a corrected version of the 4th edition pdf be available ?

2012-04-01 Thread Nomad
bump On Friday, March 30, 2012 7:04:22 AM UTC-5, Nomad wrote: > > Marco et all, > > I've been monitoring the google group a bit bit now and it appears that > several people have found bugs in the example code in the pdf that was > recently released. > For those of us who bought the release of th

[web2py] Re: Separate form elements in a view ?

2012-04-01 Thread Anthony
See http://web2py.com/books/default/chapter/29/7#Custom-forms and http://web2py.com/books/default/chapter/29/7#SQLFORM-in-HTML. Forms are also web2py HTML helper objects, so if you just need to make little tweaks, you can use the server-side DOM to manipulate the form object before serializing

Re: [web2py] wb2py with existing database

2012-04-01 Thread Anthony
> > Ok from now you can find the updated code on github at this link: > https://github.com/manuelep/plugin_lookout > You should replace the Sourceforge link on the web2pyslices post with the above link.

[web2py] How to prevent form within component submitting?

2012-04-01 Thread Ronghui Yu
Hi, All, I have a piece of HTML that generated by LOAD helper. And there is a form in it, quite similar to that component plugin_comment described in web2py online book. The problem I have now is, I want the prevent the form submitting if failure to validate some fields, but I am not able to do th

Re: [web2py] Separate form elements in a view ?

2012-04-01 Thread Ronghui Yu
Is the descript in web2py online book below *This results in a standard table layout. If you wish to use a different layout, you can break the form into components* * * *1. {{=form.custom.begin}}* *2. Image name: {{=form.custom.widget.name}}* *3. Image file: {{=form.custom.widget.file}}* *4. Click

[web2py] Separate form elements in a view ?

2012-04-01 Thread bussiere adrien
How to separate element from a form in a view ? {{= form }} make the whole form. But i i want to use it one by one for css ? is there a way to do it like : {{= form.Email }} Regards Bussiere here is my form : form2 = FORM( TABLE( TR( TD( LABEL('E

Re: [web2py] Re: web2py win7 64bits

2012-04-01 Thread Ovidio Marinho
Ok that was it, Resolved Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi 83 9334 0266 - Claro Bras

Re: [web2py] wb2py with existing database

2012-04-01 Thread Manuele Pesenti
Il 31/03/2012 17:25, Anthony ha scritto: Github is probably best (or possibly Bitbucket or Google Code). I think the plan is for web2pyslices to add a "plugin" content type for posting plugins (you would still probably host the actual code at Github or elsewhere and link to it from web2pyslices

Re: [web2py] Re: web2py win7 64bits

2012-04-01 Thread Massimo Di Pierro
I think you have MULTI_USER_MODE = True in applications/admin/models/0.py while it should be False. It is possible that in one of my commits I left it True and you downloaded that version. On Sunday, 1 April 2012 08:52:24 UTC-5, Ovidio Marinho wrote: > > It is not that I define the two b

[web2py] Re: Can I use a modified version of the Fedora setup script on my site?

2012-04-01 Thread Massimo Di Pierro
II do not think there is content in the setup scripts that really require any form of license or copyright. I am happy to declare them public domain and you can do whatever you want. Massimo On Saturday, 31 March 2012 23:13:09 UTC-5, Site Admin wrote: > > Hi all, > > I have set up a site for sh

Re: [web2py] wb2py with existing database

2012-04-01 Thread Manuele Pesenti
Il 31/03/2012 17:25, Anthony ha scritto: usefull implementation I'm thinking for the next future are the possibilities to automatically inspect db content such as table names and field feature and some procedure to import data from a csv file. For help with that, see http://code.go

Re: [web2py] Re: web2py win7 64bits

2012-04-01 Thread Ovidio Marinho
It is not that I define the two but when accessing the administrative interface ta happeningin windows in linux it does not, I think it must be something with cron Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.b

[web2py] Re: web2py win7 64bits

2012-04-01 Thread Anthony
When you start the web2py server via the command line, you are setting the password. Then, when you access the admin interface, you have to provide the password that you set when you started the server. Anthony On Sunday, April 1, 2012 8:27:06 AM UTC-4, Ovidio Marinho wrote: > > >Becaus

[web2py] CkEditor Edit in Place

2012-04-01 Thread Hassan Alnatour
Dear ALL , i am trying to use the edit in place method in ckeditor but , i need an example of how to make the function the refers to from the url() , as i understand i need to make a function the saves the content in the database but its w textarea how can i get the text in the controller

[web2py] web2py win7 64bits

2012-04-01 Thread Ovidio Marinho
Because the windows 7 64bit on the web2py 1.99.7 its administrative interface asks login andpassword if I have already informed that the command line? Porque no windows 7 64bits o Web2py na sua interface administrativa pede login e senha se ja tenho informado isto na linha de comando?

[web2py] Re: when I run web2p[y in Vista, and I click on adminstrative, what password do I enter???

2012-04-01 Thread Anthony
Have you read this: http://web2py.com/books/default/chapter/29/3#Startup? You can also start from the command line, as described here: http://web2py.com/books/default/chapter/29/4#Command-line-options. Anthony On Sunday, April 1, 2012 2:05:38 AM UTC-4, jayvandal wrote: > > >

[web2py] Re: upload porblem (argent )

2012-04-01 Thread Hassan Alnatour
windows server 2008 , python 2.7 and i am using apache , what is rocket ??

[web2py] Re: when I run web2p[y in Vista, and I click on adminstrative, what password do I enter???

2012-04-01 Thread Oli
You have to register yourself. Am Sonntag, 1. April 2012 08:05:38 UTC+2 schrieb jayvandal: > > >