Re: [web2py] sqlform.factory widget in field problem

2013-06-27 Thread António Ramos
I dont understand how that gets the submit button out of the last fieldset 2013/6/28 Tom Russell > Here's the rest of my code doing what I posted before... > > if form.process().accepted: > id = db.patient.insert(**db.patient._filter_fields(form.vars)) > form.vars.patient=id >

Re: [web2py] sqlform.factory widget in field problem

2013-06-27 Thread Tom Russell
Here's the rest of my code doing what I posted before... if form.process().accepted: id = db.patient.insert(**db.patient._filter_fields(form.vars)) form.vars.patient=id id = db.emergencycontacts.insert(**db.emergencycontacts._filter_fields(form.vars)) id = db.depend

[web2py] Re: upgrading eCardsOnMap to API V3

2013-06-27 Thread Kyle Pennell
Any luck getting this to work? On Wednesday, March 21, 2012 8:46:23 AM UTC-7, webpypy wrote: > > Hi all, > > I am trying to upgrade eCardsOnMap to API V3. > > I think i have to use the array to get (title , infowindow) for each > marker. > > my code is : > > > function initialize() { >

[web2py] Re: Pls, upgrade eCardsonMap to V3

2013-06-27 Thread Kyle Pennell
+1 Please! On Monday, March 19, 2012 2:11:33 PM UTC-7, webpypy wrote: > > Hi, > > Pls, upgrade eCardsonMap to V3 > > Regards, > > Ashraf -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving

[web2py] Limit the field to search in sqlgrid?

2013-06-27 Thread funmanhk
Hi all, I have a couple tables joined in the sqlform.grid. They both have around 20 fields. I am only displaying around 10~15 fields for a particular purpose. When I click on the search widget, it gives me way more option that I need (all the 40 fields to choose from). Is there a possible way

Re: [web2py] Re: DAL and schema

2013-06-27 Thread Alex
I'd also appreciate schema support for web2py. I'm working on a project with Postgres and different schemas. For now I could solve the problem with adding the schema to the db search path. Since we are creating new tables we can make sure they are unique, for legacy systems it could be problema

Re: [web2py] sqlform.factory widget in field problem

2013-06-27 Thread António Ramos
Using this suggestion , my submit button is inside the last fieldset. How do i take it outside? 2013/6/26 Tom Russell > To group inside a field I do something like this with 3 different tables: > > form=SQLFORM.factory(db.patient, db.emergencycontacts, db.dependents) > fs0=form[0][:26]

[web2py] Re: response.files.append in component plugin

2013-06-27 Thread Niphlod
Don't reinvent the wheel . if you're using the default layout, you already have in your toolbelt Modernizr. http://modernizr.com/docs/#load If you're not concerned about dipendencies (as it seems from your snippet) it gets really easier. Modernizr.load('/welcome/static/css/bootstrap.min.css

[web2py] Re: response.files.append in component plugin

2013-06-27 Thread Niphlod
getscript will load the file over and over without caching it. On Thursday, June 27, 2013 10:25:10 PM UTC+2, RHC wrote: > > Thanks for your response Anthony and Niphlod. > > For the record I went with dynamically loading css and javascript as > follows: > > /* Load required css dynamically */

[web2py] Re: How to get a list of all fields in a table?

2013-06-27 Thread Niphlod
tables list = db.tables field list for table 'a_table' = db.a_table.fields On Thursday, June 27, 2013 10:30:24 PM UTC+2, Woody wrote: > > I hope the answer to this is something that's not too obvious, but I've > searched a bit and have not found an answer. I'm looking for a way to > programat

[web2py] How to get a list of all fields in a table?

2013-06-27 Thread Woody
I hope the answer to this is something that's not too obvious, but I've searched a bit and have not found an answer. I'm looking for a way to programatically get a list of all of the fields in a given table. My intention is to build a common function that will use variables for table names an

[web2py] Re: response.files.append in component plugin

2013-06-27 Thread RHC
Thanks for your response Anthony and Niphlod. For the record I went with dynamically loading css and javascript as follows: /* Load required css dynamically */ function loadcss(path) { if (document.createStyleSheet) {/* check if need to use an IE compatible method */ docum

[web2py] Re: Use model in another app

2013-06-27 Thread Niphlod
components are the most easy way. just code the grid where the models are and then LOAD it inside your other application. On Thursday, June 27, 2013 9:03:09 PM UTC+2, Tom Russell wrote: > > I have 2 apps and one I want to use the model/db from it in the other in a > SQLFORM.grid. I have read thr

Re: [web2py] Re: JQuery Issue

2013-06-27 Thread Tom Russell
I use chrome but I will have to try that. Thanks. On Thu, Jun 27, 2013 at 3:31 PM, Jim S wrote: > Do you use firefox and firebug? > > You can use the javascript console there to display to you any errors that > might be occurring in your javascript. You may have an issue earlier on in > your p

[web2py] mobile interface and web2py 2.6.0

2013-06-27 Thread Martin Weissenboeck
I have tried to use the mobile interface with web2py 2.6.0 - I think, it does not work. - "Try the mobile interface" in the admin app links to http://127.0.0.1:8000/admin/plugin_jqmobile/about - it looks strange... - Download* http://web2py.com/plugins/static/web2py.plugin.jqmobile.w2p*an

Re: [web2py] Re: JQuery Issue

2013-06-27 Thread Jim S
Do you use firefox and firebug? You can use the javascript console there to display to you any errors that might be occurring in your javascript. You may have an issue earlier on in your page (with javascript) that is preventing the execution of your stuff later on. -Jim On Thursday, June 27

[web2py] Use model in another app

2013-06-27 Thread Tom Russell
I have 2 apps and one I want to use the model/db from it in the other in a SQLFORM.grid. I have read through and googled and cannot find a way to do this. Is this possible and how? Thanks, Tom -- --- You received this message because you are subscribed to the Google Groups "web2py-users" gr

[web2py] Re: database disk image is malformed

2013-06-27 Thread greenpoise
I grabbed SQLite Manager firefox extension, did an integrity check, restarted web2py and message was no longer there..Phew..thanks. On Wednesday, June 26, 2013 2:05:06 PM UTC-7, Niphlod wrote: > > whoopsie. If that is indeed web2py's sqlite database, follow these steps > > > http://techblog.do

Re: [web2py] validate_and_insert() doesn't work for absent field

2013-06-27 Thread Anthony
> That makes sense. Thanks. And then it raises another concern: when in the > normal form situation, is it possible a user forges an http post without > several field, in order to bypass the IS_NOT_EMPTY() or whatever validator? > Is this a security vulnerability? > No, because the forged pos

Re: [web2py] Re: JQuery Issue

2013-06-27 Thread Tom Russell
So If I do something like: jAlert('This is a custom alert box', 'Alert Dialog'); and nothing shows up, could it be that the jquery lib is not being made available? On Thu, Jun 27, 2013 at 11:00 AM, Tom Russell wrote: > k thanks I will try that > > > > On Thu, Jun 27, 2013 at 10:58 AM, Jim Ste

Re: [web2py] Re: JQuery Issue

2013-06-27 Thread Tom Russell
k thanks I will try that On Thu, Jun 27, 2013 at 10:58 AM, Jim Steil wrote: > I'd try putting some alert() messages in to try to trace the flow and > check the values of variables. > > > > On Thu, Jun 27, 2013 at 9:53 AM, Tom Russell wrote: > >> Thats weird, now it will not hide the the field

Re: [web2py] Re: JQuery Issue

2013-06-27 Thread Jim Steil
I'd try putting some alert() messages in to try to trace the flow and check the values of variables. On Thu, Jun 27, 2013 at 9:53 AM, Tom Russell wrote: > Thats weird, now it will not hide the the field but has no effect either > when you check the checkbox. > > > On Thu, Jun 27, 2013 at 12:11

Re: [web2py] Re: JQuery Issue

2013-06-27 Thread Tom Russell
Thats weird, now it will not hide the the field but has no effect either when you check the checkbox. On Thu, Jun 27, 2013 at 12:11 AM, Jim S wrote: > Try this, you need brackets for your if statements in javascript. > > jQuery(document).ready(function(){ > jQuery('#no_table_mothers_name__row'

[web2py] Re: Auth registration adding a registration key with requires_approval disabled

2013-06-27 Thread Isaac Dontje Lindell
Sorry for all these self replies. I have it narrowed down to the register form. I have all the other auth forms working properly. My register form handling looks like this: if 'register' in request.args(0): # parse the referring URL to see if we can pre-populate the course_id field

Re: [web2py] Re: DAL and schema

2013-06-27 Thread Vinicius Assef
Sorry, my fault. On Thu, Jun 27, 2013 at 8:53 AM, Anthony wrote: > On Thursday, June 27, 2013 7:42:54 AM UTC-4, viniciusban wrote: >> >> See this: http://web2py.com/books/default/chapter/29/06#Inner-joins > > > He was asking about joining tables across MySQL schemas. > > -- > > --- > You received

Re: [web2py] IMPORTANT: web2py 2.6.0-development

2013-06-27 Thread Michele Comitini
I "web2py_framework.js" part of the framework is a good idea. We could have a way to access it like this in a view {{=web2py_js(version='1.0', embed=True)}} -> expanded inline {{=web2py_js(version='1.0', embed=False)}} -> a proper url is generated so that it's content can be fetched in parallel

Re: [web2py] validate_and_insert() doesn't work for absent field

2013-06-27 Thread Vinicius Assef
That's the security part of using forms: Web2py doesn't count on what is coming in the request to make a form and validate. It counts on your field definitions in form creation time. That's why we have the fields argument in SQLFORM and in SQLFORM.factory. When no field is explicitly passed, all f

[web2py] Re: Encrypting/decrypting db values

2013-06-27 Thread szimszon
+1 2013. június 25., kedd 22:23:32 UTC+2 időpontban Massimo Di Pierro a következőt írta: > > Should we include decrypt(key,data) and encrypt(key,data) in gluon.utils? > > On Tuesday, 25 June 2013 13:42:29 UTC-5, Niphlod wrote: >> >> sorry, cut&paste error. >> >> >> >> import gluon.contrib.aes as

[web2py] Re: Auth registration adding a registration key with requires_approval disabled

2013-06-27 Thread Isaac Dontje Lindell
def user(): form = auth() if 'register' in request.args(0): # parse the referring URL to see if we can prepopulate the course_id field in # the registration form ref = request.env.http_referer if ref: if '_next' in ref: ref = re

[web2py] auth, redirect after login

2013-06-27 Thread royski
hello together, my problem is , i want a simply redirect after a user is logged in. i am using the auth setup from web2py: my db.py: auth = Auth(db) auth.define_tables(username=True) auth.settings.login_next = URL('welcome') this has no effect, after a user login the index page is still

Re: [web2py] IMPORTANT: web2py 2.6.0-development

2013-06-27 Thread Richard Vézina
Maybe just a check sum on file that should be update after an upgrade could allow to display a message in admin and maybe if the files to be updated have the sum of one of the precedent file mean that the user has didn't change anything those file could be overwritten whitout issue... I would prefe

[web2py] Re: Auth registration adding a registration key with requires_approval disabled

2013-06-27 Thread Isaac Dontje Lindell
Sorry, should have specified. Version 2.4.6-stable On Thursday, June 27, 2013 1:31:14 AM UTC-5, Massimo Di Pierro wrote: > > Which web2py version? > > On Wednesday, 26 June 2013 11:16:11 UTC-5, Isaac Dontje Lindell wrote: >> >> I have this in my db.py model: >> >> ## configure auth policy >> auth.

Re: [web2py] validate_and_insert() doesn't work for absent field

2013-06-27 Thread Ray (a.k.a. Iceberg)
On Thursday, June 27, 2013 8:52:14 PM UTC+8, Anthony wrote: > > On Thursday, June 27, 2013 8:39:23 AM UTC-4, Ray (a.k.a. Iceberg) wrote: > >> Thanks for trying to help. But sorry I don't understand how your theory >> can explain why the 2nd case in my example works and 3rd case didn't. >> > > The

Re: [web2py] validate_and_insert() doesn't work for absent field

2013-06-27 Thread Anthony
On Thursday, June 27, 2013 8:39:23 AM UTC-4, Ray (a.k.a. Iceberg) wrote: > Thanks for trying to help. But sorry I don't understand how your theory > can explain why the 2nd case in my example works and 3rd case didn't. > The second case is equivalent to a form including both fields but the user

[web2py] Re: v 2.5.1 breaks GAE Cloud SQL?

2013-06-27 Thread Jonathan New
Hi Massimo, Removing the check solves the problem. Thanks, Jonathan On Thursday, June 27, 2013 8:21:49 PM UTC+8, Massimo Di Pierro wrote: > > Please check the latest trunk. Looks like the only change is that check on > reconnect attempts. For now I have removed the check, eventually it should

Re: [web2py] validate_and_insert() doesn't work for absent field

2013-06-27 Thread Ray (a.k.a. Iceberg)
Thanks for trying to help. But sorry I don't understand how your theory can explain why the 2nd case in my example works and 3rd case didn't. On Thursday, June 27, 2013 7:45:48 PM UTC+8, viniciusban wrote: > > I think this is expected, because the field.requires property exists > to be executed

[web2py] Re: I cannot get track_changes to work

2013-06-27 Thread jc
Thanks for your reply. I was on version 2.2.1, I have upgraded to trunk and it now works. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr.

[web2py] Re: v 2.5.1 breaks GAE Cloud SQL?

2013-06-27 Thread zheng ming new
In DAL of the version 2.5.1, line 598 to 600, the code checks for self.driver but in the case of using GAE, the GoogleSQLAdapter does not set that variable which causes it to fail. Version 2.4.6 does not check for self.driver therefore it works. On Thursday, June 27, 2013 4:21:41 PM UTC+8, Jo

[web2py] Re: v 2.5.1 breaks GAE Cloud SQL?

2013-06-27 Thread Massimo Di Pierro
Please check the latest trunk. Looks like the only change is that check on reconnect attempts. For now I have removed the check, eventually it should be moved somewhere else. Can you confirm this fixes the problem? On Thursday, 27 June 2013 06:00:08 UTC-5, Jonathan New wrote: > > Hi Massimo, >

Re: [web2py] Re: DAL and schema

2013-06-27 Thread Anthony
On Thursday, June 27, 2013 7:42:54 AM UTC-4, viniciusban wrote: > See this: http://web2py.com/books/default/chapter/29/06#Inner-joins > He was asking about joining tables across MySQL schemas. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" gr

Re: [web2py] validate_and_insert() doesn't work for absent field

2013-06-27 Thread Vinicius Assef
I think this is expected, because the field.requires property exists to be executed in forms and validate_and_insert() only simulates this behaviour. On Thu, Jun 27, 2013 at 7:30 AM, Ray (a.k.a. Iceberg) wrote: > Hi community, > > I'm working with web2py, again. :-) > > It took me hours today to

Re: [web2py] Re: DAL and schema

2013-06-27 Thread Vinicius Assef
See this: http://web2py.com/books/default/chapter/29/06#Inner-joins On Thu, Jun 27, 2013 at 7:45 AM, mcamel wrote: > Hi, > > I have the same problem with a legacy MySQL database. > > We have different Schemas and need to use plenty of JOINs of tables from > different Schemas. I've couldn't find a

[web2py] Re: v 2.5.1 breaks GAE Cloud SQL?

2013-06-27 Thread Jonathan New
Hi Massimo, Removing lines 598 to 600 from dal.py allows connection to cloud sql normally. Migration also works as normal. Would there be any potential issues we might face with these lines removed? Regards, Jonathan What is the potential impact of removing On Thursday, June 27, 2013 6:02:1

Re: [web2py] Re: DAL and schema

2013-06-27 Thread mcamel
Hi, I have the same problem with a legacy MySQL database. We have different Schemas and need to use plenty of JOINs of tables from different Schemas. I've couldn't find any solution for this in the documentation, so the only way i've found is writing the SQL of my own, like in: SELECT b.seria

[web2py] validate_and_insert() doesn't work for absent field

2013-06-27 Thread Ray (a.k.a. Iceberg)
Hi community, I'm working with web2py, again. :-) It took me hours today to realize validate_and_insert(field1=value1, field3=value3, ...) only works for the fields appears, but not for those absent. Is this a expected behavior or is it considered a bug? See example. # -*- coding: utf-8 -*- d

[web2py] Re: v 2.5.1 breaks GAE Cloud SQL?

2013-06-27 Thread Jonathan New
Hi Massimo, My colleague discover that in the DAL of version 2.5.1, line 598 to 600, the reconnect function checks for self.driver. However, in the case of GAE, it uses GoogleSQLAdapter which does not set the self.driver since it uses rdbms.connect as the connector causing the reconnect functio

[web2py] Re: v 2.5.1 breaks GAE Cloud SQL?

2013-06-27 Thread Jonathan New
2.4.6 works properly for me. But changing gluon to either 2.4.7 or 2.5.1, the "Skipping connection since there's no driver" will appear. I just tried the gluon from the master branch (2.6). Same issue. My GAE SDK is 1.8.1 On Thursday, June 27, 2013 4:15:21 PM UTC+8, Massimo Di Pierro wrote: >

[web2py] Re: v 2.5.1 breaks GAE Cloud SQL?

2013-06-27 Thread Massimo Di Pierro
What you upgrading from? I cannot think of any change that would cause this. On Thursday, 27 June 2013 02:28:38 UTC-5, Jonathan New wrote: > > After upgrading Web2py to 2.5.1, it can't connects to Google's CloudSQL. > > The message from the log is > dal.py:599] Skipping connection since there's

[web2py] v 2.5.1 breaks GAE Cloud SQL?

2013-06-27 Thread Jonathan New
After upgrading Web2py to 2.5.1, it can't connects to Google's CloudSQL. The message from the log is dal.py:599] Skipping connection since there's no driver. dal.py:4926] 1 Reverting gluon back to 2.4.6 (the version we did our development on) works. Is there any changes on the connection stri

[web2py] Re: Adding custom operators to DAL

2013-06-27 Thread Calvin
Thanks for the clarification but in any case, I thought it was Google acting up! -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googl

[web2py] Re: Stop menu from collapsing

2013-06-27 Thread James Burke
Good to know. =) -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/gr

[web2py] Re: Stop menu from collapsing

2013-06-27 Thread Massimo Di Pierro
I would like to know it too. It should only happen when detecting a mobile device. On Thursday, 27 June 2013 01:57:44 UTC-5, James Burke wrote: > > Hi, > > Is it possible to stop the menu from collapsing into a button when the > window width is resized smaller? > > Or do I have to start from scr