[web2py] Not good at making ajax calls from a view

2013-05-10 Thread Jordan Ladora
Hi, I'm trying to implement a drop-down based on the one at http://www.web2pyslices.com/slice/show/1467/cascading-drop-down-lists-with-ajax While the example above works great, I don't seem to be making a successful ajax call in my adaptation.. Basically, the second dropdown does not reload

[web2py] Re: Not good at making ajax calls from a view

2013-05-11 Thread Jordan Ladora
That did it - thanks! On Friday, May 10, 2013 12:36:54 PM UTC-7, Anthony wrote: > > Maybe try: > > onchange="{{="jQuery(district_select).remove(); ajax('%s', > ['title_select'], 'shadow_clone');" % URL('default', 'maker')}}" > > Anthony > > -- --- You received this message because you are s

[web2py] Re: Not good at making ajax calls from a view

2013-05-14 Thread Jordan Ladora
One follow up question-- normally in my controller I would use a SQLFORM object, e.g. one named 'form' and then use: if form.accepts(request.vars, session): ...to execute code after getting validated form data. I could look for the newly created variables in request.vars or is there a better

[web2py] Checking if db query was successful

2013-06-04 Thread Jordan Ladora
Hi, If I set up a query like so, q1 = auth.accessible_query('read', db.stuff) q2 = db.stuff.id==3 selected_record = db(q1&q2).select().first() # how to check if this successfully got db record? selected_records = db(q1&q2).select()# how to check if this successfu

[web2py] Re: Checking if db query was successful

2013-06-05 Thread Jordan Ladora
Thanks - what about with selected_records = db(q1&q2).select() ..should I use if len(selected_records): ..if no records are returned? Thanks again, -jl -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group

[web2py] Can't access databases after copying files to new application

2013-06-05 Thread Jordan Ladora
Hello, I just copied a bunch of files from an existing project to a new, empty project, and cannot access any databases, even though the application/databases folder is fully populated (sqlite). When I launched the new application and registered as a new user, all the 'auth_' databases are em

[web2py] Re: Can't access databases after copying files to new application

2013-06-05 Thread Jordan Ladora
The new application was created from the main menu ('New Simple Application'). Then I copied the models, views, and controllers into the new app. The sql.log file in the new app/databases folder shows the tables were created from the models just fine. But I have no access to anything in any t

[web2py] Re: Can't access databases after copying files to new application

2013-06-05 Thread Jordan Ladora
Ah my bad - thanks!! -- --- 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

[web2py] jQuery bug in view. Trying to show/hide a textbox based on a checkbox being checked.

2013-06-21 Thread Jordan Ladora
Hi, I have a jQuery script in a view. It has a bug as it's not working (textbox always shown). I think my syntax in the if statement is wrong.. here it is- jQuery(document).ready( function() { if( jQuery('#cnd').prop('checked', true) ); { jQuery('#nnd').show(); } else

[web2py] Chopping up form fields in the view

2013-06-24 Thread Jordan Ladora
Hello, I have a form where I want to manipulate a couple of extra elements *separately* in the view. I'd like to be able to wrap them in a separate element so they are physically on the page somewhere else and not together with the other form fields. In the controller- form = SQLFORM.f

[web2py] Re: Chopping up form fields in the view

2013-06-24 Thread Jordan Ladora
Hi Anthony, Thanks for the note - what prevented me from making the custom layout is that the form fields are generated on the fly; I don't know what they are or how many up front (there are hundreds or thousands of fields generated for this form), so inserting them separately seems tricky(?)

[web2py] How to set permissions for db table loaded from flat file

