[web2py] Re: installing py4web using pip -- where is py4web-start.py?

2020-03-12 Thread Tim Korb
> on my ubuntu system gives me: > > /home/jim/.local/bin/py4web-start > > Jim > > > On Thursday, March 12, 2020 at 7:41:26 AM UTC-5, Tim Korb wrote: >> >> I'm trying to install py4web using pip, following the instructions at >> http://py4web.com/_docume

[web2py] installing py4web using pip -- where is py4web-start.py?

2020-03-12 Thread Tim Korb
I'm trying to install py4web using pip, following the instructions at http://py4web.com/_documentation/static/index.html. (I've installed it from github, which worked, but would prefer to just use pip.) The install command (run on MacOS)... $ python3 -m pip install --upgrade py4web works fine

[web2py] Re: how to control what A displays while working

2017-02-11 Thread Tim Korb
Thanks for all the suggestions. I was able to make the "disable_with" solution work with an IMG by converting it to xml before storing, e.g., _disable_with=IMG(_src=URL('static', 'images/spinner.gif')).xml() so I'm all set. -- Resources: - http://web2py.com - http://web2py.com/book (Docu

[web2py] Re: how to control what A displays while working

2017-02-08 Thread Tim Korb
That's good, but it apparently only accepts text as the replacement. I really want to have an IMG being displayed. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Is

[web2py] Re: how to control what A displays while working

2017-02-07 Thread Tim Korb
Thanks, I'll look at that. Maybe a content= parameter to A(...) would be useful, analogous to the one for LOAD(...). -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report

[web2py] how to control what A displays while working

2017-02-07 Thread Tim Korb
I'm using the Ajax feature of the A tag to replace a component: A(IMG(_src=image), _href=URL('default', 'getit'), user_signature=True, cid=request.cid) While the content (default/getit) is being fetched, I would like to replace the current image with a spinner image, rather than the defau

[web2py] Re: Using Travis CI to test a web2py app on Github

2017-01-24 Thread Tim Korb
I was able to get Travis to work with my app by cloning Web2Py into the top level of my app directory during the Travis installation phase, then creating a symlink from the Web2Py applications directory to my app. Here's a snippet of the .travis.xml file: install: - pip install -r requiremen

[web2py] Re: ERROR:root:New installation error: unable to create welcome.w2p file

2017-01-24 Thread Tim Korb
The error message occurs the first time Web2Py is started after doing a full clone: $ git clone --recurse-submodules https://github.com/web2py/web2py.git $ cd web2py $ python web2py.py The code in fileutils.py creates welcome.w2p correctly, but then tries to unlink the missing NEWIN

[web2py] OAuth and EVE Online

2017-01-16 Thread Tim Korb
FWIW... I have created a Web2Py OAuth module for authenticating via EVE Online (the multiplayer space game). A gist is located here . Comments and suggestions welcome. -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Re: Virtual Fields in auth_user?

2014-08-30 Thread Tim Korb
Did you ever get this working? I tried the same thing, adding Field.Virtual('last_first', lambda row: "%s, %s" % (row.auth_user.last_name, row.auth_user.first_name)) to auth.settings.extra_fields['auth_user'], but get the same error message when trying to build the SQLFORM.grid. Tim

[web2py] getting nested attributes with cas_auth.py

2012-06-09 Thread Tim Korb
I'm using gluon/contrib/login_methods/cas_auth.py to authenticate against our campus CAS server. Our server returns most of the interesting values nested within a single "cas:attributes" node, which is not parsed by cas_auth.py. I modified cas_auth.py (starting around line 110) to pull all "c

[web2py] Re: oracle error after changing password

2011-12-05 Thread Tim Korb
Oh, I see. Since the password is part of the connect string, the connection string hash used for migrations has changed. Web2py is apparently trying to recreate existing tables, assuming that this is a different database. Correct? I guess I need to read the migration section in the manual mor

[web2py] oracle error after changing password

2011-12-05 Thread Tim Korb
I changed my Oracle password and updated my web2py DAL connect string, but now get the error: DatabaseError: ORA-00955: name is already used by an existing object Did something get corrupted? Any suggestions on how I can fix it? (I tried restarting the web server.) Here is the full traceback

[web2py] Re: Using web2py with a non-managed Oracle database

