[web2py] Re: how to restart we2py running as fastcgi process under Apache?

2019-06-16 Thread Jim Gregory
Turned out I had an old incompatible version of PIL on my production server. I removed it and now all seems to be OK. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] how to restart we2py running as fastcgi process under Apache?

2019-06-16 Thread Jim Gregory
I just launched an app into production that uses the Python Imaging Library (PIL). PIL was installed on my local development environment, but not on my production server, and the app started throwing errors. I installed PIL on the server. If I launch the app in web2py's interactive command

[web2py] Re: Upgrading from 2.08 to 2.18.5

2019-06-15 Thread Jim Gregory
On Friday, June 14, 2019 at 2:57:38 PM UTC-5, Jim Gregory wrote: > > > On the old version of my blog, I would get relative URLs > '/blog/', but now I'm getting '/blog/default/'. > SImilar behavior is occurring in the top-level navigation. Has routing > behavior changed? &

[web2py] Re: Upgrading from 2.08 to 2.18.5

2019-06-14 Thread Jim Gregory
changed? On Wednesday, June 12, 2019 at 3:13:38 PM UTC-5, Jim Gregory wrote: > > I will be moving a legacy application from my old shared host to a new > VPS, and would like to upgrade web2py at the same time from 2.08 to the > current version (2.18.5). How should I go about doing

[web2py] Upgrading from 2.08 to 2.18.5

2019-06-12 Thread Jim Gregory
I will be moving a legacy application from my old shared host to a new VPS, and would like to upgrade web2py at the same time from 2.08 to the current version (2.18.5). How should I go about doing this? What changes will I need to make? I'm satisfied for now with the currently layout (which

[web2py] web2py and python3

2015-11-04 Thread Jim Gregory
I know this has come up in the past, but it hasn't been asked in a while. Is there ever going to be a usable and maintained Python3-compatible fork of web2py? The latest edition of Fedora now ships with Python3 by default. It's the default version used in Django's tutorial. I'm not using

Re: [web2py] Re: Load content from a text file

