Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
On Wednesday, 22 June 2016 23:58:47 UTC-4, Anthony wrote: > > > The current idea of Anthony is to directly use wsgihandler as the wrapper >> > > No, the "wrapper" would be a callable object, and it can be defined > anywhere. wsgihandler.py is just the entry point -- you could import the > wrapp

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
On Thursday, 23 June 2016 00:14:36 UTC-4, Anthony wrote: > > > Regarding the comment that the flexibility to have a separate wrapper is >> not important, >> > > Unimportant for the wrapper code to be outside the application folder > because there is a simple approach that should work fine. The

[web2py] Ho to maintain the sequence serial numbers for table row id's even if we delete any row from table.+

2016-06-23 Thread sense red
Hi Everyone, I am facing the issue like. I have created the database table with db.define_table('testcases',Field('Testcase_Name',requires=IS_NOT_EMPTY()), Field('Time_stamp','datetime',requires=IS_NOT_EMPTY())) controller code: def testcases(): form = SQLFORM(db.testcas

[web2py] Table row id's are not getting updated after delecting the row in the grid table view.

2016-06-23 Thread sense red
HI Everyone, I am facing one issue regarding the database table row.id. my db: db.define_table('testcases',Field('Testcase_Name',requires=IS_NOT_EMPTY()), Field('Time_stamp','datetime',requires=IS_NOT_EMPTY())) controller: def testcases(): form = SQLFORM(db.testcases).proce

[web2py] Problem connecting to sql server using web2py

2016-06-23 Thread soumik chaudhuri
Hello All, Greetings. I'm new to web2py. I'm trying to build a dynamic webpage using web2py(Python 2.7) and sql server at the backend. While I'm able to connect to sql server using sql management studio and work, I cannot connect to sql using web2py. There are a lot of solutions offered on t

[web2py] problem with the display of Russian language

2016-06-23 Thread Zhenya Kolchin
I make a query to the MSSQL database with russian full names but receive this only instead of Иван for example -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report I

[web2py] Re: Custom auth.register()

2016-06-23 Thread Massimo Di Pierro
I would recommend that you use auth.settigs.extra_fields['auth_user'] instead of an additional table. On Sunday, 19 June 2016 10:29:27 UTC-5, Annet wrote: > > I have an auth_user table to which I added some extra fields. I use > form=auth.register() and a custom form to register users. > > I wan

Re: [web2py] Re: multiple forms components issues

2016-06-23 Thread Massimo Di Pierro
Can you reproduce the problem with some simpler code? On Tuesday, 21 June 2016 14:42:03 UTC-5, Richard wrote: > > Any clue? > > On Tue, Jun 21, 2016 at 10:51 AM, Richard > wrote: > >> As you which!! >> >> # Controllers >> Form 1 >> def phone_numbers_form(): >> """ >> phone_numbers_form(

[web2py] Re: PROBLEM WITH .CONTAINS() ON GAE

2016-06-23 Thread Massimo Di Pierro
I can confirm it does not. On Wednesday, 22 June 2016 07:25:27 UTC-5, Anthony wrote: > > I don't think the GAE datastore supports text search (you can use > .contains on a list:-type field, though). > > Anthony > > On Wednesday, June 22, 2016 at 3:51:44 AM UTC-4, PRACHI VAKHARIA wrote: >> >> >>

[web2py] Issue with the cheatsheet for web2py

2016-06-23 Thread Encompass solutions
I was using this: http://web2py.com/examples/static/web2py_cheatsheet.pdf And was getting the request.http_host After some research I found it was actually, request.env.http_host Should we update the cheatsheet? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - htt

[web2py] Re: Ho to maintain the sequence serial numbers for table row id's even if we delete any row from table.+

2016-06-23 Thread Encompass solutions
The id field sequences like this so that any referencing items don't get screwed up. You would need to renumber the sequence, that's a bad thing. What is it your wanting to do actually? If you simply query the items they are sorted by id value. On Thursday, June 23, 2016 at 12:22:57 PM UTC+3,

[web2py] Behave testing question

2016-06-23 Thread Jeff Riley
Good morning everyone. This is not really a Web2py question, but this group has been so helpful during my little app development. I am using Behave, Selenium and Splinter for my automated testing of my Web2py app. I have run into a dropdown list situation where my db model (attached) is refe

[web2py] Re: Ho to maintain the sequence serial numbers for table row id's even if we delete any row from table.+

2016-06-23 Thread Anthony
The id field in the table is an auto-incrementing integer field used as the table's primary key, so we want to leave that alone (in any case, every time you delete a record, you wouldn't want to have to update all records that come later in the sequence). So, rather than rely on data in the rec