2011-11-23 Thread Tim Korb
Denes, Thanks for your responses--we're making progress. Tim

[web2py] Using web2py with a non-managed Oracle database

2011-11-12 Thread Tim Korb
ich is not currently supported for Oracle. How easy is that to add? I think we will also want to write an "extract_oracle_models.py" script along the lines of the extract scripts in the Web2Py scripts directory. Has anyone else done/attempted this? Tim Korb

[web2py] Re: launching web2py from script?

2011-11-01 Thread Tim Korb
Thanks. I'll follow the instructions there (looks like some useful information, in any case!). Tim

[web2py] Re: launching web2py from script?

2011-10-31 Thread Tim Korb
Did you resolve this issue any further? I'm getting the same error in a similar setting. I'm trying to run a shell script from within web2py. The shell script launches python web2py to run an asynchronous background task. The task fails with the same "import site" error message. If I start

[web2py] Re: ProgrammingError: LOB variable no longer valid after subsequent fetch

2011-08-27 Thread Tim Korb
To reproduce the error, load 50 events into the auth_events table of a default app with Oracle as database. The problem appears to be caused by the default Oracle cursor arraysize of 50. Adding... self.cursor.arraysize = 200 to the OracleAdapter __init__ method (temporarily) fixes the prob

[web2py] ProgrammingError: LOB variable no longer valid after subsequent fetch

2011-08-26 Thread Tim Korb
In moving my database backend to Oracle, I'm getting this error: ProgrammingError: LOB variable no longer valid after subsequent fetch when trying to access the db.auth_event table. The db.auth_group table works (it also has a CLOB type field). There are posts from 2009 that this problem has

[web2py] Re: Problem with Oracle access and web2py database administration

2011-08-26 Thread Tim Korb
Yes, that seems to have fixed it. Thanks!

[web2py] Re: Problem with Oracle access and web2py database administration

2011-08-25 Thread Tim Korb
I did this, but am not sure what I'm looking for. This appears... function: select and last_query: db.auth_user.id>0 for example, and lots of other settings, etc. But I don't see anything that looks like an actual SQL query. So, working with one of my colleagues, we added tracing to dal.p

[web2py] Re: Problem with Oracle access and web2py database administration

2011-08-25 Thread Tim Korb
I am using this this version... changeset: 2295:7c7f7d5ac882 date:Wed Aug 24 16:25:41 2011 -0500 I am able to reproduce the problem by creating a simple, default app and replacing the DAL line with... from gluon.custom_import import track_changes track_changes() fr

[web2py] Re: Problem with Oracle access and web2py database administration

2011-08-24 Thread Tim Korb
I'm getting the same error (Invalid Query ORA-00907: missing right parenthesis) when using the admin interface to access tables for a newly-created Oracle database (without primarykey setting).

[web2py] Re: using sum with left join

2011-08-08 Thread Tim Korb
In this case, the original order is correct: db.log.on pulls all the records from auth_user, even those that don't match a record in log. The coalesce() method added by Massimo allows the sum to be null and substitutes 0 for it.

[web2py] Re: using sum with left join

2011-08-08 Thread Tim Korb
Thanks! I looked in the book, but not in the sources. :-) The new coalesce method works great.

[web2py] Re: using sum with left join

2011-08-06 Thread Tim Korb
My understanding is that you use something like ifnull(sum(points), 0). If not, I guess I can do a separate query for the students with no entries and append 0s to the first result.

[web2py] using sum with left join

2011-08-06 Thread Tim Korb
I have a table ("log") of points awarded to students for various activities. I want to produce a summary of total points per student. This query works... db().select(db.auth_user.ALL, db.log.points.sum(), left=db.log.on(db.auth_user.id == db.log.user), groupby=db.auth_user.id) but does not

[web2py] Re: requires_permission example

2011-07-06 Thread Tim Korb
Thanks for your reply. My confusion is about "object" when it is not a table. For one thing, the appadmin interface seems to force the object to be a table--it is chosen from the drop down box of available tables. Do I have to create a dummy table for each of these permission objects? Beyon

[web2py] requires_permission example

2011-07-06 Thread Tim Korb
I'm trying to figure out this example from the book of requires_permission... @auth.requires_permission('add', 'number') def add(a, b): return a + b def function_seven(): return add(3, 4) I put this code into controllers/default.py. What additional auth db entries do I need to make th