[web2py] Re: SQLFORM.grid and in-place-update

2014-04-21 Thread Jayadevan M
To answer my Q, used the construct - selectable = lambda ids : verify_stud(ids) , and updated did the update in verify_stud So code looks like this - form = SQLFORM.grid(query=query,create=False,searchable=False, orderby=db.s_user.first_name,csv=False, selectable =

[web2py] CouchDB driver & No Tables/FIELDS?

2014-04-21 Thread Brando
I want to use CouchDB for an upcoming project. I know that i'm supposed to install a couchdb driver, but i have no idea where to get the driver from and where exactly it needs to be installed. Also, I'm assuming since couch is a document database that it will be unnecessary for me to define ta

[web2py] SQLFORM.grid and in-place-update

2014-04-21 Thread Jayadevan M
I am learning how to use SQLFORM.grid. I am able to display a set of records. 1) If the user clicks on Edit for a record, it goes to a new page and also displays all the columns (though I chose only a few fields in the grid). How can I avoid that? 2) Is it possible to update multiple records in

[web2py] Adding fields to auth_user (and creating alternate username validation)

2014-04-21 Thread Rufus
Still a noob, but starting to actually use web2py, and getting hands dirty: I am working on an actual web2py project (low-bandwidth word game back-end logic), and I'm finding as I make incremental changes I hit potholes on the way. I have some users who are going to the website to downloa

[web2py] Re: Hosting separate web2py application and PHP application on same apache fedora server

2014-04-21 Thread Tim Richardson
I thought it wasn't recommended to run php on a multi-threaded (MPM) apache? http://www.php.net/manual/en/faq.installation.php#faq.installation.apache2 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

[web2py] Re: SQLFORM.factory and jQueryUI effects

2014-04-21 Thread Greg Vaughan
Hey Niphlod, Thanks for that answer... you are spot on in seeing the problem... my "#appointments_blah" id's did get changed to "#no_table_blah" hence the jQuery was targeting id's that no longer existed... To "fix" it I simply changed the hard coded script at this point to target "#no_table_

[web2py] Re: generating your own _formkey values

2014-04-21 Thread Anthony
Oops, I forgot the mechanism was altered not long ago. Now you can open up to 10 versions of a form and submit any of them (previously, opening a new version of a form, say in a separate browser tab, would invalidate any previously opened versions because the formkey was overwritten in the sess

[web2py] Re: Pre-registering users

2014-04-21 Thread Massimo Di Pierro
Please open a ticket: - the reset password should display password strenght - there should be an option to automatically login after reset password. On Monday, 21 April 2014 16:25:20 UTC-5, Horst Horst wrote: > > Thanks, Massimo, what I ended up doing so far is: > > 1. Pre-registering users with

[web2py] Re: Classic Error with Rocket - can't launch web2py any more

2014-04-21 Thread samuel bonill
try: python web2py.py -i 127.0.0.1 -p 500 El lunes, 21 de abril de 2014 10:03:24 UTC-5, Dansant vzw escribió: > > I'am again trying (after several earlier and succesfull atempts) to learn > some web2py. In the past I just got the framework up and running without > any problem at all. > > Unl

[web2py] Re: generating your own _formkey values

2014-04-21 Thread Sharon Correll
Well, that *seems* like a very different process from what I'm seeing. I have a form called "langResource/9" (to modify a record with id=9 from the langResource table). The value that I see in the session is: '_formkey[langResource/9]': ['79f4f99e-9205-460d-97b1-44038b475307', '1c0d6498-0807

[web2py] Re: Pre-registering users

2014-04-21 Thread Horst Horst
Thanks, Massimo, what I ended up doing so far is: 1. Pre-registering users with register_bare(), using a random password and an empty user name 2. Sending out a password reset mail like you wrote 3. After the user changed the password, on the subsequent call of index(), having the app check w

[web2py] Re: View functions in module?

2014-04-21 Thread Thomas de Noronha e Silva
Thanks, that does it :) I'll probably automate the conversion since I'm using Jade to generate the html On Monday, 21 April 2014 16:43:03 UTC+1, Anthony wrote: > > Would it be difficult to simply define the functions in a module, or do > they include a lot of interspersed HTML? If the latter, yo