[web2py] Re: Behave testing question

2016-06-23 Thread Anthony
In your Behave specification, it looks like you have "Storm Products Inc." as the manufacturer. However, the "manufacturer" field is a reference field, which stores record IDs from the db.manufacturers table, not manufacturer names. So, in the Behave specification, the value should be the integ

[web2py] Re: Behave testing question

2016-06-23 Thread Marlysson Silva
OFF-TOPIC I was seeing your models and I noted that you used attributes to control hour and date of data change, don't would be better use the auth.signature ? Em quinta-feira, 23 de junho de 2016 09:50:55 UTC-3, Jeff Riley escreveu: > > Good morning everyone. This is not really a Web2py questio

Re: [web2py] Re: multiple forms components issues

2016-06-23 Thread Richard Vézina
Can try... But my guess is that it's cause by the "ifs" there must be some annoying thing happening cause of them... But when I look into the page source everything seems fine... I am suspecting something with javascript... Richard On Thu, Jun 23, 2016 at 5:28 AM, Massimo Di Pierro < massimo.dipi

[web2py] Re: Problem connecting to sql server using web2py

2016-06-23 Thread Anthony
web2py ships with gluon.contrib.pypyodbc, which is a pure Python ODBC driver. If the DAL does not find pyodbc installed, it falls back to pypyodbc, which it renames to pyodbc in the import statement (which is why you see pyodbc in the list of available drivers). Maybe try importing pypyodbc in

[web2py] Re: How to Call LOAD inside jquery

2016-06-23 Thread Ron Chatterjee
Can you please send me a link to an example where its applied so I get to learn from it? On Wednesday, June 22, 2016 at 8:24:53 PM UTC-4, Anthony wrote: > > LOAD() is a Python helper, so it cannot be called via Javascript in the > browser. However, you can load/refresh a component via Javascript

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Anthony
> No, the "wrapper" would be a callable object, and it can be defined >> anywhere. wsgihandler.py is just the entry point -- you could import the >> wrapper in wsgihandler.py and then expose it to the web server (as in the >> built-in version of wsgihandler.py). >> > > OK, this is different fr

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Anthony
> Regarding the comment that the flexibility to have a separate wrapper is >>> not important, >>> >> >> Unimportant for the wrapper code to be outside the application folder >> because there is a simple approach that should work fine. The installer >> creates the /applications/myapp folder and

[web2py] Re: How to Call LOAD inside jquery

2016-06-23 Thread Anthony
I don't think it's in the book. You might find some relevant examples here: https://groups.google.com/forum/#!searchin/web2py/$24.web2py.component. Anthony On Thursday, June 23, 2016 at 9:52:58 AM UTC-4, Ron Chatterjee wrote: > > Can you please send me a link to an example where its applied so I

[web2py] Re: Behave testing question

2016-06-23 Thread Jeff Riley
Pefect thank you so much Anthony. That worked. On Thursday, June 23, 2016 at 8:13:43 AM UTC-5, Anthony wrote: > > In your Behave specification, it looks like you have "Storm Products Inc." > as the manufacturer. However, the "manufacturer" field is a reference > field, which stores record IDs f

[web2py] Re: Behave testing question

2016-06-23 Thread Jeff Riley
I will look into that Silva. All suggestions are welcome. On Thursday, June 23, 2016 at 8:18:00 AM UTC-5, Marlysson Silva wrote: > > OFF-TOPIC > I was seeing your models and I noted that you used attributes to control > hour and date of data change, don't would be better use the auth.signature ?

