[web2py] Re: Support for MS Access?

2014-11-19 Thread ksotiris
Finally, everything is working correctly. -- 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 Issues) --- You received this message because you are subscribed to the

[web2py] Query difference in SQLFORM.GRID

2014-11-19 Thread Prasad Muley
Hi All, I want to support multiple keywords search as well as web2py's built-in-search. I've written one module which will check if in_built_search is called or not. * If in_built_search isn't called then search keywords in custom_module* *def built_in_search(keywords):* *

[web2py] Re: Migrating only a single auth table ?

2014-11-19 Thread Leonel Câmara
If it fails because it already exists you need to do a fake migration on auth_user, I would undo the changes to auth_group and then do a migration using fake_migrate as needed for already exists errors. Then you can define your auth.settings.extra_fields['auth_group'], put your extra columns

[web2py] Re: Support for MS Access?

2014-11-19 Thread Leonel Câmara
Good job ksotiris, maybe you could contribute this adapter and document its dependencies so the other poor souls having to deal with MSACCESS have a way out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: read an excel file stored in session using xlrd

2014-11-19 Thread Anthony
It sounds like you do need the file to persist across multiple requests, so the simplest approach might be to create a database table with an upload field to store the file. As soon as you're done with the file, then just delete the record in the database (the file will be deleted automatically

[web2py] Re: Query difference in SQLFORM.GRID

2014-11-19 Thread Anthony
Is this the exact code? I notice that the output of the call to _custom_search_query gets assigned to the tuple (new_query, user_company_exist), but (a) that function does not return a tuple, and (b) you don't use new_query when calling the grid. Anthony On Wednesday, November 19, 2014

[web2py] Re: second page to be accessed only from first page

2014-11-19 Thread Anthony
request.function is always going to be the name of the function that has been requested -- that's what it is for. On each request, why don't you just do something like this in a model: session.last_page = session.this_page or None session.this_page = (request.controller, request.function) def

[web2py] Re: All request forwarded to https - How to stop this

2014-11-19 Thread Anthony
Do you have request.requires_https() in your code? If not, provide more details about your setup (hosting provider, exact setup script used). Anthony On Wednesday, November 19, 2014 2:49:44 AM UTC-5, sabbir wrote: OS - Ubantu 12.4 Deployed using deployment script on the book While browsing

[web2py] Re: Migrating only a single auth table ?

2014-11-19 Thread Chris Baron
Then you can define your auth.settings.extra_fields['auth_group'], put your extra columns there, and do a regular migration. -- This is the first thing I tried to do. Won't that fail because auth_user already exists? I only want to migrate a single table -- auth_group. On Wednesday, November

[web2py] Re: Migrating only a single auth table ?

2014-11-19 Thread Leonel Câmara
No it won't fail, it won't try to recreate auth_user unless you deleted your .table files, in which case you need to do a fake migration first. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] DB Driver Question

2014-11-19 Thread 'Michael Gheith' via web2py-users
I have an application that is using a remote PostgreSQL database with the DAL. It's using the pg8000 driver which is in gluoncontrib. Now I recently installed a psycopg2 driver because I don't want to use pg8000 anymore. Is there a convenient way to find out what DB driver my application is

[web2py] Re: DB Driver Question

2014-11-19 Thread 'Michael Gheith' via web2py-users
Is there is a way to specify which driver to use in the DAL connections string? DAL('postgres://pw:user@host:port/dbname') -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

Re: [web2py] Re: Query difference in SQLFORM.GRID

