[web2py] Using GAE Launcher - a beginner's question

2012-09-02 Thread Andy W
I am experimenting with web2py and GAE. web2py is running fine on my local machine (Windows 7) but I cannot get even the default Welcome app to run on the GAE SDK. Here are the detailed steps I have taken: 1. Downloaded web2py (v 2.0.6) and unpacked to E:\web2py 2. Run locally with the web2py ro

Re: [web2py] Using GAE Launcher - a beginner's question

2012-09-02 Thread Andy W
That fixed it - many thanks! On Sunday, September 2, 2012 4:11:24 PM UTC+4, Jan-Karel Visser wrote: > > put a # in front off - datastore_admin in the yaml and off you go :) > > > 2012/9/2 Andy W > > >> I am experimenting with web2py and GAE. web2py is running fine on my

[web2py] Setting up memcache on GAE - a basic question

2013-02-14 Thread Andy W
I would like to store both session data and cached data in memcache when I upload my app to GAE. Can anybody point me in the right direction for setting this up? Based on the web2py scaffolding app I have tried (in models/db.py): if not request.env.web2py_runtime_gae: db = DAL('sqlite://sto

[web2py] Re: Setting up memcache on GAE - a basic question

2013-02-16 Thread Andy W
Hi howesc The stack trace from the SDK log console is: ERROR2013-02-16 09:50:09,757 restricted.py:161] Traceback (most recent call last): File "/Users/andy/www/web2py/gluon/restricted.py", line 212, in restricted exec ccode in environment File "/Users/andy/www/web2py/applications

[web2py] Re: Setting up memcache on GAE - a basic question

2013-02-17 Thread Andy W
Thanks for the feedback Christian. It seems to be this that causes the problem on GAE but works on sqlite: students = cache.ram('students', lambda:db(db.student.id>0).select(db.student.id, db.student.family_name,

[web2py] Re: Setting up memcache on GAE - a basic question

2013-02-19 Thread Andy W
>>> db.student.family_name, >>> ... >>> db.student.student_age).to_dict(), >>> 3600) >>> >>> >>> On Sunday, February

[web2py] Re: Setting up memcache on GAE - a basic question

2013-02-20 Thread Andy W
tp://web2py.com/books/default/chapter/29/06?search=cacheable#Caching-selects > > i'm not sure if that is yet in a stable release, or if it has been fully > tested. > > cfh > > On Tuesday, February 19, 2013 7:55:25 AM UTC-8, Andy W wrote: >> >> Thanks for the inpu

[web2py] Two LOAD components in a tabbed view

2012-10-28 Thread Andy W
I am trying to display some data on a student and embed within it 2 ajax forms - one to add/edit/display contacts for the student, the other to add/display notes relating to them. I can get it working as a simple view but now want to display the ajax forms on different tabs. When I try to do th

[web2py] Running GAE locally - beginners question

2012-11-20 Thread Andy W
I am having trouble getting GAE to run a simple app on the desktop with GAE Launcher. Any pointers to what I am doing wrong would be appreciated! So far I have: 1. Downloaded web2py source (v 2.2.1) and installed GAE Launcher (on mac) 2. Created app.yaml from app.example.yaml in the main w

[web2py] Re: Running GAE locally - beginners question

2012-11-22 Thread Andy W
r and paste in the output from a > launch and first URL access? i suspect there is a config issue and > hopefully the logs will help us debug! > > cfh > > On Tuesday, November 20, 2012 6:40:39 AM UTC-8, Andy W wrote: >> >> I am having trouble getting GAE to run a simple

[web2py] De-normalizing data to run on GAE

2012-11-28 Thread Andy W
Can anybody expand on 13.5 of the Web2py Manual on how best to adapt an app to run on GAE? In particular, how to do away with linked tables. For example, I have a simple app that generates a cash receipt. The input form displays a dropdown list for the user to select a payment method (cash, cre

[web2py] Re: De-normalizing data to run on GAE

2012-11-29 Thread Andy W
nt_method.name)] > db.receipt.paid_by.requires = IS_IN_SET(payment_methods) > should be: > payment_methods=[p.name for p in db(db.payment_method.id>0).select( > db.payment_method.name)] > db.receipt.paid_by.requires = IS_IN_SET(payment_methods) > > cfh > > > > On Wednesday, Novembe

[web2py] Re: De-normalizing data to run on GAE

2012-11-30 Thread Andy W
No - just 'normal' tables for the moment. On Thursday, November 29, 2012 11:01:12 AM UTC+4, Andy W wrote: > > Can anybody expand on 13.5 of the Web2py Manual on how best to adapt an > app to run on GAE? In particular, how to do away with linked tables. > > For example,

[web2py] User Login causes error on GAE

2013-10-01 Thread Andy W
My application works fine locally with rocket/SQLlite but on GAE it now fails when a user logs in. It was working previously. The problem appeared when I added an extra field to auth_user. I have now removed this field but the error remains. I do not understand the error log sufficient to know wh

[web2py] Re: User Login causes error on GAE

2013-10-02 Thread Andy W
, Massimo Di Pierro wrote: > > Which web2py version? Was this on upgrade of what triggered the problem? > > On Tuesday, 1 October 2013 23:48:18 UTC-5, Andy W wrote: >> >> My application works fine locally with rocket/SQLlite but on GAE it now >> fails when a user logs in. >

[web2py] Re: User Login causes error on GAE

2013-10-04 Thread Andy W
UTC+4, Massimo Di Pierro wrote: > > Something is resetting auth.settings.table_user. Do you have that your > code. Do you use lazy tables? > > On Wednesday, 2 October 2013 23:06:09 UTC-5, Andy W wrote: >> >> Version 2.6.4 >> Upgrade seemed to go OK. Soon after the upgrade