2013-07-01 Thread Jordan Ladora
Hi, >From a file, I'm loading a table that I would like to make accessible to any logged in user.. Here's the model- db.define_table('man', Field('fieldname1', requires=IS_NOT_EMPTY(), label="fieldname1"), Field('fieldname2', requires=IS_NOT_EMPTY(), label="fieldname2"), Field('id1

[web2py] Re: How to set permissions for db table loaded from flat file

2013-07-02 Thread Jordan Ladora
;) r = db.man.insert(fieldname1=fieldname1, fieldname2=fieldname2, id1=id1, id2=id2) auth.add_permission(1, 'read', r.id) db.commit() ...I get a ticket w/ 'DAL' object has no attribute 'auth_permission' > > On Monday, J

Re: [web2py] Re: How to set permissions for db table loaded from flat file

2013-07-03 Thread Jordan Ladora
Hi Alan, Thanks for the help! For some reason, I did not have 'auth.define_tables()' in the model. Adding it fixed the problem. Thanks again! -jl -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop re

Re: [web2py] jQuery bug in view. Trying to show/hide a textbox based on a checkbox being checked.

2013-07-25 Thread Jordan Ladora
table_cnd').attr('checked') ); jQuery('#no_table_nnd__row').show(); else jQuery('#no_table_nnd__row').hide();}); }); But still the input box stays visible regardless of the status of the checkbox.. :( Any help would be greatly appreciated.

Re: [web2py] jQuery bug in view. Trying to show/hide a textbox based on a checkbox being checked.

2013-07-25 Thread Jordan Ladora
ieve property values, while .attr() retrieves attributes. > > > Therefore, you should replace .attr() with .prop() if you are using a > recent version of jQuery > > > > Il giorno giovedì 25 luglio 2013 21:05:36 UTC+2, Jordan Ladora ha scritto: >> >> Hi, >> >

Re: [web2py] jQuery bug in view. Trying to show/hide a textbox based on a checkbox being checked.

2013-07-25 Thread Jordan Ladora
x27;#no_table_cnd').change(function(){ > if( jQuery('#no_table_cnd').prop('checked') ){ > > jQuery('#no_table_nnd__row').show(); > }else{ > jQuery('#no_table_nnd__row').hide();}; > }); > });

[web2py] jquery .hide() interfering with validators

2013-08-10 Thread Jordan Ladora
I have a SQLFORM.factory form that has multiple fields, one hidden by default in the view (via jquery) and shown when another field, a dropdown select, changes to some value. In the code below, field_A is shown if field_B 'Choice 2' is selected. The problem is that fields (eg field_A) which are sh

[web2py] Testing if db insert was successful

2013-08-10 Thread Jordan Ladora
Hi, I'm unable to figure out how to check when a simple db insert() was successful. In my code below, regardless of whether the db insert is successful or not, the code after 'if new_record:' always executes.. new_record = db.abc.insert(a='this', b='that', c='theotherthing') if new_record:

[web2py] Re: Testing if db insert was successful

2013-08-10 Thread Jordan Ladora
Oops my bad - unrelated problem caused this - please disregard. o: Thanks. On Saturday, August 10, 2013 8:07:17 AM UTC-7, Jordan Ladora wrote: > > Hi, > > I'm unable to figure out how to check when a simple db insert() was > successful. In my code below, regardless of w

Re: [web2py] Re: Testing if db insert was successful

2013-08-11 Thread Jordan Ladora
t; > > On Saturday, 10 August 2013 17:07:17 UTC+2, Jordan Ladora wrote: >> >> Hi, >> >> I'm unable to figure out how to check when a simple db insert() was >> successful. In my code below, regardless of whether the db insert is >> s

[web2py] Re: jquery .hide() interfering with validators

2013-08-15 Thread Jordan Ladora
A I see - it works perfectly now - thanks very much for your help!! -j -- --- 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

[web2py] jQuery help with form and page reload on button click

2013-08-19 Thread Jordan Ladora
Hi, I'm trying to make div's in a view sortable. I initially tried jQuery('div *').sortable() ..with no luck, and then tried the code below, using up and down buttons. They work to move the content in the divs up or down, but clicking them also causes form submission and page reload. I'm sur

[web2py] Re: jQuery help with form and page reload on button click

2013-08-20 Thread Jordan Ladora
clicked. Not sure how to modulate this behavior.. On Monday, August 19, 2013 12:43:00 PM UTC-7, Jordan Ladora wrote: > > Hi, > > I'm trying to make div's in a view sortable. I initially tried > > jQuery('div *').sortable() > > ..with no luck, and then tri

[web2py] jQuery and custom form giving unwanted form submit

2013-08-28 Thread Jordan Ladora
Hi all, I initially noticed the problem of unwanted form submits when trying to make elements from a custom form sortable w/ jquery, but the problem extends further.. I first posted the problem here - https://groups.google.com/forum/?fromgroups=#!topic/web2py/rPHKPqqHbsg It also happens when

[web2py] Custom form with jquery acts weird

2013-09-17 Thread Jordan Ladora
Hi, I have the same problem as https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/E9RyEqh01RQ/6duW4RmALvcJ >From the first thread/link abov

[web2py] Re: Custom form with jquery acts weird

2013-09-20 Thread Jordan Ladora
Ahhh f*ck it, then... On Tuesday, September 17, 2013 12:15:01 PM UTC-7, Jordan Ladora wrote: > > Hi, > > I have the same problem as > > > https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ > > http

[web2py] Re: Custom form with jquery acts weird

2013-09-27 Thread Jordan Ladora
ember 17, 2013 12:15:01 PM UTC-7, Jordan Ladora wrote: > > Hi, > > I have the same problem as > > > https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ > > https://groups.google.com/forum/?fromgroups

[web2py] Re: Custom form with jquery acts weird

2013-09-28 Thread Jordan Ladora
t; change? > > Anthony > > On Friday, September 27, 2013 9:00:47 PM UTC-4, Jordan Ladora wrote: >> >> Hi Massimo, >> >> Thanks for your help. I think I'm crystal clear on your explanation >> regarding the button, but I'm still confused on

[web2py] Re: Custom form with jquery acts weird

2013-09-28 Thread Jordan Ladora
Thanks for that - I'd assumed the button in the form was related, but let me try and isolate the other problem and make another app that reproduces it. On Saturday, September 28, 2013 10:09:58 AM UTC-7, Anthony wrote: > > > form=crud.create(db.comments) >> if form.process().accepted >> > > Rig

[web2py] Change name of file inserted via upload field at download time

2013-10-15 Thread Jordan Ladora
Hello, I've got a table with files inserted into an upload field. Downloading works fine when I pass the file path to the default download controller. {{=A('Download', _href=URL('default', 'download', args=download_path))}} However, I'd like the user to be able to change only the name of th

[web2py] Re: Change name of file inserted via upload field at download time

2013-10-15 Thread Jordan Ladora
Awesome - thanks, Anthony! > -- 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 Google Groups

[web2py] Re: Change name of file inserted via upload field at download time

2013-10-15 Thread Jordan Ladora
hlod wrote: > > You're using an old version of web2py :D > > On Tuesday, October 15, 2013 11:40:55 PM UTC+2, Jordan Ladora wrote: >> >> Err.. I get an unknown parameter error for the 'download_filename' .. >> looking into globals.py I see >> >&

[web2py] Re: Change name of file inserted via upload field at download time

2013-10-16 Thread Jordan Ladora
October 15, 2013 8:21:42 PM UTC-7, Anthony wrote: > > We need to see more code -- maybe your model and the code that generates > the value of download_path. response.download() will return a 404 if the > filename is not of the right format, it can't find the table/field, or it

[web2py] Re: Change name of file inserted via upload field at download time

2013-10-16 Thread Jordan Ladora
404 error. As you can see, when I add the >> 'download_filename' arg, a new path is generated with the desired filename >> appended to the path, which doesn't seem to make sense. >> >> Thanks again for your help. Let me know if there is any more info I can >&

[web2py] Running google visualization js in a LOAD component

2014-01-18 Thread Jordan Ladora
Example from https://google-developers.appspot.com/chart/interactive/docs/gallery/combochart If I place this code in a standard .html view, it works fine- jQuery(document).ready(function() { setTimeout(function() { // Google Visualization stuff goes here function drawVisualization()

[web2py] Re: Running google visualization js in a LOAD component

2014-02-20 Thread Jordan Ladora
Thanks for your help!!! -- 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 Google Groups "web2py

[web2py] Re: Convert languages.lazyT object to string

2018-02-12 Thread Jordan Ladora
ny wrote: > > On Thursday, February 8, 2018 at 2:49:52 PM UTC-5, Jordan Ladora wrote: >> >> Trying to get this to work but not getting anywhere- >> >> *from gluon import languages # EDITED from '* >> >> *from gluon import *'abc = languages.lazyT("

[web2py] postgres not making new table in model

2018-02-12 Thread Jordan Ladora
I've got a postgres server running which has been working fine the last month or so with no issues. I just added a new table in a model but cannot get the migration to work. Everything was updated correctly in the databases folder after doing this, and I've got migrate=True ...in all my tab

Re: [web2py] Re: session var in table decimal field throws error on postgres

2018-02-26 Thread Jordan Ladora
import anything from modules into a model before (just controllers) but wanted to mention it in case someone else does this. Thanks again. On Thursday, February 1, 2018 at 4:08:02 PM UTC-7, Anthony wrote: > > On Thursday, February 1, 2018 at 4:53:59 PM UTC-5, Jordan Ladora wrote: &g

Re: [web2py] Re: session var in table decimal field throws error on postgres

2018-02-27 Thread Jordan Ladora
py/applications/init/modules')* ...and the import is fine. On Monday, February 26, 2018 at 5:52:47 PM UTC-7, Anthony wrote: > > On Monday, February 26, 2018 at 5:29:46 PM UTC-5, Jordan Ladora wrote: >> >> Forgot to reply to this earlier but I ended up putti

[web2py] selinux users and roles for homemade task queue

2018-02-27 Thread Jordan Ladora
Hi, I have user apache running w2p, and this user cannot log in, has no directory, etc. I also set selinux user mapping for apache on creation to further limit what it can do. ie- *useradd -s /sbin/nologin -d /dev/null -c 'apache webserver' -Z user_u apache* ...and I use apache to also start

[web2py] Big file uploads not always inserting into db with sqlite/rocket

2018-10-10 Thread Jordan Ladora
Hi! I just noticed that uploading files up to around 120mb using a simple form (crud.create) and model works reliably using the default setup on linux (sqlite and rocket). But when trying to upload files around 500mb, while the file always goes correctly to the upload folder, the db insert only

[web2py] Re: Big file uploads not always inserting into db with sqlite/rocket

2018-10-10 Thread Jordan Ladora
the limitations of rocket, so I won't sweat it. ;) -jl On Wednesday, October 10, 2018 at 3:41:29 PM UTC-6, Dave S wrote: > > > > On Wednesday, October 10, 2018 at 9:31:04 AM UTC-7, Jordan Ladora wrote: >> >> Hi! >> >> I just noticed that uploading fi

[web2py] .tar.gz files get renamed to .gz on upload

2018-11-19 Thread Jordan Ladora
Hi, This is kind of a bug and kind of a feature, and I presume it would happen with any two-part file extension. When I upload a .tar.gz file into my app, w2p appropriately renames the file preserving the extension, but the problem is, w2p assumes the extension is .gz and not the entire .tar.

[web2py] jQuery select form items based on name startswith...

2014-07-01 Thread Jordan Ladora
Hi, I'm trying to make a button that will check some boxes in a form based on the checkboxes' name attributes. But I can't get this to work- Deselect All I'm basing it off http://api.jquery.com/attribute-starts-with-selector/ I've tried a few different things but cannot get it to do anyth

Re: [web2py] Re: jQuery select form items based on name startswith...

2014-07-01 Thread Jordan Ladora
gt; 3rd rule: use the quotes! you are terribly wrong with those > 3rd rule: simplify the code, then expand. > > $('#div2 button').on('click', function() { >console.log($("input[name^='something'")) > }) > > > On Tuesday, July 1,

[web2py] Simple dropdown animated menu

2014-12-12 Thread Jordan Ladora
I have a table of links that I would like to have more compactly stored in a dropdown menu. I tried a js script from a book in my views to try and get a menu that drops down on mouser hover, like the default response.menu in menu.py, but I'm not getting the animation, similar to calling the MENU

[web2py] Handling spaces in filename with response.stream

2014-12-18 Thread Jordan Ladora
I'm using response.stream, like - response.stream(open(file_path, 'r'), attachment=True, chunk_size=4096, filename='abc def ghi.txt') When there is a space in the filename, I get a downloaded file with a name that is the first part split on ' ', same as calling filename.split(' ')[0]. For e

Re: [web2py] Re: Handling spaces in filename with response.stream

2014-12-19 Thread Jordan Ladora
Hi Leonel, Yes. that fixed it - thanks very much for your help. -j On Thu, Dec 18, 2014 at 10:52 AM, Leonel Câmara wrote: > > I think this is a bug in Response.stream it does this: > > headers["Content-Disposition"] = \ > "attachment;filename=%s" % attname > > When i

[web2py] Update a session variable from a module

2015-04-09 Thread Jordan Ladora
I've got some code (currently in a file in models) where default session settings are set from a db record- def init_settings(db_record): session.timezone = db_record.timezone etc. The problem is that I want to move this code into a module for production, but don't know how to update 'session'

[web2py] Running register_onaccept code when registration is disabled

2015-04-08 Thread Jordan Ladora
Following the example in the book, I use in db.py- def give_create_permission(form): group_id = auth.id_group('user_%s' & auth.user_id) auth.add_permission(group_id, 'read', db.comment) auth.settings.register_onaccept = give_create_permission ...but what to do when you also have- auth.setti

[web2py] 'validate_and_insert' throws error each time on latest version where it was fine before on prev version

2017-06-01 Thread Jordan Ladora
Hello, I just belatedly upgraded from 8/9/15 (v2.12.2-stable) -> 5/10/16 (v2.14.6-stable) and have about 100 instances of 'validate_and_insert' in my application. My app was previously (with 8/9/15 version) running these instances of 'validate_and_insert' A-OK but now, basically every instance of

[web2py] Re: 'validate_and_insert' throws error each time on latest version where it was fine before on prev version

2017-06-02 Thread Jordan Ladora
g has been upgraded, incl pydal. -j On Friday, June 2, 2017 at 5:56:11 AM UTC-6, Anthony wrote: > > How did you upgrade? Is it possible you did not upgrade PyDAL or get its > proper version? > > Anthony > > On Thursday, June 1, 2017 at 11:00:11 PM UTC-4, Jordan Ladora w

Re: [web2py] Re: 'validate_and_insert' throws error each time on latest version where it was fine before on prev version

2017-06-03 Thread Jordan Ladora
Yes, I was able to reproduce with a fresh install of web2py- Here's what I did- - extracted new copy of web2py from DL src modified welcome app- in models/db.py commented out this block- if not request.env.web2

Re: [web2py] Re: 'validate_and_insert' throws error each time on latest version where it was fine before on prev version

2017-06-05 Thread Jordan Ladora
fields (I would consider it a bug). > > Anthony > > > On Saturday, June 3, 2017 at 2:17:31 PM UTC-4, Jordan Ladora wrote: > >> Yes, I was able to reproduce with a fresh install of web2py- >> >> Here's what I did- >> -

[web2py] Re: Login page - Menu bar does not work

2017-06-06 Thread Jordan Ladora
I notice the same problem. Using firefox, the js console reveals that web2py-bootstrap3.js is trying to call the function "web2py.validate_entropy", which is in web2py.js, but cannot find it. The error is: * ReferenceError: web2py is not defined. * (line 14, posn 7 of web2py-bootstrap3.js).

Re: [web2py] Re: 'validate_and_insert' throws error each time on latest version where it was fine before on prev version

2017-06-06 Thread Jordan Ladora
latest version that said validate_and_insert would not work if no fields were set, like in the '## no fields-' example I posted on 6/3, so maybe this is due to something else I have e.g. in db.py... On Monday, June 5, 2017 at 10:43:16 AM UTC-6, Anthony wrote: > > On Monday, June 5, 2017

Re: [web2py] Re: Login page - Menu bar does not work

2017-06-07 Thread Jordan Ladora
y, June 6, 2017 at 4:13:26 PM UTC-4, Jordan Ladora wrote: >>> >>> I notice the same problem. >>> >>> Using firefox, the js console reveals that web2py-bootstrap3.js is >>> trying to call the function "web2py.validate_entropy", which is in >&

[web2py] Custom js popup confirmation not working

2017-06-15 Thread Jordan Ladora
Hello, I'm trying to get a custom js confirmation popup working. This is pretty much verbatim from the 2nd answer at - https://stackoverflow.com/questions/887029/how-to-implement-confirmation-dialog-in-jquery-ui-dialog When I add this code below to the view, this kills the rest of the js on th

[web2py] What does wikimenu do?

2017-08-30 Thread Jordan Ladora
The welcome app models/menu.py has the lines- if "auth" in locals(): auth.wikimenu ...but I can't find anything here or in the book about what the wikimenu does? I have this commented out and all seems to be fine. Sorry if this is a silly question; just wondering.. Thanks! -- Resources:

Re: [web2py] Re: What does wikimenu do?

2017-08-30 Thread Jordan Ladora
ub.com/web2py/web2py/blob/master/gluon/tools.py#L4228. > > It simply adds wiki menu items to response.menu. > > Anthony > > On Wednesday, August 30, 2017 at 11:25:43 AM UTC-4, Jordan Ladora wrote: >> >> The welcome app models/menu.py has the lines- >> >> if &quo

[web2py] Basic question about app compile

2017-09-20 Thread Jordan Ladora
Hi, I was just wondering how the folder layout works when byte compiling an app. I was trying some things on the basic Welcome app to try and sort it out. After compiling the Welcome app, I tried two things. I moved out the source files from the controllers, models, and views folders, and eith

[web2py] Re: Basic question about app compile

2017-09-21 Thread Jordan Ladora
I run scripts/make_min_web2py.py & there's no admin. Thanks again, -j On Wednesday, September 20, 2017 at 1:14:22 PM UTC-6, Jordan Ladora wrote: > > Hi, > > I was just wondering how the folder layout works when byte compiling an > app. I was trying some things on the basic

Re: [web2py] Re: 'validate_and_insert' throws error each time on latest version where it was fine before on prev version

2017-09-21 Thread Jordan Ladora
My bad - I was confused there. Forgot to post this earlier, but you were totally right; it's only happening when not logged in. Thanks again for your patience & help. -j On Tuesday, June 6, 2017 at 2:41:56 PM UTC-6, Jordan Ladora wrote: > > Thank you for checking that. >

[web2py] Re: Basic question about app compile

2017-09-21 Thread Jordan Ladora
i see- thanks! On Thursday, September 21, 2017 at 10:10:27 AM UTC-6, Anthony wrote: > > On Thursday, September 21, 2017 at 11:25:38 AM UTC-4, Jordan Ladora wrote: >> >> >> Thank you both very much for the help. I didn't find that thread you >> mentioned, A

[web2py] How to use auth mailer with commercial service?

2017-12-12 Thread Jordan Ladora
Hi, How can I have the w2p default mailer use a commercial service, in my case, AWS SES via boto? I've got these lines in a model and would like to have w2p send verification & reset password emails via boto- *mail = auth.settings.mailer* *mail.settings.server = ...* *mail.settings.server = ..

Re: [web2py] Re: How to use auth mailer with commercial service?

2017-12-12 Thread Jordan Ladora
gt; boto3.client('ses', ...).send(...) > > Then either: > > auth = Auth(..., mailer=ses_mailer) > > or after defining auth: > > auth.settings.mailer = ses_mailer > > Anthony > > > On Tuesday, December 12, 2017 at 11:40:06 AM UTC-5, Jordan Ladora wrot

[web2py] session var in table decimal field throws error on postgres

2017-12-28 Thread Jordan Ladora
Hi, I'm using postgres and have a table- db.define_table('volumes', Field('vol', 'decimal(100, session.decplaces)', default=0, readable=False, writable=False), auth.signature, migrate=True, ) I have the session var declared before the table- session.decplaces = 7 but I keep throwi

[web2py] Re: session var in table decimal field throws error on postgres

2017-12-29 Thread Jordan Ladora
that. -jl On Thursday, December 28, 2017 at 3:18:41 PM UTC-7, Anthony wrote: > > On Thursday, December 28, 2017 at 11:22:25 AM UTC-5, Jordan Ladora wrote: >> >> Hi, >> >> I'm using postgres and have a table- >> >> db.define_table('volu

Re: [web2py] Re: session var in table decimal field throws error on postgres

2018-02-01 Thread Jordan Ladora
. from your example above, how could a compiled module access the DECPLACES global variable? Cheers, j On Fri, Dec 29, 2017 at 4:14 PM, Anthony wrote: > On Friday, December 29, 2017 at 12:38:24 PM UTC-5, Jordan Ladora wrote: >> >> Brilliant - thank you very much for the thoughtful

[web2py] Convert languages.lazyT object to string

2018-02-08 Thread Jordan Ladora
Trying to get this to work but not getting anywhere- *from gluon import *abc = languages.lazyT("abc")str(abc)abc.read()*...etc. keeps throwing- *AttributeError: 'NoneType' object has no attribute 'translate'* I have a library that expects a basestring object but w2p in that context retur

Re: [web2py] Re: How to use auth mailer with commercial service?

2018-02-08 Thread Jordan Ladora
And then in the model- auth.settings.mailer = ses_mailer() Thanks again for the help, Anthony. -j On Tuesday, December 12, 2017 at 11:32:07 AM UTC-7, Jordan Ladora wrote: > > Cool! Thanks Anthony, I will try that. > > > > On Tue, Dec 12, 2017 at 11:02 AM, Anthony wrote: &

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Jordan Ladora
Hi, I'm actually not trying to use it directly- I'm trying to convert a lazyT object (which is passed as email message text to make a reset password link by gluon/tools.py line 3637 in latest release) to a string bc I have an outside library (boto3) that expects a parameter (text of an email me

[web2py] Re: Routes.py - Remove Application prefix

2015-08-09 Thread Jordan Ladora
I was wondering how to also incorporate routing any asp/jsp/php requests to the jammer app in this example? Can you add it to routes_in? eg- routes_in = ( ('/admin/$anything', '/admin/$anything'), ('/$anything', '/init/$anything'), ('.*.(php|PHP|asp|ASP|jsp|JSP)','jammer/default/jam'), ) I