2014-11-19 Thread Prasad Muley
Hi Anthony, Sorry for pasting insufficient code. Following is code from controllers/xyz.py def built_in_search(keywords): This module will return True if opertor in built_in_search is used in keywords search_operators = ['=', '!=', '', '', '=', '=',

[web2py] Re: DB Driver Question

2014-11-19 Thread Leonel Câmara
The postgresql adapter will automatically use psycopg2 if it's available, so if when you start web2py you see in the console PostgreSQL(psycopg2) in the list of available drivers that what it's using. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: SQLFORM.grid edit only selects the first record and updates all records.

2014-11-19 Thread Stephen McCamy
- The update_record function is not available for Rows of keyed tables. That is why i believe. On Tuesday, November 18, 2014 11:02:05 PM UTC-5, Stephen McCamy wrote: Hello, I am having an issue with SQLFORM.grid where when there are more than one records returned the edit button

Re: [web2py] Re: Query difference in SQLFORM.GRID

2014-11-19 Thread Anthony
Hard to say what's going on. I would suggest looking at db._timings (which is available in response.toolbar()) after running each version of that query on the grid. db._timings will show the exact SQL that was executed to get the count and then to return the actual records. Perhaps that will

[web2py] automate one to many on three tables

2014-11-19 Thread Rodrigo
Hi all! Well, i need to migrate this pygtk program to web interface, basicaly there is a table person and that handles basic data about a person and another three: one for adresses, one for phone numbers and another for web adresses and a relationship one to many from person to each one of

[web2py] IntegrityError: foreign key constraint failed

2014-11-19 Thread Богдан Ефименко
Hello I do not know much English I have two tables: db.define_table('category', Field('name')) db.define_table('books', Field('title', requires=IS_NOT_EMPTY('Введите название книги'), label='Название*'), Field('author', requires=IS_NOT_EMPTY('Введите автора'),

[web2py] Unable to pass vars using select form

2014-11-19 Thread Anatoli Hristov
Hello, I was trying to use this kind of form, but I cannot pass the variables to the page! Any hints? Thanks form action=? method=POST select name=myselect id=myselect onchange=this.form.submit() {{for item in screen_model:}} option name=screen

[web2py] Why all traffic forwarded to https and how to stop this ?

2014-11-19 Thread joe black :)
Hi, Just deployed a new web2py using deployment script on Ubuntu.* Problem is all the traffic is forwarded to https. giving certificate error to users.* It was not like this before. How to stop this automatic forward to https? Also where is the routes.py . Is it depreciated ? Then how to

[web2py] Validating user input: No SPACES in textbox

2014-11-19 Thread Ruchir Sharma
Hello, I need validated input from user in a particular field. The input entered by user must not contain any SPACES. I can do this in javascript by using onkeypress function but how to do this using SQLFORM. My code in default.py is as under:

[web2py] git integration application

2014-11-19 Thread Ian Bell
So here's the basic problem. I have pushed our web2py application to https://github.com/CoolProp/Coolprop-Online , and I would like to add this application to my web2py instance running on pythonanywhere.com (props to them btw, PA is a great solution for getting going with web2py). I tried to

[web2py] Keep selection when editing

2014-11-19 Thread Eduard Abramovich
Hi there! I have developed an SQLFORM.grid from a table. This tables contains the users activities, it looks like this: Task name: Developing with web2py Description: blah blah blah Initial Date: 2014-10-10 Due Date: 2012-12-12 Assigned to: User1 | User2 ... (there are various users) In the

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2014-11-19 Thread Edwin van de Ven
Op maandag 13 oktober 2014 19:22:57 UTC+2 schreef Dmitry Ermolaev: I del al files in /sessions and update to 2.9.11 Traceback (most recent call last): File C:\web2py-m\gluon\main.py, line 435, in wsgibase session.connect(request, response) File C:\web2py-m\gluon\globals.py, line

[web2py] Re: pagination issue redirecting to the current page

2014-11-19 Thread Joe
Thanks Cliff, I've been trying to do that but I didn't succeed. I would appreciate if you could send an example on how to put the current page info in the request.args dictionary. On Tuesday, November 18, 2014 12:37:09 PM UTC+8, Cliff Kachinske wrote: Put information about the current page in

Re: [web2py] Re: is_list_of validator question

2014-11-19 Thread Massimo Di Pierro
I do not remember but please open a ticket and I will look at this asap. On Tuesday, 18 November 2014 02:02:53 UTC-6, Manuele wrote: Il 18/11/14 05:54, Massimo Di Pierro ha scritto: Problem is that IS_LIST_OF experts to validate a list. Instead you are passing (not a list) and None

[web2py] Bug with submit button?

2014-11-19 Thread LoveWeb2py
This only seems to happen when I run a local copy of my appliance, but here it goes. First the code: controller: def submit_answer(): session.incorrect = False points = 0 responsejs=False tabTracker = False sound = None answer=FORM('Answer: ',

[web2py] Re: Bug with submit button?

2014-11-19 Thread Anthony
Are you using the same version of web2py.js in both places? On Wednesday, November 19, 2014 9:50:26 PM UTC-5, LoveWeb2py wrote: This only seems to happen when I run a local copy of my appliance, but here it goes. First the code: controller: def submit_answer():

[web2py] Scheduler misleading DEBUG logging when task reaches timeout

2014-11-19 Thread Francisco Ribeiro
hi, After some debugging, I noticed that when tasks timeout while using the scheduler, I get an output as follows: DEBUG:web2py.app.myapp:new task report: FAILED DEBUG:web2py.app.myapp: traceback: Traceback (most recent call last): File /../web2py/gluon/scheduler.py, line 303, in

[web2py] Re: pagination issue redirecting to the current page

2014-11-19 Thread Massimo Di Pierro
URL('index',args=(2)) will give you page #2. On Monday, 17 November 2014 22:59:16 UTC-6, Joe wrote: Thanks Cliff, I've been trying to do that but I didn't succeed. I would appreciate if you could send an example on how to put the current page info in the request.args dictionary. On

[web2py] Re: How do you issue a command to the operating system in web2py?

2014-11-19 Thread Massimo Di Pierro
It is not necessarily a bad idea. He is not saying he wants to run an arbitrary command. If the command is, for example, ls -l mydir you can run it with import os os.system(ls -l mydir) There are some caveats: - do not run the commands that can take long time otherwise - consider using the

[web2py] Re: Unable to pass vars using select form

2014-11-19 Thread Massimo Di Pierro
we need to see more code, specifically the controller, or explain what you want it do. We cannot figure it out from you example. On Tuesday, 18 November 2014 04:14:00 UTC-6, Anatoli Hristov wrote: Hello, I was trying to use this kind of form, but I cannot pass the variables to the page!

Re: [web2py] Re: a proposal for form improvement

2014-11-19 Thread Massimo Di Pierro
They will fight all the time. On Tuesday, 18 November 2014 09:12:55 UTC-6, Richard wrote: I miss this one... How does JForm will cohabit with Angularjs or Ractivejs? Richard On Mon, Nov 17, 2014 at 11:56 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: In my todo list but no

[web2py] Re: Web2py Funding

2014-11-19 Thread Massimo Di Pierro
Honestly I do not understand how Meteor pulled it off. I would have been happy to rebuilt something better than meteor for them for 1/10th of that amount. But nobody asked me. On Tuesday, 18 November 2014 06:40:12 UTC-6, Leonel Câmara wrote: I think this would be hard to do. Funding is a

[web2py] Re: Why all traffic forwarded to https and how to stop this ?

2014-11-19 Thread Massimo Di Pierro
routes.py is not deprecated but the same can be achieved using apache or nginx config script. I prefer to use routes anyway. I am not sure why you get redirect to https. Which install script did you use? I do not think any forces you to use https. Perhaps the app redirects to https. On

[web2py] Re: Bug with submit button?

2014-11-19 Thread LoveWeb2py
Hi Anthony, Yes - I confirmed the byte count and they're exactly the same. On Wednesday, November 19, 2014 10:16:39 PM UTC-5, Anthony wrote: Are you using the same version of web2py.js in both places? On Wednesday, November 19, 2014 9:50:26 PM UTC-5, LoveWeb2py wrote: This only seems to