[web2py] Bug in deflate of json fields

2014-04-21 Thread Sebastian Ortiz Vasquez
Hi, i discovered a bug, but don't have enoght time to solve this. The problem is this, i'm using psycopg2==2.5.2 to get this working, because pg8000 still in web2py distribution does not work. I defined a field of type 'json', (postgresql supports it), when web2py inflates the json field as a d

[web2py] Re: generating your own _formkey values

2014-04-21 Thread Anthony
Yes, when the form.accepts (or form.process) is called, web2py generates the formname and formkey, adds those hidden fields to the form, and adds the formkey to the session (with the formname as the key). When the form is submitted, it checks that the formkey associated with the formname in the

[web2py] Re: is it possible to hand over Rows object to sqlform.grid form ?

2014-04-21 Thread Dave S
On Monday, April 21, 2014 7:15:10 AM UTC-7, alex wrote: > > Hello guys. I need to display different rows with checkboxes from > different tables , so I decided to use grid form. With such demands I have > to use one grid form for each table, but as far as I know that it's > incorrect to do so. M

[web2py] generating your own _formkey values

2014-04-21 Thread Sharon Correll
I'm a web2py newbie, so please excuse me if I'm overlooking something obvious. I'm trying to build my own custom form for creating and editing records in a database. I'm trying to garner clues from the way SQLFORM does it. The documentation says: The hidden field called "_formkey" is a one-tim

Re: [web2py] Re: RFC: web2py-based workflow engine

2014-04-21 Thread Dave S
On Friday, April 18, 2014 8:17:54 PM UTC-7, Andrew W wrote: > > Thanks. That's a .net solution so not quite the web2py solution I was > looking for. > A quick look didn't turn up anything about workflows by Ross outside of this thread. BTW, my thoughts on a multiperson-signoff that would be

[web2py] Re: Fields with duplicate names not showing up in form generated by SQLFORM.factory()

2014-04-21 Thread Anthony
You'll have to create a custom form in some fashion, setting the input names to distinguish the specific tables for fields with the same name. Anthony On Monday, April 21, 2014 2:34:30 PM UTC-4, Spokes wrote: > Thanks for the clarification, Anthony. Can you recommend a good way to > achieve th

[web2py] Re: A helper callback not working

2014-04-21 Thread Ruud Schroen
It no longer follows the href, but it now gives me this jQuery error: Uncaught Error: Syntax error, unrecognized expression: #:eval I am using the jquery.js from the welcome app On Monday, April 21, 2014 6:56:41 PM UTC+2, Ruud Schroen wrote: > > Hi, > > I've got a A helper with a callback functi

[web2py] Re: Fields with duplicate names not showing up in form generated by SQLFORM.factory()

2014-04-21 Thread Spokes
Thanks for the clarification, Anthony. Can you recommend a good way to achieve the functionality I mentioned, or does such a form, along with processing, inserts, etc., have to be manually crafted? On Monday, April 21, 2014 1:20:16 PM UTC-5, Anthony wrote: > > No, the documentation mentions this

[web2py] Re: Fields with duplicate names not showing up in form generated by SQLFORM.factory()

2014-04-21 Thread Anthony
No, the documentation mentions this as a limitation of using SQLFORM.factory with multiple tables. On Monday, April 21, 2014 1:56:44 PM UTC-4, Spokes wrote: > > I'm using SQLFORM.factory() to generate a form from multiple tables, some > of which have fields that have the same names as fields in

[web2py] Re: A helper callback not working

2014-04-21 Thread Massimo Di Pierro
You need to replace web2py.js with the latest one from the welcome app. On Monday, 21 April 2014 11:56:41 UTC-5, Ruud Schroen wrote: > > Hi, > > I've got a A helper with a callback function, which is created in the > controller > > return A(T('Send friend request'), callback=URL('friendship', ar

[web2py] Fields with duplicate names not showing up in form generated by SQLFORM.factory()

