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
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
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?
&
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
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
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
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
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
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
).
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
{{=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
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
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
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
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?
--
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
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
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
, 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
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
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'
)
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
, 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
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
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
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
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
) 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
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
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
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
47 matches
Mail list logo