Re: [web2py] Re: Create a service running continuously

2016-03-06 Thread Paul Gerrard
the example, 1 is the user record to use and then: > > if sys.argv[2] == 'run_my_loop': > this_user = db_auth.auth_user[sys.argv[1]] > > > if not this_user: > raise Exception('...') > auth.login_bare(this_user.email, this_user.password) > run_my

[web2py] Create a service running continuously

2016-02-29 Thread Paul Gerrard
I have written some Python code to act as a chatbot working with Slack. All looks good so far. I could add it as a service to /etc/init.d etc and make it work at startup. However... I want to enhance the service to access my MySQL database using the Web2py DAL. Now, I created a webservice to do

[web2py] Re: raspberry pi

2013-01-09 Thread Paul Gerrard
On Wednesday, 9 January 2013 22:33:18 UTC, Paul Gerrard wrote: > > > > On Sunday, 23 December 2012 04:49:45 UTC, Paul Gerrard wrote: >> >> I've had two RPIs for several months. My first task was to install Web2py >> and our app on it (Apache, MySQL and 90

[web2py] Re: raspberry pi

2013-01-09 Thread Paul Gerrard
On Sunday, 23 December 2012 04:49:45 UTC, Paul Gerrard wrote: > > I've had two RPIs for several months. My first task was to install Web2py > and our app on it (Apache, MySQL and 90 tables etc.) and it worked fine. I > used an 8Gb SD card. It wasn't lightning fast, but as

[web2py] Re: raspberry pi

2012-12-22 Thread Paul Gerrard
I've had two RPIs for several months. My first task was to install Web2py and our app on it (Apache, MySQL and 90 tables etc.) and it worked fine. I used an 8Gb SD card. It wasn't lightning fast, but as a potential test/demo environment it worked fine. Paul. On Tuesday, 13 March 2012 10:04:40

[web2py] Calendar popup displays away from date fields in Internet Explorer

2012-08-27 Thread Paul Gerrard
Hi, I'm using the calendar popup on Firefox and Chrome and all is well. But on Internet Explorer, the popup appears several inches higher on the page away from date fields. If your date field is a couple of inches from the top of the displayed window, the popup appears off screen. Most disconce

[web2py] Re: column auth_user.registration_id does not exist ERROR AFTER UPGRADE to 1.99

2012-05-28 Thread Paul Gerrard
I just had the same problem on a test version of my apps. I'm using MYSQL. The field is missing and it isn't being autocreated because Migrations=False in my db.py model, I have auth.define_tables(migrate=False) Using fake_migrate True and then trying to migrate to reset doesn't work either.

[web2py] Re: dropbox python api

2012-04-09 Thread Paul Gerrard
Hi, I got distracted by other things and only just came back to this. The problem I was having was in my code was the token was 'disabled or invalid'. I'm sure this is resolved by using the callback in the redirect back from the Dropbox site. I commented out the code that's not relevant for me

[web2py] Re: dropbox python api

2012-01-04 Thread Paul Gerrard
I just started looking at Dropbox yesterday. I've created some code that works in the python interpreter just fine, but when I paste to a web2py controller it fails. I suspect it's because the Dropbox module uses a variable calls 'session' that actually uses the Web2py session variable. Is there a

[web2py] Re: migrate file system uploads to database?

2011-10-16 Thread Paul Gerrard
fileblob: >        data = > open(os.path.join(request.folder,'uploads',row.file),'rb').read() >        row.update_record(fileblob=data) >        db.commit() > > Done > > On Oct 14, 6:16 pm, Paul Gerrard wrote: > > > > > > > > >

[web2py] Re: migrate file system uploads to database?

2011-10-14 Thread Paul Gerrard
Hi all, I have the same requirement - moving a directory of upload files into the database. I was thinking the way to do it would be to copy the original table definition, then make the field changes to the table definitions, then write a script to process all the file-based records and post them

[web2py] Re: IMPORTANT

2011-10-14 Thread Paul Gerrard
My 2p worth. I run a couple of communities relating to software testing. One is public (uktmf.com) one is private (testers-retreat.org) and this kind of discussion arises from time to time, often about face to face communications. People who are passionate DO get upset - it happens. Testers are a

[web2py] Re: featured web2py apps

2011-09-23 Thread Paul Gerrard
Hi Massimo, Can we have a separate ist of commercial apps to? (Some of us have to make a living :O)) Paul. On Sep 22, 7:59 pm, Anthony wrote: > Why does it have to use Auth? What if access control isn't relevant for the > particular app? > > Anthony > > > > On Thursday, September 22, 2011 2:52:

[web2py] Re: Date Picker Widget

