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
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
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
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
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
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
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.
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
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
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:
>
>
>
>
>
>
>
> >
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
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
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:
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
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
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
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
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.
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
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
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.
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
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
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
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
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
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
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
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
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?
>
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
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
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
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
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
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:
>
>
>
>
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
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
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
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
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
41 matches
Mail list logo