Re: [web2py] Possible to do secondary, ternary..., n-ary orderby in grid?

2013-08-20 Thread Lamps902
Awesome - thanks! On Tuesday, August 20, 2013 8:57:21 AM UTC-5, Jonathan Lundell wrote: > > On 20 Aug 2013, at 6:45 AM, Lamps902 > > wrote: > > Is it possible to do a ranked/n-ary/sequenced orderby in SQLFORM.grid? For > example, let's say you list user information

[web2py] Possible to do secondary, ternary..., n-ary orderby in grid?

2013-08-20 Thread Lamps902
Is it possible to do a ranked/n-ary/sequenced orderby in SQLFORM.grid? For example, let's say you list user information in a grid, which includes first name, last name, and middle name. It's possible to use orderby to order the users by last name. Is it possible to order by last name, then firs

[web2py] Re: Values in request.vars persist/doubled when form submitted after unexpected logout/session deletion

2013-08-09 Thread Lamps902
for letter in letters_set.select(orderby=~ db.t_letters.created_on)], _class = 'letter_thread_container__div', ) return dict(letter_board = letters_board__div, create_letter_panel = ''

[web2py] Re: Manually creating multiple buttons to be used with SQLFORM.grid's 'selectable' parameter

2013-08-07 Thread Lamps902
Nevermind. Took care of it by creating a series of images to be used as buttons, and using jquery to append a hidden var specifying to which function the redirect should go, and to submit the form contained within the grid. > -- --- You received this message because you are subscribed to th

[web2py] Manually creating multiple buttons to be used with SQLFORM.grid's 'selectable' parameter

2013-08-07 Thread Lamps902
I am attempting to create multiple buttons for an SQLFORM.grid which, upon being click, will have the effect of redirecting data selected in the grid's checkboxes to other controller functions. The code is something like the following: def redirect_func(x): if request.vars.action == 'act

[web2py] Re: Values in request.vars persist/doubled when form submitted after unexpected logout/session deletion

2013-08-07 Thread Lamps902
_next parameter in the URL on a > redirect to login. Does your form happen to be a GET form rather than a > POST form? > > Anthony > > On Tuesday, August 6, 2013 10:21:06 PM UTC-4, Lamps902 wrote: >> >> I have a controller function which is protected by a standard >>

[web2py] Re: Values in request.vars persist/doubled when form submitted after unexpected logout/session deletion

2013-08-07 Thread Lamps902
redirect to login. Does your form happen to be a GET form rather than a > POST form? > > Anthony > > On Tuesday, August 6, 2013 10:21:06 PM UTC-4, Lamps902 wrote: >> >> I have a controller function which is protected by a standard >> authentication decorator (&q

[web2py] Values in request.vars persist/doubled when form submitted after unexpected logout/session deletion

2013-08-06 Thread Lamps902
I have a controller function which is protected by a standard authentication decorator ("@auth.requires_login()"). The function presents a page containing some forms (which contain a bunch of INPUTS() of _type = 'hidden' and one INPUT(_type = 'image', which presents the submission button). If

[web2py] Re: Rendering image buffer with IMG() helper?

2013-07-15 Thread Lamps902
t -- you cannot embed it in the original HTML > page that is returned. > > Anthony > > On Monday, July 8, 2013 3:43:22 PM UTC-4, Lamps902 wrote: >> >> Maybe I'm a bit confused on how to generate/stream the image, given the >> buffer. The follow

[web2py] Re: Rendering image buffer with IMG() helper?

2013-07-08 Thread Lamps902
Maybe I'm a bit confused on how to generate/stream the image, given the buffer. The following should work, right? def render_image(): return Image.open(request.vars.image_buffer) ... img_buffer = io.BytesIO() pylab.savefig(img_buffer, format = 'png') img_buffer.seek(0)Enter code here... retu

[web2py] Re: Rendering image buffer with IMG() helper?

2013-07-08 Thread Lamps902
" attribute of an image element should be a URL where > the browser can request the image. You cannot pass an actual image file > object to the helper. > > Anthony > > On Monday, July 8, 2013 1:38:56 PM UTC-4, Lamps902 wrote: >> >> I'm attempt

[web2py] Rendering image buffer with IMG() helper?

2013-07-08 Thread Lamps902
I'm attempting to do the following: img_buffer = io.BytesIO() pylab.savefig(img_buffer, format = 'png') img_buffer.seek(0) IMG(_src=img_buffer, _alt = 'image buffer not displaying') This shows the _alt message. Any ideas on how to get it to show the image? Thanks. -- --- You received this m

[web2py] Possible to use pylab for visualization in web2py environment?

2013-07-08 Thread Lamps902
Is it possible to use pylab in web2py to generate a visualization? Something along these lines: import pylab x, y = ... pylab.plot(x,y) pylab.show() Doing so produces this error: "no display name and no $DISPLAY environment variable " Thank you. -- --- You received this message because yo

[web2py] Re: using "_after_delete" callback when enable_record_versioning() is used

2013-06-11 Thread Lamps902
user table, result in a "list index out of range" error (I guess I can't access the object as a result of is_active being set to False?). On Monday, June 10, 2013 10:31:24 PM UTC-5, Anthony wrote: > > Can you use the _after_update callback instead? > > On Monday, Jun

[web2py] Re: Key/constraint issue when using separate database for archiving

2013-06-10 Thread Lamps902
al if you don't archive also the "referenced" > table. > However, smart people should take that into account in their own code, so > I think it can be a "safe thing to do". > > On Monday, June 10, 2013 5:56:09 PM UTC+2, Lamps902 wrote: >> >&

[web2py] using "_after_delete" callback when enable_record_versioning() is used

2013-06-10 Thread Lamps902
When enable_record_versioning is being utilized, db rows aren't actually deleted, but the "is_active" bit is flipped off instead. As far as I can tell, this means that the _after_delete callback for a given table won't be called, which is problematic when you are using this callback to delete/f

[web2py] Key/constraint issue when using separate database for archiving

2013-06-10 Thread Lamps902
I've asked this one before, but didn't get an answer; perhaps I was being too vague, so I'll give it another shot with more detail: I've got a primary postgresql database (db1), and I've set up a separate postgresql database (db1_archive) used for archiving several of the tables from db1. Th

[web2py] Re: Rendering null values in SQLFORM.grid

2013-06-10 Thread Lamps902
7;t care for the difference, set a default='' on the > interested fields. > > Il giorno lunedì 10 giugno 2013 15:42:21 UTC+2, Lamps902 ha scritto: >> >> If there's a NULL value in my postgresql DB, SQLFORM.grid renders it as >> "None". Is it ther

[web2py] Rendering null values in SQLFORM.grid

2013-06-10 Thread Lamps902
If there's a NULL value in my postgresql DB, SQLFORM.grid renders it as "None". Is it there something that can be done globally for an SQLFORM.grid that would simply make it display all NULL values as an empty string (i.e. not display anything in the grid for NULLs), or does that have to be det

[web2py] Re: Removing Foreign Key constraint?

2013-06-06 Thread Lamps902
To clarify, due to the SQL Foreign Key constraint (which is retained when archive tables are created through auth.enable_record_versioning), some of the archive database's tables still retain an association with the auth_user table's id field. However, the rows with the ids on which the new tab

[web2py] Removing Foreign Key constraint?

2013-06-05 Thread Lamps902
For purposes of archiving, I've created a new db, and archived some tables using auth.enable_record_versioning(db, tables=[...]). Among other things, this has the effect of migrating Foreign Key constraints from the original tables, so the *modified_by*, and *created_by* fields in the tables in

[web2py] Re: Gateway time-out 504 error with enable_record_versioning

2013-06-04 Thread Lamps902
Nevermind - sorted it out. Seems that a bunch of my tables had a dependency on "auth_user", and since a new db was created, with table names set to [original_table_name]_archive by default, there was no "auth_user" table, and the dependency was not being satisfied. If using auth.enable_record_v

[web2py] Gateway time-out 504 error with enable_record_versioning

2013-06-04 Thread Lamps902
I've defined a new db to be used for archiving purposes with the following: db_archive = DAL("postgres://[address/authentication_info]/db_archive") Then, I attempt to enable archiving of a table by doing this: db.[table_name]._enable_record_versioning(db_archive) The app seems to be successfully

Re: [web2py] Excessive memory usage with uwsgi/nginx

2013-06-03 Thread Lamps902
; > On Monday, June 3, 2013 1:55:28 PM UTC-4, Lamps902 wrote: >> >> Hi, Massimo. I didn't cache much at first, and to make sure that caching >> isn't the source of the problem, I tried removing all caching. No >> noticeable improvement there. Right now, I

Re: [web2py] Excessive memory usage with uwsgi/nginx

2013-06-03 Thread Lamps902
find this a bit perplexing, as it seems to undermine the whole notion of the MVC framework). On Monday, June 3, 2013 11:55:02 AM UTC-5, Massimo Di Pierro wrote: > > Mind that caching too much stuff will do that to you. > > On Monday, 3 June 2013 10:04:25 UTC-5, Lamps902 wrote: >> >

Re: [web2py] Excessive memory usage with uwsgi/nginx

2013-06-03 Thread Lamps902
Thanks, Roberto. It was eventually growing to something in excess of 80M per uwsgi instance, then crashing when all are full. Will try the settings you suggested. On Monday, June 3, 2013 9:32:10 AM UTC-5, Roberto De Ioris wrote: > > > 30-40 MB per worker is pretty normal. > > To gain memory you

[web2py] Excessive memory usage with uwsgi/nginx

2013-06-03 Thread Lamps902
My web2py application is running on Webfaction's servers over uwsgi/nginx. When the servers are started, four instances of nginx and four instances of uwsgi are spawned, with each nginx instance taking up ~18M of RAM, and each nginx instance taking up a couple of M. Accessing any part of the pag

[web2py] Re: After update web2py version, invalid login.

2013-05-31 Thread Lamps902
Did you perform an sqlite -> postgresql migration which left a bunch of trailing whitespace in various fields? On Sunday, May 26, 2013 3:02:02 AM UTC-5, toni campins wrote: > > Hi, > > Why after update web2py i have to edit all passwords for invalid login? > > Thanks > -- --- You received thi

[web2py] Re: Making RSS feed auto-detectable?

2013-05-29 Thread Lamps902
site, but first triple-check all your layout (maybe it's > not working in a page that has some broken HTML where Sage parser's life is > harder). > > Il giorno mercoledì 29 maggio 2013 14:09:45 UTC+2, Lamps902 ha scritto: >> >> Anyone knowledgeable in RSS care to

[web2py] Re: Making RSS feed auto-detectable?

2013-05-29 Thread Lamps902
Anyone knowledgeable in RSS care to take a crack at this one? -- --- 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

[web2py] Re: Twitter post function producing HTTP 401 error

2013-05-23 Thread Lamps902
> Anthony > > On Thursday, May 23, 2013 10:24:04 AM UTC-4, Lamps902 wrote: >> >> Thanks, Anthony. Are you aware of any viable web2py solutions to making >> Twitter posts? Would it be a good idea just to use some python Twitter >> module? >> >>>

[web2py] Re: Twitter post function producing HTTP 401 error

2013-05-23 Thread Lamps902
Thanks, Anthony. Are you aware of any viable web2py solutions to making Twitter posts? Would it be a good idea just to use some python Twitter module? > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and

[web2py] Twitter post function producing HTTP 401 error

2013-05-23 Thread Lamps902
I've added the Twitter posting function to my app, in the form in which it's presented in the book - http://www.web2py.com/books/default/chapter/29/14?search=twitter#Twitter-API. When calling this function with the username supplied in the Twitter Account menu's username field, my twitter passw

[web2py] Making RSS feed auto-detectable?

2013-05-23 Thread Lamps902
I've added the following RSS feed function to my default controller: def updatefeed(): list_of_rss_entry_dicts = [ dict(title = data_set.f_headline, link = 'http://' + settings.domain_name, description = data_set.f_content

[web2py] Re: Send registration email directly from local server?

2013-05-21 Thread Lamps902
sure all > mentioned providers take such factors into account. So a completely new > account might get locked up much faster than on that is years old. > > Lamps902, one can customize "from", "reply-to" etc. regardless of the SMTP > server used - so no need to actu

[web2py] Re: Dynamically loaded pages not found when link clicked from 'user' function/pages

2013-05-20 Thread Lamps902
y, May 20, 2013 9:19:17 PM UTC+2, Lamps902 wrote: >> >> Oops. Just noticed something (sorry; gotten really out of practice >> lately, and I'm forgetting to check the obvious). If the current page is >> one of the 'user' pages, and I click on 'about'

[web2py] Re: Dynamically loaded pages not found when link clicked from 'user' function/pages

2013-05-20 Thread Lamps902
gt;> I'd start by debugging - the variable in question would be >> 'request.folder'. does it change in some way when the current page is a >> 'user' page? >> >> On Monday, May 20, 2013 11:53:06 AM UTC-7, Lamps902 wrote: >>> >>

[web2py] Re: Dynamically loaded pages not found when link clicked from 'user' function/pages

2013-05-20 Thread Lamps902
nge in some way when the current page is a > 'user' page? > > On Monday, May 20, 2013 11:53:06 AM UTC-7, Lamps902 wrote: >> >> I have a few pages (about, FAQ, terms of service) that are loaded from >> text files in the static folder. The setup is basical

[web2py] Re: Dynamically loaded pages not found when link clicked from 'user' function/pages

2013-05-20 Thread Lamps902
ithout the code you use to load them, it's quite impossible to figure out > why it doesn't work. > > On Monday, May 20, 2013 8:53:06 PM UTC+2, Lamps902 wrote: >> >> I have a few pages (about, FAQ, terms of service) that are loaded from >> text files in the stati

[web2py] Dynamically loaded pages not found when link clicked from 'user' function/pages

2013-05-20 Thread Lamps902
I have a few pages (about, FAQ, terms of service) that are loaded from text files in the static folder. The setup is basically like this: content_files = Storage() file_handler = open(os.path.join(request.folder,"static","content","about.txt"),'r') content_files['about'] = file_handler.read() c

[web2py] Re: Send registration email directly from local server?

2013-05-20 Thread Lamps902
On Monday, May 20, 2013 10:31:41 AM UTC-5, Niphlod wrote: > > I really don't think that smtp.live.com accepts happily more than a > few emails per day (same thing goes for google's SMTPs using a personal > account). > They're not meant to be used by servers :P > Which is exactly why I'm lo

[web2py] Re: Send registration email directly from local server?

2013-05-20 Thread Lamps902
> > correctly identified (reverse dns, mx, etc), so you don't get included in > a blacklist as soon as you start using it ^_^ Ironically, it happened with my Outlook account, although it seems to have been configured correctly (with a bit of assistance from my registrar's tech support)! In o

[web2py] Re: Send registration email directly from local server?

2013-05-20 Thread Lamps902
Is it necessary to have an SMTP server available on your system? I guess I was wondering if there is some kind of ad-hoc email server-like functionality that comes with web2py - for example, something like this: http://www.tutorialspoint.com/python/python_sending_email.htm - that can be readily

[web2py] Send registration email directly from local server?

2013-05-20 Thread Lamps902
At the moment, my custom domain is associated with Outlook, and my page's email settings are configured this way: settings.email_server = 'smtp.live.com:587' settings.email_sender = '[sender_name]@[mydomain.com]' settings.email_login = '[username]:[pass]' It seems that every few emails I send, O

[web2py] Dynamically generating text file that isn't stored?

2013-05-03 Thread Lamps902
I would like to permit users to be able to download a text file of some data that's pulled up from certain fields of a DB table. This text file should be generated when the user clicks on a certain link, and should not be stored on the server's HD. Any ideas as to how to go about doing this? Th

[web2py] Re: Finding performance bottlenecks

2013-04-15 Thread Lamps902
erver accordingly to the stack you're using > - move models to modules whenever possible > - etc > that are all more or less on the book. > Don't forget static asset serving, even if not managed by web2py a bad > setting can slow down the page rendering quite a bit. > > O

[web2py] Finding performance bottlenecks

2013-04-15 Thread Lamps902
Hi, group. I'd like to ask a very general question, but one of great utility: what are some ways to go about finding performance bottlenecks in your web2py page? What are some specific resource hogs and sources of diminished performance that you've encountered in your web2py pages (I imagine DB

[web2py] Re: Using field names stored as strings for db actions?

2013-04-03 Thread Lamps902
ll automatically wrap > the TR's components inside TD's. > > Anthony > > On Wednesday, April 3, 2013 12:12:33 PM UTC-4, Lamps902 wrote: >> >> I'd like to do something to this effect: >> >> fields = db.table1.fields() >> >> table_rows = [

[web2py] Re: new feature in trunk: pack custom

2013-04-03 Thread Lamps902
Thanks, Massimo - great feature! I was going to ask for something like this, as it's extremely useful for cases when you have a large upload folder, and would like to quickly back up the code, but not the user-uploaded files. On Tuesday, April 2, 2013 3:22:50 PM UTC-5, Massimo Di Pierro wrote:

[web2py] Using field names stored as strings for db actions?

2013-04-03 Thread Lamps902
I'd like to do something to this effect: fields = db.table1.fields() table_rows = [ TR( TD(*[the label associated with the field]*), TD(db(*[the field]* > 0).count()), _id = field + '__row') for field in fields ] Any suggestions? Thanks. -- --- You received this message because you are

[web2py] Re: File uploads from different tables wih SQLFORM.factory - table name issue

2013-04-01 Thread Lamps902
rocessing the db.table2 form (so it > matches the new formkey stored in the session). After processing, > request.post_vars is cleared so the files will not be re-saved when the > factory form is processed in the next line. > > Anthony > > On Monday, April 1, 2013 12:04:09

[web2py] Re: File uploads from different tables wih SQLFORM.factory - table name issue

2013-04-01 Thread Lamps902
you can > pass Field() to it) > - have default validators available > > you can't expect more "auto-magic" features out of it You can use > _filter_fields() to see which table belongs the input name, as long as your > input names are distinct. > > O

[web2py] File uploads from different tables wih SQLFORM.factory - table name issue

2013-04-01 Thread Lamps902
If you have something like the following: form = SQLFORM.factory(db.table1, db.table2) and table1 has an 'upload' field named 'file1', with table2 containing an 'upload' field named 'file2', the filenames stored in the tables will end up as 'no_table.file[number].[unique_file_identifier].[exten

[web2py] Re: Can file/upload field value be retained when form has errors/is not accepted?

2013-03-29 Thread Lamps902
retrieve the file > contents and discard it without using it. > > On Thursday, March 28, 2013 5:48:35 PM UTC+1, Lamps902 wrote: >> >> Thanks, niphlod and Anthony - some good suggestions and considerations >> mentioned there. niphlod - can you clarify why you recommend using

[web2py] Re: Can file/upload field value be retained when form has errors/is not accepted?

2013-03-28 Thread Lamps902
elds in a form. > Everyday I'd prune all the attachments received with no "remaining fields" > attached. > > On Thursday, March 28, 2013 5:08:24 PM UTC+1, Lamps902 wrote: >> >> When a form has errors, the value of an upload field is reset upon >> submission. Is t

[web2py] Can file/upload field value be retained when form has errors/is not accepted?

2013-03-28 Thread Lamps902
When a form has errors, the value of an upload field is reset upon submission. Is there a way to retain this value, or does this pretty much have to be handled manually (i.e. by storing the value of the upload field or by prompting the user to specify the file again)? -- --- You received thi

[web2py] Re: using a representation of an absolute URL to update a db?

2013-03-28 Thread Lamps902
ction of the current request). > > Anthony > > On Thursday, March 28, 2013 10:36:15 AM UTC-4, Lamps902 wrote: >> >> Thanks to both of you guys! After a much needed rest, I got it working >> with a solution comparable to what you guys specified/described. >> >&g

[web2py] Re: using a representation of an absolute URL to update a db?

2013-03-28 Thread Lamps902
Thanks to both of you guys! After a much needed rest, I got it working with a solution comparable to what you guys specified/described. Anthony - I noticed the book's section on using the *host* and *scheme*parameters for URL(), but was a bit thrown off - is there a way to use URL() to point t

[web2py] Re: using a representation of an absolute URL to update a db?

2013-03-27 Thread Lamps902
Thanks, Niphlod. It may require some digression/elaboration, so do you mind if I get in touch with you about this tomorrow? Hopefully, after I get some rest, I'll be able to articulate the issue a bit better... On Wednesday, March 27, 2013 4:08:46 PM UTC-5, Niphlod wrote: > > uhm... I didn't qui

[web2py] Re: using a representation of an absolute URL to update a db?

2013-03-27 Thread Lamps902
e seems pretty standard > to me > > On Wednesday, March 27, 2013 7:15:12 PM UTC+1, Lamps902 wrote: >> >> Let's say you have an SQL grid generated from a db with field *my_url*, >> which stores the value of an absolute URL, and has a representation defined >

Re: [web2py] using the IS_URL validator with complex URLs

2013-03-27 Thread Lamps902
Thank you! On Wednesday, March 27, 2013 1:44:08 PM UTC-5, Jonathan Lundell wrote: > > On 27 Mar 2013, at 11:25 AM, Lamps902 > > wrote: > > It seems that every once in a while, the IS_URL validator doesn't want to > accept a URL that's valid. For example, I b

[web2py] using the IS_URL validator with complex URLs

2013-03-27 Thread Lamps902
It seems that every once in a while, the IS_URL validator doesn't want to accept a URL that's valid. For example, I believe the ^ character prevents IS_URL from accepting something like http://finance.yahoo.com/q/hp?s=^IXIC+Historical+Prices. Is there a parameter to permit IS_URL to accept cert

[web2py] using a representation of an absolute URL to update a db?

2013-03-27 Thread Lamps902
Let's say you have an SQL grid generated from a db with field *my_url*, which stores the value of an absolute URL, and has a representation defined in this way: db.my_db.my_url.represent = lambda the_url, row: A(generate_link_image(), _href=the_url, _target='_blank') What would be a good way

[web2py] Re: Rendering HTML code and "{{...}}"-delimited code stored in a variable?

2013-03-20 Thread Lamps902
Thanks, Anthony. I think this is exactly what I was asking about. I'll try it out now. On Wednesday, March 20, 2013 1:39:21 PM UTC-5, Anthony wrote: > > >> stored_code = "{{=request.vars. >> the_link}}" >> >> It sounds like there might be better options, but if for some reason you > need to exe

[web2py] Re: Rendering HTML code and "{{...}}"-delimited code stored in a variable?

2013-03-20 Thread Lamps902
m you with links to thier website. > > On Wednesday, March 20, 2013 7:16:14 PM UTC+2, Lamps902 wrote: >> >> It's possible to render HTML code stored in a variable with the XML() >> function (i.e. if your variable is "stored_code", do "XML(s

[web2py] Rendering HTML code and "{{...}}"-delimited code stored in a variable?

2013-03-20 Thread Lamps902
It's possible to render HTML code stored in a variable with the XML() function. However, let's say you have something like the following scenario: {{=request.vars.the_link}} or something like stored_code = request.vars.the_link Is there a way to get web2py to evaluate the variables and render

[web2py] auth_event table not updating

2013-03-18 Thread Lamps902
Looking at my application's databases, it seems that the auth_event table was last updated quite some time ago. I'm not sure what changes I made to the code which could have caused the application to stop logging events to auth_event. Is there anything I should check in my database definitions/

[web2py] Automated IP logging?

2013-03-13 Thread Lamps902
Is there an automated way to log the IPs associated with the initiatialization and clearing of each session (i.e. when a user logs in/logs out), or does this have to be accomplished manually through the use of request.client and some auth.settings variable (i.e. auth.settings.login_onaccept)? I

[web2py] Re: enable_record_versioning() - possible to update archive only after deletion?

2013-03-13 Thread Lamps902
ble. > > http://web2py.com/books/default/chapter/29/06#before-and-after-callbacks > > On Wednesday, March 13, 2013 7:27:16 PM UTC+1, Lamps902 wrote: >> >> At present, auth._enable_record_versioning and >> db.table._enable_record_versioning >> update a record every

[web2py] enable_record_versioning() - possible to update archive only after deletion?

2013-03-13 Thread Lamps902
At present, auth._enable_record_versioning and db.table._enable_record_versioning update a record every time something is modified or deleted (including the flipping of the *is_active* field). Is there a way to use the functionality provided by these functions to update an archive only upon del

[web2py] Re: Creating a DB that mirrors the structure of an existing DB for archiving purposes?

2013-03-12 Thread Lamps902
Thanks, guys - this appears to be exactly what I needed! Is it generally a good idea, as far as performance goes, to store the archived entries in a separate database, as opposed to the original *db*? -- --- You received this message because you are subscribed to the Google Groups "web2py-us

[web2py] Creating a DB that mirrors the structure of an existing DB for archiving purposes?

2013-03-12 Thread Lamps902
Hi, group. For each database in a subset of my project's databases, I would like to have a corresponding database that (almost) clones the structure of the original database. The mirror databases will be used to archive records that have been deleted from the original databases. For example, if

[web2py] Re: Real-Time Scanning of File Upload Sizes Possible?

2013-03-01 Thread Lamps902
I've found this tip from Massimo on checking file upload progress: In the upload form add def upload_page(): ... length_bytes = cache.ram('X-Progress-ID:test:length',None,0) uploaded_bytes = cache.ram('X-Progress-ID:test:uploaded',None,0) ... > > However, I'm not cert

[web2py] Real-Time Scanning of File Upload Sizes Possible?

2013-02-28 Thread Lamps902
Hi, group. Is there a way to scan file uploads in real-time, and cut off the file upload if it exceeds a certain size? Thank you. -Lamps -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving em

[web2py] Re: How do you check user-uploaded files for malware?

2013-02-01 Thread Lamps902
2013 06:50:05 UTC-6, Lamps902 wrote: >> >> Has anybody had success using a malware/virus-scanning module/tool to >> scan user-uploaded files on their web2py page? Any suggestions as to how to >> go about doing this? Thanks! >> > -- --- You received this message bec

[web2py] Re: Preferred method for banning email domains from registering?

2013-01-31 Thread Lamps902
th_table.email) > ] > > Remember that the model files are plain python, so you could build up the > regex string from a list or external source before passing it to as a > parameter. > > regards, > > Andy. > > > On Thursday, January 31, 2013 12:29:18 PM UTC,