2014-04-21 Thread Spokes
I'm using SQLFORM.factory() to generate a form from multiple tables, some of which have fields that have the same names as fields in other tables. In the form that's generated, the first instance of the field with the common name appears, but any subsequent instances of the field with that name

[web2py] A helper callback not working

2014-04-21 Thread Ruud Schroen
Hi, I've got a A helper with a callback function, which is created in the controller return A(T('Send friend request'), callback=URL('friendship', args=[ 'request', user.id]), _class='bt_white sendrequest', _id='friendship_button' , target=':eval') It used to render this: http://localhost:9000

[web2py] Re: SQLFORM inserts new record instead of updating existing record

2014-04-21 Thread Anthony
Neither of those has anything to do with any GET vars. request.get_vars.id represents an "id" variable passed in the query string of the URL. On Monday, April 21, 2014 12:19:56 PM UTC-4, Sharon Correll wrote: > > Yes, using request.get_vars.id solved that problem. And it turns out that > I was c

[web2py] Re: SQLFORM.factory and jQueryUI effects

2014-04-21 Thread Niphlod
check the resulting html markup for sqlform.factory. As it's intended originally to work with Fields that don't belong to a table, the "table" part prefix to every field is "no_table". So, your "#appointments_unit" that is probably related to a table appointments and a field unit with SQLFORM,

[web2py] Re: SQLFORM inserts new record instead of updating existing record

2014-04-21 Thread Sharon Correll
Yes, using request.get_vars.id solved that problem. And it turns out that I was confusing it by using different form-names, so the modification is now happening as expected! Hurray, thanks for your help. Just to clarify, when I I look at the HTML I see: ... The ID 12 is in there

[web2py] Re: Need to access SQLite3 database file but have no definitions for tables

2014-04-21 Thread Niphlod
to be able to access the data with DAL, you need to define tables that you want to use. If they exist already, as in your case, a simple migrate=False will turn the migrations off and just define the table without creating it. db.define_table('', migrate=False) On Saturday, April 19, 2014 8

[web2py] Re: Unique Field Name AND Case

2014-04-21 Thread Niphlod
add a computed column that stores the uppercased or lowercased value, and set a unique constraint on that, or use http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#before-and-after-callbacks On Sunday, April 20, 2014 10:58:04 PM UTC+2, David wrote: > > So I been lookin

[web2py] SQLFORM.factory and jQueryUI effects