2013-08-18 Thread Jim Gregory
I'm not an expert in web2py, but this one approach I think should work for your application. If others have better ways of doing it, please share them: def readfile(): ''' returns the file to be read ''' response.view = '/path/to/file_to_be_read.txt' return locals() def

[web2py] Re: Load content from a text file

2013-08-17 Thread Jim Gregory
Do you need to use a text file as an intermediary? I created a similar app for my pedal-powered laptop (described at www.pedalpc.com) where a function is called in the controller that reads/writes the serial port and returns the data as JSON which just updates the necessary data in the page in

[web2py] Passing extra arguments through a SQLFORM submit button?

2013-08-10 Thread Jim Gregory
I think you should be able to set the value after you create the form in your controller: comment_form = SQLFORM(db.comment) comment_form.vars.post_id=post.id http://www.web2py.com/book/default/chapter/07#Pre-populating-the-form -- --- You received this message because you are subscribed

[web2py] Re: DAL does not return correct id when inserting a record where the id is specified

2013-08-07 Thread Jim Gregory
). Anthony On Tuesday, August 6, 2013 11:41:03 PM UTC-4, Jim Gregory wrote: I'm porting a legacy table to a new table having a different schema. The old table had a field (order_number) that was unique and autoincrementing but not the primary key. I want to use those old values as the primary

[web2py] DAL does not return correct id when inserting a record where the id is specified

2013-08-06 Thread Jim Gregory
I noticed an odd behavior when inserting a record in a MySQL table. Given a table: db.define_table('person', Field('name')) inserting some records without specifying the id returns the correct id: db.person.insert(name='John') 1 db.person.insert(name='Bill') 2 But specifying the id when the

[web2py] Re: DAL does not return correct id when inserting a record where the id is specified

2013-08-06 Thread Jim Gregory
I'm porting a legacy table to a new table having a different schema. The old table had a field (order_number) that was unique and autoincrementing but not the primary key. I want to use those old values as the primary key in the new table. -- --- You received this message because you are

Re: [web2py] Adjusting the width of the textarea

2013-08-03 Thread Jim Gregory
Don't know if this applies in your situation, but one problem I've encountered is I always assumed that simply adding a response.files. append (page.css) to the top of a view before extending the default layout.html template would put the page.css file last in the hierarchy. If you look at the

[web2py] Re: Copy data from one db into another

2013-08-03 Thread Jim Gregory
Are you using any special characters in the password for the MySQL database? I've found that can often cause problems when calling a MySQL database from the command line. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

[web2py] how to validate forms using extra data?

2013-07-15 Thread Jim Gregory
I have a form with five text input boxes: form = FORM(*[INPUT('amount-%s' % i, _type='number') for i in range(5)], INPUT(_type='submit')) The sum of these input boxes must equal the value of a field in a database record. I would like to pass the database record as a parameter to the

Re: [web2py] how to validate forms using extra data?

2013-07-15 Thread Jim Gregory
On Monday, July 15, 2013 6:11:52 AM UTC-5, viniciusban wrote: Yes, there are some solutions and you gave one of them: create the record id as a hidden field in your form. Other solution can be using request.args(0) in your _validate_form() function. On Mon, Jul 15, 2013 at 8:01 AM, Jim

Re: [web2py] how to validate forms using extra data?

2013-07-15 Thread Jim Gregory
Your workaround idea worked great. 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

[web2py] trying to add a second button to a form but before the submit button

2013-07-15 Thread Jim Gregory
Will this work? form[0].insert(-2,TAG.button('Reset', _type='reset', ...) - Jim -- --- 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] trying to add a second button to a form but before the submit button

2013-07-15 Thread Jim Gregory
Oops, that I think will put the reset button too many elements ahead. To add a reset button as the last form element, try: form[0].append(TAG.button('Reset', _type = 'reset', ...) -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To

[web2py] web2py.com down, showing error ticket links

2013-07-02 Thread Jim Gregory
The site is showing error ticket links regardless of the site section (home page, book, etc) ...:( -Jim -- --- 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] getting the name/value of a submit button

2013-07-01 Thread Jim Gregory
I created a form with two submit buttons (INPUT(_type ='submit', _name ='name1', _value ='value 1') etc) , each with a different name and value so that, when the form is submitted, a different subroutine is called in the controller based on which submit button was pressed. However, the name of

[web2py] Re: getting the name/value of a submit button

2013-07-01 Thread Jim Gregory
Yes, the form is a component. -- --- 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

[web2py] Re: getting the name/value of a submit button

2013-07-01 Thread Jim Gregory
to this problem. If you come up with something generalizable, maybe we can add it to web2py.js. Anthony On Monday, July 1, 2013 10:27:58 AM UTC-4, Jim Gregory wrote: Yes, the form is a component. -- --- You received this message because you are subscribed to the Google Groups web2py-users

[web2py] Re: saving UPS shipping labels

2013-05-17 Thread Jim Gregory
Just to follow up on this, I had not specified the file type in the function call and hence it did not encode it properly. It works fine now. On Friday, April 19, 2013 3:51:29 PM UTC-5, Jim Gregory wrote: I'm working on a script to generate UPS shipping labels and save them on our server

[web2py] saving UPS shipping labels

2013-04-19 Thread Jim Gregory
I'm working on a script to generate UPS shipping labels and save them on our server. The shipping labels are passed as binary data in an XML file from UPS. I am using the ClassicUPS library to parse the XML file and save the data. I wrote a simple script to test the library, and it works OK

[web2py] Possible to turn off server logging in local environment?

2013-03-07 Thread Jim Gregory
I run web2py in the background on my PC to monitor my power output when I'm working on my pedal-powered computer. (see http://www.bikesatwork.com/blog/our-pedal-powered-office) The script I'm running does sends a JSON request to my local server every second, which means the log file grows

[web2py] Re: Problem with smartgrid no GUI Bread Crums or missing buttons for links

2013-03-05 Thread Jim Gregory
{{=BEAUTIFY (something)}} is for pretty-printing a dictionary. What you want to use instead is: {{=grid}} -Jim -- --- 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

[web2py] Re: Change upload behaviour: standard filename

2013-03-05 Thread Jim Gregory
Did you include the code for the store_file and retrieve_file functions listed in the Stack Overflow answer before the table definitions in your model file? -Jim -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this

[web2py] Re: Problem with smartgrid no GUI Bread Crums or missing buttons for links

2013-03-05 Thread Jim Gregory
In your original response you quoted, you had grid: followed by the HTML assigned to that key. Are you still getting the grid: part, or just the (unstyled) HTML? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this

[web2py] Re: Problem with smartgrid no GUI Bread Crums or missing buttons for links

2013-03-05 Thread Jim Gregory
Sounds like your CSS file is missing. View the source of the page and see if it is referencing the CSS file. If so, try accessing the CSS file directly by copying and pasting the URL of the file from the page source into the location bar of your web browser. If you get a 404 error, then either

[web2py] extension handling in parametric router

2012-11-07 Thread Jim Gregory
How does the parametric router handle extensions?When I do a doctest using app/controller/function.extension, it returns app/controller/index ['function.ext'] instead of app/controller/function as I would have expected. What am I doing wrong? --

[web2py] Re: best method for retrieving images using original filename?

2012-10-09 Thread Jim Gregory
On Monday, 8 October 2012 05:10:13 UTC-5, Jim Gregory wrote: To optimize SEO, I prefer to use descriptive, keyword-rich image filenames instead of the auto-generated names used by web2py. Currently, I am using a custom download function that looks up the auto-generated filename in a database

[web2py] best method for retrieving images using original filename?

2012-10-08 Thread Jim Gregory
To optimize SEO, I prefer to use descriptive, keyword-rich image filenames instead of the auto-generated names used by web2py. Currently, I am using a custom download function that looks up the auto-generated filename in a database using the original filename as a key, then uses the standard

[web2py] Re: Smartgrid Add button missing

2012-09-27 Thread Jim Gregory
Do your smartgrid forms require you to be logged in? The add buttons won't show unless you're logged in... On Thursday, September 27, 2012 10:14:55 AM UTC-5, Jim S wrote: I just updated to the 2.0.9 (2012-09-26 12:45:50) this morning and now see that all of my Add buttons are missing from

[web2py] Re: calling custom_store and custom_retrieve using parameters

2012-08-16 Thread Jim Gregory
, Anthony wrote: On Wednesday, August 8, 2012 7:09:37 AM UTC-4, Jim Gregory wrote: Can custom_store and custom_retrieve take parameters when they are called using Field, e.g.: db.define_table('table', Field('file', 'upload', custom_store=store_file(file, db.table.new_filename

[web2py] calling custom_store and custom_retrieve using parameters

2012-08-08 Thread Jim Gregory
Can custom_store and custom_retrieve take parameters when they are called using Field, e.g.: db.define_table('table', Field('file', 'upload', custom_store=store_file(file, db.table.new_filename), custom_retrieve=retrieve_file(db.table.new_filename))? Field('new_filename','string') ) All

[web2py] how to remove duplicate tables in smartgrid?

2011-12-26 Thread Jim Gregory
I am creating an application that has a one-to-many table that references the same table twice: db.define_table('product', Field('title', required=True, unique=True), Field('sku', required = True, unique=True), Field('description', 'text'), format = '%(title)s' )

[web2py] Re: commenting out lines in views

2011-12-21 Thread Jim Gregory
Thanks for the helpful clarification! However, neither method will work if there is web2py template code embedded inside the comment, e.g.: {{''' pThis is my title: {{=response.title}}/p '''}} returns an EOF while scanning triple-quoted string literal error. Is there a method to comment out

[web2py] Re: commenting out lines in views

2011-12-21 Thread Jim Gregory
, December 21, 2011 6:58:42 AM UTC-5, Jim Gregory wrote: Thanks for the helpful clarification!  However, neither method will work if there is web2py template code embedded inside the comment, e.g.: {{''' pThis is my title: {{=response.title}}/p '''}} returns an EOF while scanning triple

[web2py] commenting out lines in views

2011-12-14 Thread Jim Gregory
The default layout.html has several helpful html comments in it, but I don't want to render them on every request. I just want them visible to the designer when editing the template. I realize its possible to comment out lines of code like this: {{ # !-- (helpful information about the following

[web2py] Re: commenting out lines in views

2011-12-14 Thread Jim Gregory
Never mind. FWIW, I found this soluion works: {{# ''' !-- html comment start here blah blah blah end of comment -- '''}} -Jim On Dec 14, 6:34 am, Jim Gregory bikesatw...@gmail.com wrote: The default layout.html has several helpful html comments in it, but I don't want to render them on every

[web2py] Re: web2py 1.99.3 is OUT

2011-12-11 Thread Jim Gregory
Changing the announce class specification on line 13 in examples.css from : .announce { position:absolute;align:center;color:white;top:120px;font- weight:bold;text-align:center;} to: .announce {clear:both;color:white;top:120px;font-weight:bold;text- align:center;} takes care of the problem for

[web2py] Re: joins across databases

2011-12-03 Thread Jim Gregory
return dict(data=data) to show results in view: for row in data: {{ =row.table1.field2 }} {{ =row.field3 }} -Jim On Dec 2, 6:32 am, Jim Gregory bikesatw...@gmail.com wrote: What's the easiest way to construct my own rows object from data across two databases?  Can I create

[web2py] Re: joins across databases

2011-12-02 Thread Jim Gregory
) Retrieve data from db1. 2) For each row, retrieve data from db2 and construct your own rows object. But maybe somebody has a better solution. -- Vinicius Assef. On Thu, Dec 1, 2011 at 9:40 PM, Jim Gregory bikesatw...@gmail.com wrote: I have a legacy database that my app needs

[web2py] joins across databases

2011-12-01 Thread Jim Gregory
I have a legacy database that my app needs to connect to. The data in my app's table has a many-to-one relationship with the data in the legacy database's table. I'd like to retrieve records from my app's table plus the data associated with that record from the legacy database's table at the

[web2py] purpose of ABOUT file in route?

2011-09-21 Thread Jim Gregory
I noticed in my installation of web2py the largest file (about 7MB on my system) is a binary file in the web2py root directory named ABOUT. What is the purpose of this file, and can it be removed? My apps seems to run OK locally without it. -Jim

[web2py] Re: purpose of ABOUT file in route?

2011-09-21 Thread Jim Gregory
is an open source full-stack framework for agile development of secure database-driven web-based applications, written and programmable in Python. Created by Massimo Di Pierro mdipie...@cs.depaul.edu On Wednesday, September 21, 2011 7:34:22 AM UTC-4, Jim Gregory wrote: I noticed in my