2011-09-08 Thread Paul Gerrard
Hi, I used this css as is (although I did change the background colour to match my site. however... I'm using the dat picker on a field displayed in a jquerydialog. the datepicket pops up - behind the dialog box. I think the z-indexvalue needs bumping up (or is it down?) Looks good tho :O) On Se

[web2py] 80+ Tables in a single model - user and application caching?

2011-08-18 Thread Paul Gerrard
Hi all, Just to support/commiserate with Kevin, we have a SaaS app that has 80 tables, with 980 lines of code in a db.py model file. It runs remarkably quick (against a MySQL database on a relatively low powered develoment server) for the amount of work it does. I've grouped the tables into a ser

[web2py] Re: web2py_ajax.js - jQuery().html v DOM innerHTML issue

2011-07-17 Thread Paul Gerrard
It now appears the ajax routine won't for me at all in some cases. It looks like it's not passing the value of the field in the second parameter to the POST to the server. Any ideas? Paul. On Jul 17, 4:24 pm, Paul Gerrard wrote: > Hi, > > Today, I upgraded my web2py ve

[web2py] web2py_ajax.js - jQuery().html v DOM innerHTML issue

2011-07-17 Thread Paul Gerrard
Hi, Today, I upgraded my web2py version from 191.6 to 1.97.1 - all went well except where I had used the autocomplete jquery plugin on jquery dialog boxes. (I do thsi lots of times). Let me explain. 1. I create a dialog box using jquere dialog plug in 2. Then I use Web2py ajax to populate the div

[web2py] Re: For Massimo: which version of book to buy?

2011-06-22 Thread Paul Gerrard
Call me old-fashioned, but I for one *prefer* the paper book to online 8O) Online is a good fall-back if I can't find what I want. Things are moving quickly - when will the next paper version be available? Paul.

[web2py] Uploading a zip file

2011-04-05 Thread Paul Gerrard
I'm trying to export some files generated from my application and provide them as a zip file to the user. I'm creating a zip file using Python zipfile module and the zip file is created fine. Then I upload that file to the DB to allow them to download it from the usual uploads directory. The code s

[web2py] Uploading a zip file

2011-04-05 Thread Paul Gerrard
I'm trying to export some files generated from my application. I'm creating a zip file with the file in directly (using Python) and the zip file is created fine. Then I want to upload that file to the DB to allow them to download it from the uploads directory. The code snippet below works fine and

[web2py] Re: Using my own dropdown lists

2011-03-25 Thread Paul Gerrard
Sorry - false alarm. It's exactly as it should be - a typo in my code threw me completely. form.vars.fieldname is of course the way to go. Doh! :O) Paul.

[web2py] Using my own dropdown lists

2011-03-25 Thread Paul Gerrard
Hi, I have a screen transaction that uses a select drop down list that i create myself using code in my controller. All works well except when I have an error on another field, Web2py highlights the error on screen, but if I've made a selection using the drop down list, the selection made (if diff

web2py@googlegroups.com

2011-02-18 Thread Paul Gerrard
r, > not. > > On Thu, Feb 17, 2011 at 7:00 PM, Paul Gerrard > wrote: > > > > > > > > > On more than one occasion, I've been caught out by a slip in my select > > statements. If you use 'and' rather than '&' to combine criter

web2py@googlegroups.com

2011-02-17 Thread Paul Gerrard
On more than one occasion, I've been caught out by a slip in my select statements. If you use 'and' rather than '&' to combine criteria for a select you get different results. In the first case, (and) the code returns a single record, regardless of the values of the critieria used for the selection

[web2py] Re: Authentication and multiple logon sessions

2010-11-12 Thread Paul Gerrard
Two machines with FF would be more reliable :O) I have a related question. Is there are way of stopping a user account being used by more than one person simultaneously? Is there anything in Web2p to help with thsi or would I need to have some form of DB/ session solution? Thanks. On Nov 11, 5:2

[web2py] Re: web2py organization - important for consultants !!!

2010-11-12 Thread Paul Gerrard
Here are my comments on the Guidelines page. Some of these are duplicates with other peoples' comments - but what the heck. ---> is my suggestion ...Our choice of technologies is motivated but a belief in Rapid Application Development(RAD) --->by ...applic

[web2py] Looking to make contact with (UK based) dev/collaborators

2010-11-02 Thread Paul Gerrard
Hi, I'm currently building an application which we will host on our servers as a pay-for-use commercial service. We're making contact with some beta evaluators who we hope will help us to refine the product and hopefully, pay for the service and be our initial reference sites. The website will be

[web2py] Re: DB Select with date criteria

2010-10-12 Thread Paul Gerrard
Hi, Many thanks. Tried it and it didn't work. I had a rather subtle error in my code it seems... and then it worked just fine. Sometimes just changing some code rather than staring at it triggers a chain of failure and thinking events and the solution emerges! Thanks for the tip - much appreciat