[web2py] Re: Redirect from inside a component

2013-01-31 Thread Lamps902
Why not use the process() method's "next" parameter? http://web2py.com/books/default/chapter/29/07?search=.accepted#The-process-and-validate-methods Otherwise, there's "redirect()" - http://web2py.com/books/default/chapter/29/07?search=redirect%28#Forms-and-redirection On Thursday, January 3

[web2py] How do you check user-uploaded files for malware?

2013-01-31 Thread Lamps902
Has anybody had success using a malware/virus-scanning module/tool to scan user-uploaded files on their web2py page? Any suggestions as to how to go about doing this? Thanks! -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe

[web2py] Preferred method for banning email domains from registering?

2013-01-31 Thread Lamps902
Hi, web2py users. Is there a preferred method for banning a set of email domains from registering? I know that the IS_EMAIL() validator has a "banned" parameter, but is this the best way to go about this task? If so, is there a way to pass multiple domains to the "banned" parameter (I don't thi

[web2py] Re: Can I change a boolean field widget to a button?

2013-01-30 Thread Lamps902
Jim - a much nicer solution came to mind that would be useful if you don't need those fields to be checkboxes at any other point in your program. You can probably do this in the model: Field('rebates_tiered', represent=INPUT(_type='button'), ...) Sorry not to think of it sooner. Probably an ava

[web2py] Re: Is it possible to use IS_IN_SET() in combination with other validators to validate a list?

2013-01-29 Thread Lamps902
ions using the IS_IN_SET options. > > For more on widgets, see > http://web2py.com/books/default/chapter/29/07#Widgets. > > Anthony > > On Tuesday, January 29, 2013 1:36:24 PM UTC-5, Lamps902 wrote: >> >> Thanks, Anthony. I was under the impression that list:strin

Re: [web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Lamps902
e: > >> Yes, I was thinking this was javascript code. Sorry I missed that, it's >> been a long day... >> >> >> On Tue, Jan 29, 2013 at 7:59 PM, Lamps902 >> > wrote: >> >>> It looks like you might be sort of conflating javascript and python

Re: [web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Lamps902
gt;> On Tuesday, January 29, 2013 2:00:45 PM UTC-5, Jim S wrote: >>>> >>>> The research I've done is telling me that IE won't allow you to change >>>> the type of an element. Therefore, I need to generate it as a >>>> type="button"

[web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Lamps902
Therefore, I need to generate it as a type="button" > from the start. The bootstrap example also shows this as a > element and not an . Not sure if that is relevant though. > > -Jim > > On Tuesday, January 29, 2013 12:53:50 PM UTC-6, Lamps902 wrote

[web2py] Re: Can I change a boolean field widget to a button?

2013-01-29 Thread Lamps902
Hi, Jim. What about doing the following: form.elements('input',_id='checkbox_field_n')[0]['_type'] = 'button' > I imagine the value can then be toggled with, for example, javascript's 'onclick' functionality, and stored in the db as usual. On Tuesday, January 29, 2013 11:46:55 AM UTC-5, Jim S w

[web2py] Re: Is it possible to use IS_IN_SET() in combination with other validators to validate a list?

2013-01-29 Thread Lamps902
s, as > below. > > Anthony > > On Tuesday, January 29, 2013 5:39:59 AM UTC-5, Lamps902 wrote: >> >> Thank you for the replies, guys! I think my abstract/trivial example may >> have obfuscated things a bit. I'm trying to use the IS_IN_SET() validator >&

[web2py] Re: Is it possible to use IS_IN_SET() in combination with other validators to validate a list?

2013-01-29 Thread Lamps902
Thank you for the replies, guys! I think my abstract/trivial example may have obfuscated things a bit. I'm trying to use the IS_IN_SET() validator in combination with a custom validator (yet to be fully written) to make it so that all the elements of a dropdown menu/select are taken from a given

[web2py] Is it possible to use IS_IN_SET() in combination with other validators to validate a list?

2013-01-28 Thread Lamps902
Hi, web2py users. In my model, I've got a field of type "list:string" which I'm trying to validate. The field is defined as follows: Field('f_field_name', type='list:string', > > requires=IS_IN_SET(theset=list_of_acceptable_options,zero=T(message), > error_message=T(some_error_messag

[web2py] List items not loading in profile form

2013-01-10 Thread Lamps902
Hi, group. My user_auth model includes list fields such as the user's home country and home state, which are declared thus: Field ('home_state',type="list:string",length=2, label=T ('Home State'),

[web2py] Re: Modifying auth.navbar

2012-12-27 Thread Lamps902
ements, > so it can be manipulated via the server-side > DOM<http://web2py.com/books/default/chapter/29/05#Server-side-DOM-and-parsing> > . > > Anthony > > On Thursday, December 27, 2012 9:32:30 AM UTC-5, Lamps902 wrote: >> >> Hi, group. Is there a straig

[web2py] Modifying auth.navbar

2012-12-27 Thread Lamps902
Hi, group. Is there a straightforward way to modify web2py's navbar? I would like to customize the default navbar so that it redirects to a custom 'register' function when that option is selected, keeping all other functionality as it is. Thanks! --

[web2py] Re: web2py forum solutions

2012-11-27 Thread Lamps902
; Well, there is a forum written in web2py. > > Take a look - http://pyforum.org/ > > I haven't used it for more than to test it out, perhaps someone else will > have additional feedback. > > Regards, > Ales > > On Monday, November 26, 2012 8:16:51 PM UTC+1, Lamps

[web2py] web2py forum solutions

2012-11-26 Thread Lamps902
Hi, group. What are some options for forums/message boards that can be readily integrated into a web2py page (i.e. forum solutions that can be wholly contained within your page's content window, maintain the integrity of your page's theme, and have access to the page's DB - preferably with mini

[web2py] Preventing 'back' button from clearing session

2012-11-12 Thread Lamps902
Sorry to ask something so seemingly basic, but it's posing quite an issue at the moment. I've got a back button that is set to appear when a DB query doesn't result in any items being returned (i.e. a grid is blank). The button is implemented like this: back_button_form = FORM(INPUT(_type='subm

[web2py] Re: Is it possible to submit multiple forms with one submit button?

2012-11-04 Thread Lamps902
on that will collect data > from various input fields and post it to the server in one or more AJAX > calls > - sure you can create one large form, but you'll need to carefully name > all the input fields so that you know what is what. > > On Saturday, November 3, 2012 7:44

[web2py] Is it possible to submit multiple forms with one submit button?

2012-11-03 Thread Lamps902
I have a grid in which I'd like to put a form between each column header/label. Is it possible to submit and pass the data from all of these forms with a single submit button? Tried a couple of jquery solutions, but it wasn't quite working out. Alternatively, is it possible to make a single for

Re: [web2py] How to implement multiple filter for grid?

2012-11-01 Thread Lamps902
hat required thing to do/think > about when designing large applications. If you put an index in the table > column you're requesting that distinct, the db scans only the index and not > the million rows table > > On Thursday, November 1, 2012 8:18:50 PM UTC+1, Lamps902

[web2py] Is there a way to put a grid's search form beneath the column headers of a grid?

2012-11-01 Thread Lamps902
In a previous thread, we discussed how to implement multiple search filter fields for a grid. That being done, I'm curious if there's a reasonable way to put the filters (all currently part of a single FO

Re: [web2py] How to implement multiple filter for grid?

2012-11-01 Thread Lamps902
ubism.com/plugin_suggest_widget. > > Best of luck! Sorry I couldn't be more helpful. > > -Jim > > On Thu, Nov 1, 2012 at 11:35 AM, Lamps902 > > wrote: > >> I've followed Jim's model in creating my search filter, and it appears to >> be workin

Re: [web2py] How to implement multiple filter for grid?

2012-11-01 Thread Lamps902
x27;m attaching a quick-n-dirty search example. You'll have to provide your > own data to get it running. It worked with my test data. Let me know if > you have troubles and I'll be glad to work through them with you. > > -Jim > > On Wed, Oct 31, 2012 at 8:53 AM,

  1   2   >