[web2py] Re: User Login causes error on GAE

2013-10-05 Thread Andy W
Done - issue 1706 On Friday, October 4, 2013 11:28:08 PM UTC+4, Massimo Di Pierro wrote: > > Can you please open a ticket an point it to this thread? > > On Friday, 4 October 2013 12:20:42 UTC-5, Andy W wrote: >> >> Thanks for that Massimo. >> Using lazy tables seem

[web2py] Re: AppAdmin: CSV import bug

2013-11-22 Thread Andy W
Just come across the same problem - using ver 2.7.4 with pythonanywhere.com The issue seems to be with the csv files created by Excel (I am on Mac OSX). I have a simple 2-column list of ISO country codes and nationalities on an Excel spreadsheet. Saving from Excel to CSV creates a file that, wh

[web2py] Re: Understanding the download function

2016-05-09 Thread Andy W
g any file back to the browser (though it > requires that you know the full path to the file on the filesystem). > > Anthony > > On Monday, May 9, 2016 at 10:29:00 AM UTC-4, Andy W wrote: >> >> I have a multi-tenant application, where users can upload files. I save >>

[web2py] Custom download function

2016-05-08 Thread Andy W
I have a multi-tenant application, where users can upload files. I save these in a different directory for each client (tenant), so I can keep tabs on the overall disk space and number of files uploaded by each. This works when defined in a model: FILE_PATH=os.path.join(request.folder, 'uploads

[web2py] Understanding the download function

2016-05-09 Thread Andy W
I have a multi-tenant application, where users can upload files. I save these in a different directory for each client (tenant), so I can keep tabs on the overall disk space and number of files uploaded by each. This works fine when the table is defined in a model file - from the view I can dow

[web2py] Re: Record Versioning ON, result 'id'

2019-02-12 Thread Andy W
Have you changed the structure of the table being archived? I have had instances in the past where I have added an extra field to my table and all works OK until I change a record. At that point, archiving fails because there is now a mismatch between the structure of the table and the correspon

[web2py] Cache selects in a multi-tenant application

2014-08-08 Thread Andy W
As a novice, I would welcome the community's insights in to how I should approach caching selects in a multi-tenant application. For a single user, my controller had: def list(): adults = cache.ram('adults', lambda:db(db.adult.id>0).select(),3600) return dict(adults=adul

[web2py] Validating SQLFORM decimal input field

2015-04-21 Thread Andy W
My app includes a simple SQLFORM for generating payment receipts. The payment amount is stored as type='decimal(10,2)' using a MySQL database. All works fine if the user enters the payment amount using just numbers (eg '1000'). However, if they include a ',' for the thousands separator in the p

[web2py] Re: Validating SQLFORM decimal input field

2015-04-22 Thread Andy W
Hi Annet I appreciate the quick response. I changed the table definition to include: Field('payment_amount', type='decimal(10,2)', label=T('Payment Amount'), requires=IS_DECIMAL_IN_RANGE(-1e100, 1e100, dot=".")), Entering an amount of say '1,000' now traps the error at the

[web2py] Re: btw: great job

2017-04-23 Thread Andy W
+1 On Sunday, April 23, 2017 at 7:35:29 AM UTC+4, lucas wrote: > > hey everyone, > > I think we should recognize and congratulate Massimo and the developers of > web2py. its been nearly a year since the last production update and the > whole platform is just excellent. > > it is the most stab

[web2py] Re: Understanding the download function

2017-10-08 Thread Andy W
deletable=True, showid=True, > upload=URL('download') > ).process() > if form.accepted: > session.flash='Info: you have updated your company details!!' > redirect(URL('manage_company')) > elif form.errors: >

[web2py] Display uploaded image only if it exists

2015-07-19 Thread Andy W
My model includes an optional image upload: db.define_table('adult', Field('staff_id', type='integer', label=T('Staff ID')), Field('thumbnail', type='upload', label=T('Photo')), In the view I want to display the image if it exists, but hide it if null: {{=form.custom.be

[web2py] The .represent() method and export_to_csv

2015-10-12 Thread Andy W
Hi all Following the example in the book , I can display the contents of a database table (ie the list of animals in the book example) on the screen and add a button to download the data to a CSV file. However, chang

[web2py] Re: web2py seems to be ignoring my html page and just displaying function varibles

2019-10-04 Thread Andy W
eally like how quickly I could role out a web app with web2py but this is hampering me.. On Friday, 4 October 2019 05:43:27 UTC+1, Massimo Di Pierro wrote: > > is the file in controllers/basic/random_number.html ? > > On Thursday, 3 October 2019 20:32:05 UTC-7, Andy W wrote: >> &

[web2py] Re: web2py seems to be ignoring my html page and just displaying function varibles

2019-10-04 Thread Andy W
It's like the function return locals is acting as print locals and overiding the html view, if I add another string as a variable that will show on the html view too.. On Friday, 4 October 2019 10:34:15 UTC+1, Andy W wrote: > > The basics.py file is in web2py/applications/

[web2py] Re: web2py seems to be ignoring my html page and just displaying function varibles

2019-10-04 Thread Andy W
Thank you so much, on creation of the file I typed the filename rather than basics/filename Working as expected now. On Friday, 4 October 2019 12:17:10 UTC+1, villas wrote: > > As Massimo implies, your function is not finding your view, so it is > using a generic view instead. > > Check caref

[web2py] Re: Having a function always running in the background

2020-09-02 Thread Andy W
If you are using PythonAnywhere, they have Scheduled Tasks and (for paid accounts) an Aways-on Task. These are very simple to use. I use them for managing the queue of outgoing emails. Andy On Wednesday, September 2, 2020 at 5:09:15 PM UTC+10 mostwanted wrote: > You are on point Jim, you get