[web2py] DB Select with date criteria

2010-10-12 Thread Paul Gerrard
Hi, I can't find a usable reference to selecting records from a database table based on the value of datetime fields. Here's my situation: I have a table with two date fields: db.define_table("announcements", SQLField("validfrom", "datetime", notnull=True, default=datetime.today(), l

[web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-23 Thread Paul Gerrard
start > > is setup a structure on Google (although i have noe clue yet what the > > procedures are yet to get that going... a simple sign up?) and play > > with a few ideas. So, where do we go from here, meaning how do we get > > a group of interested people to join in? >

[web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-22 Thread Paul Gerrard
Hi All, Like Mart - I'd better declare an interest and some knowledge in this area. My company is Gerrard Consulting (www.gerrardconsulting.com) I'm very active in the UK and European testing community and have written a couple of books, done lots of conference work, host the UK Test Management F

[web2py] Re: Behaviour of extend/layouts changed in 1.82.1?

2010-08-14 Thread Paul Gerrard
printMode Boolean to detemine whether to display the "Printer Friendly" link on the page. Many thanksThadeus. On Aug 13, 11:07 pm, Paul Gerrard wrote: > I suspected that I had done something that worked 'by chance' and the > new version caught me out. :) > > Thank

[web2py] Re: Behaviour of extend/layouts changed in 1.82.1?

2010-08-13 Thread Paul Gerrard
Print.html' if > request.vars.get('printMode', None) else 'layout.html' > > in templates.py > {{extend response.printMode}} > > -- > Thadeus > > On Fri, Aug 13, 2010 at 10:31 AM, Paul Gerrard > > > > wrote: > > Hi, > > > I

[web2py] Behaviour of extend/layouts changed in 1.82.1?

2010-08-13 Thread Paul Gerrard
Hi, I have a lot of views in my system with the following code at the top of the view html: {{import string}} {{if request.vars and 'printMode' in request.vars:}} {{printMode=request.vars['printMode']}} {{else:}} {{printMode=None}} {{pass}} {{if printMode:}} {{extend 'layoutPrint.html'}} {{else

[web2py] Ajax works differently in IE and Firefox

2010-07-23 Thread Paul Gerrard
Hi, I have a view that displays rows of data, each of which a form that can be edited (passed in an array). Each row has (among other fields), two SELECT lists. The values displayed in the second list depend on the first. I use Ajax to refresh the second list if the first one changes. Using IE 8

[web2py] Re: Problems changing table definition

2010-07-21 Thread Paul Gerrard
ks again. On Jul 21, 11:07 am, mdipierro wrote: > It is better to always use web2py but remember to use (default) > migrate=True every time you edit the db. > You may also want to keep a backup of your database/*.tables > > On Jul 21, 4:54 am, Paul Gerrard wrote: > > > >

[web2py] Re: Problems changing table definition

2010-07-21 Thread Paul Gerrard
An updqate. I read the manual 6.4 on Migrations. I've added a migrate='tablename' aramter to the table definition call. It seems to work. So I guess I've disconnected the table definition from the Web2py table history. So far so good. So I have a more general point. "Is it 'better' to manage da

[web2py] Problems changing table definition

2010-07-21 Thread Paul Gerrard
Hi, I'm having great problems changing the definition of a table. I'm using MYSQL as a back end. After many problems, I ended up deleting a table entirely and trying to recreate it in my DB model. I dropped the table from MYSQL directly and tried to use the new model. Unfortunately, I get a messa

[web2py] Re: does anybody know what happened to www.web2pyslices.com?

2010-06-10 Thread Paul Gerrard
Hi, If you want a new ISP - I have four under used servers that I'm happy to offer as a host for the site for free if you want. I currently host around 30 (several are mine, most for friends, all for free) websites with ASP, Perl, PHP, MySQL, Sharepoints, SQL Server and of course my own Web2py dev

[web2py] Re: Emails lack the From: header

2010-06-07 Thread Paul Gerrard
Hi, Ahh - I'm on 1.76.5 - I'll upgrade and watch out for that next time. Sorry. Paul. On Jun 7, 2:37 pm, mdipierro wrote: > This was fixed in 1.78.3. Do you have an earlier version? > > On Jun 7, 2:11 am, Paul Gerrard wrote: > > > > > Hi, > > > Usi

[web2py] Emails lack the From: header

2010-06-07 Thread Paul Gerrard
Hi, Using the auth/email functionality. I use the code below (extracted from my default.py controller) and executing testmail function send emails but it appears not to set up the "From:..." header in the message. When the email arrives in my inbox, Outlook put the message striaght into the junk