[web2py] Re: How to Call LOAD inside jquery

2016-06-23 Thread Ron Chatterjee
If you look at my code though, I am not calling the LOAD inside the jquery (like you are saying calling LOAD from javascript). I am calling LOAD outside. All the jquery does it fold or fold back that div element. So why component? On Thursday, June 23, 2016 at 10:27:40 AM UTC-4, Anthony wrote

Re: [web2py] Re: multiple forms components issues

2016-06-23 Thread Richard Vézina
Can't reproduce with this : def component_container(): form = SQLFORM(db.auth_user) if form.process().accepted: response.flash = 'form accepted' elif form.errors: response.flash = 'form has errors' else: response.flash = 'please fill out the form' return

[web2py] Re: How to Call LOAD inside jquery

2016-06-23 Thread Anthony
On Thursday, June 23, 2016 at 11:00:42 AM UTC-4, Ron Chatterjee wrote: > > If you look at my code though, I am not calling the LOAD inside the jquery > (like you are saying calling LOAD from javascript). I am calling LOAD > outside. All the jquery does it fold or fold back that div element. So w

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
On Thursday, 23 June 2016 09:56:19 UTC-4, Anthony wrote: > > > No, the "wrapper" would be a callable object, and it can be defined >>> anywhere. wsgihandler.py is just the entry point -- you could import the >>> wrapper in wsgihandler.py and then expose it to the web server (as in the >>> buil

[web2py] How to check if new password is different from the actual?

2016-06-23 Thread Marvix
Hello, when an user is changing his password, is it possible to check if it is equal to the current? and refuse it in that case? Thanks! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2p

[web2py] Re: How to Call LOAD inside jquery

2016-06-23 Thread Ron Chatterjee
Funny, you said it that way. That was the problem. I forgot to take the layout off. It works fine now. Since you are so good at it lol. one problem I still have. When I toggle the link, if I have the thread in a loop. All the links open up. How to modify that javascript so only the reques

[web2py] Re: How to Call LOAD inside jquery

2016-06-23 Thread Anthony
You could add a data-* attribute to each pair of divs to identify the specific div that needs to be toggled: Click to read more {{=LOAD('default', 'thread.load', args=[threads[i].id, threads[i].name], client_side=True)}} jQuery(document).ready(function(){ jQuery('.one').click(function()

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
It is also important that the installer does not have to use the application folder. On Thursday, 23 June 2016 10:23:45 UTC-4, Anthony wrote: The installer creates the /applications/myapp folder and puts a single > __wrapper.py file inside the /models folder ... > The simple fact that the

[web2py] Re: How to Call LOAD inside jquery

2016-06-23 Thread Ron Chatterjee
You rock Anthony! Thank you. On Thursday, June 23, 2016 at 12:22:44 PM UTC-4, Anthony wrote: > > You could add a data-* attribute to each pair of divs to identify the > specific div that needs to be toggled: > > Click to read more > > > {{=LOAD('default', 'thread.load', args=[threads[i].id, th

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Anthony
On Thursday, June 23, 2016 at 1:26:38 PM UTC-4, Dominic Mayers wrote: > > It is also important that the installer does not have to use the > application folder. > Unless you can identify common scenarios in which there is an installer who is responsible for setting up web2py but somehow does not

[web2py] JWT refresh not working as expected?

2016-06-23 Thread rāma
Hi, I followed the instruction: 3) Use it! Now API users can obtain a token with http://.../app/default/user/jwt?username=...&password= (returns json object with a token attribute) API users can refresh an existing token with http://.../app/d

[web2py] Re: Python Social Auth - example site working with downlevel version of PSA

2016-06-23 Thread Donald McClymont
On Friday, June 10, 2016 at 9:49:05 PM UTC+1, Donald McClymont wrote: > > I have now forked and pruned w2p-social-auth at the following: > https://github.com/DonaldMcC/w2p-social-auth basically only two changes > of substance: > > 1 It now uses appconfig to store the keys in so you will need

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
On Thursday, 23 June 2016 15:41:35 UTC-4, Anthony wrote: > > On Thursday, June 23, 2016 at 1:26:38 PM UTC-4, Dominic Mayers wrote: >> >> It is also important that the installer does not have to use the >> application folder. >> > > Unless you can identify common scenarios in which there is an in

[web2py] Re: Python Social Auth - example site working with downlevel version of PSA

2016-06-23 Thread Donald McClymont
Just a further note that following some further updating I can login via Facebook, Twitter, Google (using Mozilla Persona) and Microsoft accounts. There is a test site at https://www.netdecisionmaking.com/w2ppsatest if anyone wants to take a look without setting up themselves. I am not really

[web2py] Re: PROBLEM WITH .CONTAINS() ON GAE

2016-06-23 Thread PRACHI VAKHARIA
*Thank you, Anthony and Massimo!* *What if I do not want Lists, but only a simple text field? There will be only one string field which is the name of a person (Author).How will using list: be different from the simple text field?And does .contains() work at all on GAE?* I am still a begin

[web2py] Re: PROBLEM WITH .CONTAINS() ON GAE

2016-06-23 Thread PRACHI VAKHARIA
NEW MODIFIED CODE — STILL DOES NOT FUNCTION The following function does not work on GAE – the lines in Red. *MODEL* *htmlDB.define_table('Articles',* *Field('Title'),* *Field('HtmlBody', 'text', label="Enter Full Article"),* *Field('Abstract', 'text', label="Enter Abstract"),* *

[web2py] Re: PROBLEM WITH .CONTAINS() ON GAE

2016-06-23 Thread Anthony
No, I was not recommending changing the field type to list:string -- that isn't the appropriate field type for your data. I was just mentioning that .contains only works on list fields, and in that case, it is looking for complete word matches within the list. The bottom line is that you cannot

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Anthony
> I think the problem is that you are thinking too abstractly without >> considering what the actual code would look like. If you think about the >> code, you would realize that what you say above makes no sense. I leave the >> following to you as an exercise: assume the installer has access t

[web2py] Dynamic webform to send data to SQL Server

2016-06-23 Thread soumik chaudhuri
Hello Members, I'm new to python and web2py. Here, I'm trying to build a dynamic webform, through which users will be able to select a few values from drop-downs and input different values into sql database through multiple input boxes. Right now, I'm trying to insert data into database. While

[web2py] Re: PROBLEM WITH .CONTAINS() ON GAE

2016-06-23 Thread PRACHI VAKHARIA
Thank you, Anthony. The Google Search API is a little too difficult for me to master, and also is billed. I tried your other suggestion for simulating the .startswith query, but it did not work in my case, either. *MODIFIED CONTROLLER FUNCTION* *def HomeList():* *if request.args(0):* *

[web2py] Re: Problem connecting to sql server using web2py

2016-06-23 Thread soumik chaudhuri
web2py ships with gluon.contrib.pypyodbc, which is a pure Python ODBC driver. If the DAL does not find pyodbc installed, it falls back to pypyodbc, which it renames to pyodbc in the import statement (which is why you see pyodbc in the list of available drivers). Maybe try importing pypyodbc in

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
You should write a self-contained document to explain your concept of wrapper application. In this post, you try to explain the concept of application wrapper (at the application level) in opposition to the concept of a wrapper at the framework level. You say that I do not understand this conce

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
You should write a self-contained document to explain your concept of wrapper application. In this post, you try to explain the concept of application wrapper (at the application level) in opposition to the concept of a wrapper at the framework level. You say that I do not understand this conce

Re: [web2py] Re: How to use a web2py application in a modular way, a way that supports update?

2016-06-23 Thread Dominic Mayers
You should write a self-contained document to explain your concept of wrapper application. In this post, you try to explain the concept of application wrapper (at the application level) in opposition to the concept of a wrapper at the framework level. You say that I do not understand this conce