2014-04-21 Thread Greg Vaughan
Hi everyone, I am using a bunch of jQuery hide effects based on the example code in the book... (Chapter 11... Conditional fields in forms) which work great with my SQLFORM. However when I change the controller to use SQLFORM.factory so that I can post to two tables (based on Chapter 7... One

[web2py] Re: SQLFORM inserts new record instead of updating existing record

2014-04-21 Thread Anthony
When you say you are using request.vars.id, do you mean you have an "id" variable in the query string, as in /myform?id=1? If so, change the name of that variable to something else, as the edit form will include its own hidden field with the name "id" -- so upon submission, there will be a requ

[web2py] Re: View functions in module?

2014-04-21 Thread Anthony
Would it be difficult to simply define the functions in a module, or do they include a lot of interspersed HTML? If the latter, you can still port the functions to standard Python functions in a module by wrapping any HTML lines in response.write(). You can also automate the conversion of existi

[web2py] Re: Classic Error with Rocket - can't launch web2py any more

2014-04-21 Thread LightDot
The error is pretty self-explanatory. Another service (or another instance of the same one) is already using port 8000. So, the solution is to: - find out which service is it (execute the command 'netstat -lnptu' in your terminal) - shut that service down. BTW, installing or uninstalling clama

[web2py] Re: SQLFORM inserts new record instead of updating existing record

2014-04-21 Thread Sharon Correll
I changed it to look very similar to this: > def myform(): > record = db.langResource(request.args(0)) > form = SQLFORM(db.langResource, record=record).process( > message_onsuccess='Resource modified' if record else 'New > resource added') > return dict(form=form) > >> except

[web2py] SQLFORM.widgets.radio.widget and jQuery Validation

2014-04-21 Thread Greg Vaughan
Hi everyone, When I am using the SQLFORM.widgets.radio.widget my jquery selection code does not work. If I comment out the widget it works fine. Does anyone know if there is a workaround or is it just not possible to combine the two together. In the Model... db.define_table('leads', Fiel

[web2py] Classic Error with Rocket - can't launch web2py any more

2014-04-21 Thread Dansant vzw
I'am again trying (after several earlier and succesfull atempts) to learn some web2py. In the past I just got the framework up and running without any problem at all. Unless I tryed it recently again and got the following error, which seems to be a classic: ERROR:Rocket.Errors.Port8000:Socket

[web2py] View functions in module?

2014-04-21 Thread Thomas de Noronha e Silva
I have a file A.html containing a couple of view functions that I want to include in several view across different apps. Is there a way in web2py that avoids either replicating the files or using volatile file paths? Ideally, I wish I could import the compiled version of view functions in a sim

[web2py] is it possible to hand over Rows object to sqlform.grid form ?

2014-04-21 Thread alex
Hello guys. I need to display different rows with checkboxes from different tables , so I decided to use grid form. With such demands I have to use one grid form for each table, but as far as I know that it's incorrect to do so. Maybe there is a way to extract rows from those tables and hand the

[web2py] Re: how to use gluon Expose

2014-04-21 Thread Louis Amon
It gets me the same result : broken links & images On Monday, April 21, 2014 3:28:00 PM UTC+2, Massimo Di Pierro wrote: > > Can you try: > > Expose(os.path.join(request.folder,'static','presse')) > > On Monday, 21 April 2014 06:01:42 UTC-5, Louis Amon wrote: >> >> Hi, >> >> I'm trying to expose a

[web2py] Re: how to use gluon Expose

2014-04-21 Thread Massimo Di Pierro
Can you try: Expose(os.path.join(request.folder,'static','presse')) On Monday, 21 April 2014 06:01:42 UTC-5, Louis Amon wrote: > > Hi, > > I'm trying to expose a folder in my application, so I tried to use the > Expose function as described > here

[web2py] Re: 500 Internal Server Error under CentOS Apache and Web2py 2.9.5

2014-04-21 Thread LightDot
You use /opt/web-apps/web2py_2.9.5/ in one place and /opt/web-apps/web2py/ in other places. Besides, you should copy the wsgihandler.py into the web2py directory, don't call the file directly from handlers... (unless you've modified the paths within, but running directly from handlers isn't a r

[web2py] how to use gluon Expose

2014-04-21 Thread Louis Amon
Hi, I'm trying to expose a folder in my application, so I tried to use the Expose function as described here My controller looks like : from gluon.tools import Expose > def presse(): > files=Expose(request.fol

Re: [web2py] Login ajax component

2014-04-21 Thread Marin Pranjić
This sounds like a bug. Marin (mobile) On Apr 18, 2014 9:10 PM, "Louis Amon" wrote: > I'm trying to build an Ajax-based login form using web2py's LOAD() helper. > > I made a controller named 'users.py', in which I defined a 'signin()' > function : > >> def signin(): >> form=auth.login() >>

Re: [web2py] "Admin is disabled because insecure channel" error Hosting web2py app on Amazon EC2 Linux server

2014-04-21 Thread Marin Pranjić
http is insecure. you need to use https to access admin app. Marin (mobile) On Apr 21, 2014 5:02 AM, "Pawan Gupta" wrote: > Hi Everyone > > We are having serious problem with our website 911india.com. We have > hosted it on Amazon EC2 server and there is a ticket that is issued which > redirects

[web2py] Re: Login ajax component

2014-04-21 Thread Louis Amon
I found a workaround to solve this issue by closing the form tag myself : I removed the line : > {{ =login_form.custom.end }} And replaced it with : > > It IS a monkeypatch, and it comes with restrictions (regarding components for instance) but at least my problem is solved for now. On

[web2py] Re: alternate date and time picker

2014-04-21 Thread Greg Vaughan
Hi Annet... Thank you so much for the detailed reply... I have made it a point to check out the styling you have done... However the issue that I have is not just with the look but also with the way that the default one functions... particularly on tablets... it is clunky. So I have hacked to