[web2py] How to a web2py environment along to subprocess?

2012-12-17 Thread Ian W. Scott
I'm running a file like this: python ~/web/web2py/web2py.py -S paideia -M -R applications/paideia/bin/runtest.py Then I launch a subprocess from runtest.py like this: proc = subprocess.Popen(py.test {}.format(test_dir), stdout=subprocess.PIPE,

[web2py] Re: importing modules to test file using pytest

2012-12-17 Thread Ian W. Scott
. since right now you have to configure things in the test runner file itself). But it's a working start. On Wednesday, December 5, 2012 3:06:45 PM UTC-5, Ian W. Scott wrote: [edit: sorry, I forgot the runtest.py attachment before.] I'm trying to use pytest (instead of unittest) to do unit

[web2py] Re: How to a web2py environment along to subprocess?

2012-12-17 Thread Ian W. Scott
Sorry, the question title should read How to *pass* a web2py environment along . . . I can't seem to correct the title! On Monday, December 17, 2012 11:11:47 AM UTC-5, Ian W. Scott wrote: I'm running a file like this: python ~/web/web2py/web2py.py -S paideia -M -R applications/paideia

[web2py] How to create, log-in, and delete user in auth via command line

2013-02-04 Thread Ian W. Scott
I need to create a few user accounts as testing fixtures during some unit tests. How can I do the following via the web2py api? - create a new user account using Auth - log that new user in using Auth - log that user out - delete that user account (as part of test tear-down) If I've missed

[web2py] Re: How to create, log-in, and delete user in auth via command line

2013-02-04 Thread Ian W. Scott
-6, Ian W. Scott wrote: I need to create a few user accounts as testing fixtures during some unit tests. How can I do the following via the web2py api? - create a new user account using Auth - log that new user in using Auth - log that user out - delete that user account (as part of test

[web2py] Append() multiple components to html helper

2013-05-23 Thread Ian W. Scott
Is there a way to append multiple components to an HTML helper in a single append() call, or do we have to use a separate append() call for each component? I'm trying to append four components to a SPAN helper held in the variable wrapper. I've tried it this way:

[web2py] Re: Append() multiple components to html helper

2013-05-24 Thread Ian W. Scott
, new_component_4]) Perhaps we should add an .extend() method directly to the helpers, as we already have .append() and .insert(). Anthony On Thursday, May 23, 2013 5:49:34 PM UTC-4, Ian W. Scott wrote: Is there a way to append multiple components to an HTML helper in a single append() call, or do

[web2py] Can I have access to the LESS files that generate the welcome app css?

2013-06-17 Thread Ian W. Scott
Hi. I noticed on the forum here mention of LESS files that are used to generate the welcome app css but are not included in the web2py distribution. I'm trying to customize Bootstrap from the LESS files, and it would make things easier if I could have those LESS files. Is there any particular

[web2py] Re: Can I have access to the LESS files that generate the welcome app css?

2013-06-17 Thread Ian W. Scott
Bootstrap version 2.2.2, although 2.3.2 is pretty much a drop in replacement. Regards, Ales On Monday, June 17, 2013 9:50:16 PM UTC+2, Ian W. Scott wrote: Hi. I noticed on the forum here mention of LESS files that are used to generate the welcome app css but are not included in the web2py

[web2py] How to remove test user's registration

2013-06-25 Thread Ian W. Scott
Hi again, I'm working on returning my test db to its initial state after I run my unit/integration tests. I'm registering a test user just fine using the fantastic WebClient. But how can I remove that test user afterwards? (Otherwise I'll end up with my test db cluttered with redundant test

[web2py] Re: How to remove test user's registration

2013-06-25 Thread Ian W. Scott
Ok, thanks Anthony. So what you're saying is that there's no auth method or anything parallel to user/register. You just remove the db.auth row directly. That's simple enough. Ian On Tuesday, June 25, 2013 1:57:23 PM UTC-4, Ian W. Scott wrote: Hi again, I'm working on returning my test db

[web2py] Flat text files as data source for web2py

2013-06-25 Thread Ian W. Scott
I'm attracted to the spate of recent flat-file blogging platforms, using plain text (markdown) files to store the blog posts. I especially like the idea of using dropbox or a git repo to store the files. Has anyone experimented with this in web2py? I can imagine at least two ways of doing it:

[web2py] Re: Flat text files as data source for web2py

2013-06-26 Thread Ian W. Scott
on real-time retrieving/recompiling blog posts. If you need that kind of process, just use auth.wiki(). On Tuesday, June 25, 2013 8:55:58 PM UTC+2, Ian W. Scott wrote: I'm attracted to the spate of recent flat-file blogging platforms, using plain text (markdown) files to store the blog

[web2py] Help with WebClient and Pytest

2013-06-26 Thread Ian W. Scott
I'm trying to use WebClient in a pytest suite and getting an error that I don't understand. I try to connect like this: client = WebClient('http://127.0.0.1:8000/paideia/default/', postbacks= True) client.get('index') But client.get('index') throws an error. The error arises in

[web2py] Re: Flat text files as data source for web2py

2013-06-26 Thread Ian W. Scott
Ah, I get it. That makes sense. On Wednesday, June 26, 2013 4:32:50 PM UTC-4, Niphlod wrote: On Wednesday, June 26, 2013 7:07:33 PM UTC+2, Ian W. Scott wrote: Thanks Niphlod. I'm intrigued by the diffbook project, so I'll take a look at your github repo. My main interest

[web2py] Re: I cannot get track_changes to work

2013-06-26 Thread Ian W. Scott
I just have this snippet as the first code (after imports) in my models/db.py: from gluon.custom_import import track_changes track_changes(True) I don't use the condition that is recommended: if request.is_local: I seem to remember having trouble when that condition was present. So I just

Re: [web2py] Help with WebClient and Pytest

2013-06-26 Thread Ian W. Scott
at 3:21 PM, Ian W. Scott scot...@gmail.comjavascript: wrote: I'm trying to use WebClient in a pytest suite and getting an error that I don't understand. I try to connect like this: client = WebClient('http://127.0.0.1:8000/paideia/default/', postbacks=True) client.get

[web2py] Problem viewing error tickets: no attribute 'lazyT_unpickle'

2013-09-18 Thread Ian W. Scott
Hi everyone, I've suddenly started running into an error whenever I try to view error tickets through the admin app: AttributeError: 'module' object has no attribute 'lazyT_unpickle' Any idea what is causing it? I'm running the latest stable version (2.6.3) on python 2.7 (Linux). The

[web2py] Some forms need to be submitted multiple times.

2013-09-18 Thread Ian W. Scott
I'm experiencing an odd problem where some of my forms (including registration and login forms) need to be submitted 2 or 3 times before they are processed. It's been hard to solve because it doesn't seem entirely consistent. Has anyone run into this, and does anyone have any idea what the

[web2py] Re: Some forms need to be submitted multiple times.

2013-09-20 Thread Ian W. Scott
W. Scott wrote: I'm experiencing an odd problem where some of my forms (including registration and login forms) need to be submitted 2 or 3 times before they are processed. It's been hard to solve because it doesn't seem entirely consistent. Has anyone run into this, and does anyone have any

[web2py] Re: Problem viewing error tickets: no attribute 'lazyT_unpickle'

2013-09-20 Thread Ian W. Scott
Ah, yes that may be it. Would that cause the error I'm getting? On Wednesday, September 18, 2013 12:40:58 PM UTC-4, Massimo Di Pierro wrote: Are you using web2py 2.6.x to view a ticket created by a previous version? On Wednesday, 18 September 2013 09:58:20 UTC-5, Ian W. Scott wrote: Hi

[web2py] Re: Some forms need to be submitted multiple times.

2013-09-21 Thread Ian W. Scott
form empty, (fill the blanks :-P) ? On Friday, September 20, 2013 10:26:39 PM UTC+2, Ian W. Scott wrote: Sorry for the slow response. I'm experiencing this with 2.6.3 but have also had the problem with the last couple of versions. It has been the kind of thing that I keep putting off

[web2py] Migrating field from string to integer type

2014-01-17 Thread Ian W. Scott
Hi folks, I'm wondering whether it's safe to just change the data type of a field from 'string' to 'integer' if all of the field values are integer strings (i.e., strings that could be converted properly with python's int(string)). Will the data be safe in such a conversion or do I need to use

[web2py] Re: app not working after install 2.8.2 is_mobile error

2014-01-31 Thread Ian W. Scott
I just ran into this same error using the auto-update to come up to 2.8.2. I was able to find this solution, but it did cost me about 1.5 hours of figuring out what was wrong. Not so bad in the grand scheme of things, but maybe the auto-update interface in the admin app could include some way

[web2py] Standard way to access a referenced table?

2014-02-12 Thread Ian W. Scott
I've been working for a while on a very flexible (and so increasingly complex) multiple-select widget that can be re-populated from the db via ajax (without submitting the form). One think I had to do was figure out how to get the name of the table referenced by the field using my widget. With

[web2py] Re: Standard way to access a referenced table?

2014-02-12 Thread Ian W. Scott
: db.mytable.myfield.type.split(' ')[-1] Anthony On Wednesday, February 12, 2014 3:58:58 PM UTC-5, Ian W. Scott wrote: I've been working for a while on a very flexible (and so increasingly complex) multiple-select widget that can be re-populated from the db via ajax (without submitting the form). One

[web2py] Change 'working...' message in ajax links

2014-03-18 Thread Ian W. Scott
I want to change the default 'working...' message presented in an ajax link while it is waiting for the callback to return. I couldn't find anything about this in the web2py manual, but looking in web2py.js it looks like the message can be overridden by setting the data-disable-with value on

[web2py] Re: Bootstrap3 package - help to test

2014-03-18 Thread Ian W. Scott
Although I'm replying late, I just want to say a huge thanks for tackling this. It's something I've wanted to get to for a few months, and it's great to see that I don't have to start from scratch. If there was an initial lack of response I suspect it's just that many people like me happened to

[web2py] How to migrate to UUID references in db without messing up reference fields

2014-05-14 Thread Ian W. Scott
I need to take an existing db and implement a UUID referencing system so that I can sync local db's with a central remote version. But I'm concerned that this will break reference fields that refer to the newly synced rows. My understanding is that the UUID field is necessary because a csv

[web2py] Re: How to migrate to UUID references in db without messing up reference fields

2014-05-23 Thread Ian W. Scott
After 10 days I've received no help on this. Is there something about the question that is inappropriate? On Wednesday, May 14, 2014 11:44:43 AM UTC-4, Ian W. Scott wrote: I need to take an existing db and implement a UUID referencing system so that I can sync local db's with a central

Re: [web2py] How to migrate to UUID references in db without messing up reference fields

2014-05-24 Thread Ian W. Scott
it worth jumping in. On 14/05/14 16:44, Ian W. Scott wrote: I need to take an existing db and implement a UUID referencing system so that I can sync local db's with a central remote version. But I'm concerned that this will break reference fields that refer to the newly synced rows

[web2py] Re: How to migrate to UUID references in db without messing up reference fields

2014-05-24 Thread Ian W. Scott
',Field('name'),Field('owner',requires=IS_IN_DB(db,'person.uuid','name')) Except the reference will not be enforced at the DB level, only at the web2py level. Massimo On Friday, 23 May 2014 23:04:10 UTC-5, Ian W. Scott wrote: After 10 days I've received no help

[web2py] Re: How to migrate to UUID references in db without messing up reference fields

2014-06-03 Thread Ian W. Scott
single table. I agree a better solution would be desirable. Massimo On Saturday, 24 May 2014 10:58:39 UTC-5, Ian W. Scott wrote: Thanks Massimo. I explained my problem a bit better (I hope) in my reply to Philip below. There are a couple of reasons why the approach you suggest isn't

[web2py] Keep values with a list:string field?

2014-06-25 Thread Ian W. Scott
I've got a SQLFORM.factory form set to keep values after processing with process(keepvalues=True). But it doesn't work on a list:string field. The (otherwise very nice) widget loses all but the first value when the form is submitted (i.e., all but the first text inputs for the field disappear).

[web2py] Re: how to making a field unique based on another field's value

2014-06-25 Thread Ian W. Scott
I believe you just set this through the requires property of the field: db.table2.table1_name.requires(IS_IN_DB(db, 'table1.name', db.table1._format)) That prevents entering any values in table1_name that aren't in table1.name. I believe you can also set

[web2py] Broken ajax links giving unrecognized expression error

2014-07-09 Thread Ian W. Scott
Some ajax links that used to work have just broken and I'm not sure where to start in debugging. The links target a load component on the page (using cid) and they have started throwing this error: Syntax error, unrecognized expression:

[web2py] Broken ajax links in component

2014-07-10 Thread Ian W. Scott
I'm in the process of upgrading a site from bs2 to bs3 and I've run into an unexpected (and possibly unrelated?) error. On one page I have links in one component that are supposed to update another component. The links are now broken and raise an error: Syntax error, unrecognized expression:

[web2py] Re: Broken ajax links giving unrecognized expression error

2014-07-10 Thread Ian W. Scott
Yes, it's in the browser's console, and it's targeting jquery.js line 3. On Thursday, July 10, 2014 6:02:18 AM UTC-4, Niphlod wrote: do this come up in the browser's console ? if yes, what line do they target of what js file ? On Wednesday, July 9, 2014 11:57:39 PM UTC+2, Ian W. Scott wrote

[web2py] Re: Broken ajax links in component

2014-07-10 Thread Ian W. Scott
Sorry for the double post of this question. My original post took several hours to appear, so I thought it hadn't gone through. On Wednesday, July 9, 2014 3:31:33 PM UTC-4, Ian W. Scott wrote: I'm in the process of upgrading a site from bs2 to bs3 and I've run into an unexpected

[web2py] Re: Broken ajax links in component

2014-07-10 Thread Ian W. Scott
I'm not running jquery 1.9. It's version 1.10.2. But I can try 1.11 and see what happens. On Thursday, July 10, 2014 6:32:27 AM UTC-4, Leonel Câmara wrote: Have you tried updating jquery to 1.11 this seems like a known jquery 1.9 bug. -- Resources: - http://web2py.com -

[web2py] Re: Broken ajax links giving unrecognized expression error

2014-07-10 Thread Ian W. Scott
It'll take a bit of time, but I'll see what I can do. On Thursday, July 10, 2014 8:37:31 AM UTC-4, Niphlod wrote: can you pack a minimal app to reproduce the issue ? On Thursday, July 10, 2014 12:54:03 PM UTC+2, Ian W. Scott wrote: Yes, it's in the browser's console, and it's targeting

[web2py] Re: Broken ajax links giving unrecognized expression error

2014-07-10 Thread Ian W. Scott
links could work before but now choked the bootstrap js. Maybe this is something we should keep in mind as people migrate from bootstrap 2 to 3. Anyway, thanks for your willingness to help Niphlod. On Wednesday, July 9, 2014 5:57:39 PM UTC-4, Ian W. Scott wrote: Some ajax links that used

[web2py] Re: Broken ajax links in component

2014-07-10 Thread Ian W. Scott
I found the culprit. The ajax links were in a list with the bootstrap classes nav nav-tabs. In bootstrap 3 the tabs js was choking on the url when an item was clicked. On Thursday, July 10, 2014 6:57:51 AM UTC-4, Ian W. Scott wrote: I'm not running jquery 1.9. It's version 1.10.2. But I can

[web2py] request_reset_password not returning a form

2015-01-26 Thread Ian W. Scott
When I click on Lost Password in the user menu I just get a page with a blank body. The url to which I'm forwarded seems right (http://ianwscott.webfactional.com/paideia/default/user/request_reset_password?_next=/paideia/default/index) but there's no form on the page. It's as if the page

[web2py] Re: SQLFORM hanging on insert

2015-01-30 Thread Ian W. Scott
there ? On Thursday, January 29, 2015 at 10:05:30 PM UTC+1, Ian W. Scott wrote: Oh, and I'm running version 2.9.11-stable. On Thursday, January 29, 2015 at 4:00:54 PM UTC-5, Ian W. Scott wrote: I have a create form (SQLFORM) that works (a new record is actually created) but immediately after inserting

[web2py] Re: SQLFORM hanging on insert

2015-01-30 Thread Ian W. Scott
there ? On Thursday, January 29, 2015 at 10:05:30 PM UTC+1, Ian W. Scott wrote: Oh, and I'm running version 2.9.11-stable. On Thursday, January 29, 2015 at 4:00:54 PM UTC-5, Ian W. Scott wrote: I have a create form (SQLFORM) that works (a new record is actually created) but immediately after

[web2py] Re: SQLFORM hanging on insert

2015-02-05 Thread Ian W. Scott
Hi folks. I still don't really know how to debug this problem beyond what I've done (identify the point in the gluon code where the hang happens). Can anyone at least suggest another strategy for debugging it? Thanks again, Ian On Thursday, January 29, 2015 at 4:00:54 PM UTC-5, Ian W. Scott

[web2py] Re: SQLFORM hanging on insert

2015-02-06 Thread Ian W. Scott
code except you do not need db.commit() but it should not hurt. On Thursday, 5 February 2015 14:46:58 UTC-6, Ian W. Scott wrote: Hi folks. I still don't really know how to debug this problem beyond what I've done (identify the point in the gluon code where the hang happens). Can anyone

[web2py] Re: request_reset_password not returning a form

2015-01-27 Thread Ian W. Scott
at 1:04:05 PM UTC-7, Ian W. Scott wrote: When I click on Lost Password in the user menu I just get a page with a blank body. The url to which I'm forwarded seems right ( http://ianwscott.webfactional.com/paideia/default/user/request_reset_password?_next=/paideia/default/index) but there's

[web2py] Re: SQLFORM hanging on insert

2015-01-30 Thread Ian W. Scott
application At the prompt issue: [1] db.commit() does it stall? Il giorno venerdì 30 gennaio 2015 18:10:23 UTC+1, Ian W. Scott ha scritto: If it helps at all, here's the controller function that creates and processes the form: if form.process(formname=formname).accepted

[web2py] Re: request_reset_password not returning a form

2015-01-28 Thread Ian W. Scott
Finally figured out the issue. I just didn't have a condition for request_reset_password in the view for default/user. Added that condition and it works like a charm. Ian On Tuesday, January 27, 2015 at 3:02:34 PM UTC-5, Ian W. Scott wrote: Thanks Cynthia. But I do have the right format

[web2py] Re: Problem migrating field type from 'string' to 'text' (postgresql)

2015-01-12 Thread Ian W. Scott
string to text and viceversa) @scott, have you enabled migration? ( DAL(db_uri, migrate=True)) Paolo On Friday, January 9, 2015 at 7:38:08 PM UTC+1, Ian W. Scott wrote: OK, I'm upgrading. Ran into a snag with my passwords file and finding the right port number, but when it's upgraded I'll

[web2py] Re: Problem migrating field type from 'string' to 'text' (postgresql)

2015-01-09 Thread Ian W. Scott
with that version but this is so old. Hard to day what the problem is. On Wednesday, 7 January 2015 13:42:52 UTC-6, Ian W. Scott wrote: 2.8.2-stable+timestamp.2013.11.28.13.54.07 (Running on Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.8) On Wednesday, January 7, 2015 2:22:57 PM UTC-5, Massimo

[web2py] Problem migrating field type from 'string' to 'text' (postgresql)

2015-01-07 Thread Ian W. Scott
I need to migrate an existing database field from (the implicit default) 'string' to 'text'. Since all of the existing data will satisfy the new field contstraints (no 'string' will be ruled out as 'text') I just changed the field type in the model field definition. Old:

[web2py] Re: Problem migrating field type from 'string' to 'text' (postgresql)

2015-01-07 Thread Ian W. Scott
2.8.2-stable+timestamp.2013.11.28.13.54.07 (Running on Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.8) On Wednesday, January 7, 2015 2:22:57 PM UTC-5, Massimo Di Pierro wrote: which web2py version/date? On Wednesday, 7 January 2015 12:49:29 UTC-6, Ian W. Scott wrote: I need to migrate

[web2py] ProgrammingError violates unique constraint when inserting into a postgresql table

2015-03-25 Thread Ian W. Scott
In a test function I set up some testing data in a postgresql database by first deleting my test user's data and then inserting from a dictionary: db(db.tag_records.name == user_login['id']).delete() db.commit() for tr in trecs: db.tag_records.insert(**tr)

[web2py] Re: ProgrammingError violates unique constraint when inserting into a postgresql table

2015-03-26 Thread Ian W. Scott
Repairing the table definition didn't help. I'm now going to try the operations on a fresh table. On Thursday, March 26, 2015 at 10:42:33 AM UTC-4, Ian W. Scott wrote: Thanks Niphlod. I hired someone to migrate the db from sqlite to postgre and there seem to be some bugs in the migration. I

[web2py] Re: ProgrammingError violates unique constraint when inserting into a postgresql table

2015-03-26 Thread Ian W. Scott
to work through web2py's dal. So I realize that the issue now is partly my lack of understanding of postgre. But any help is much appreciated. Ian On Thursday, March 26, 2015 at 1:32:37 PM UTC-4, Ian W. Scott wrote: Repairing the table definition didn't help. I'm now going to try

[web2py] Re: ProgrammingError violates unique constraint when inserting into a postgresql table

2015-03-26 Thread Ian W. Scott
of values. Ian On Wednesday, March 25, 2015 at 6:12:18 PM UTC-4, Ian W. Scott wrote: In a test function I set up some testing data in a postgresql database by first deleting my test user's data and then inserting from a dictionary: db(db.tag_records.name == user_login['id']).delete

[web2py] Re: ProgrammingError violates unique constraint when inserting into a postgresql table

2015-03-26 Thread Ian W. Scott
Thanks Niphlod. I hired someone to migrate the db from sqlite to postgre and there seem to be some bugs in the migration. I hadn't noticed the lack of reference fields because they were originally there. I think the guy I hired must have removed them (?!). I'll try repairing the table

[web2py] Re: SQLFORM hanging on insert

2015-01-29 Thread Ian W. Scott
Oh, and I'm running version 2.9.11-stable. On Thursday, January 29, 2015 at 4:00:54 PM UTC-5, Ian W. Scott wrote: I have a create form (SQLFORM) that works (a new record is actually created) but immediately after inserting the new record the web2py process hangs. The form remains greyed out

[web2py] SQLFORM hanging on insert

2015-01-29 Thread Ian W. Scott
I have a create form (SQLFORM) that works (a new record is actually created) but immediately after inserting the new record the web2py process hangs. The form remains greyed out and no other functions will work (e.g., can't refresh the page or navigate away). But there's no error raised. Can

[web2py] Custom comparison function with orderby in select()

2015-04-30 Thread Ian W. Scott
I want to sort the results of a select() based on a string field. Normally I can just use select(orderby=db.mytable.myfield), but the strings are not in Latin characters, so the default string sorting produces unacceptable results. I've figured out how to create a comparison function using

[web2py] After changing db adapter relation 'auth_user' already exists

2015-05-06 Thread Ian W. Scott
To work around my earlier unicode problem (I submitted an issue on Github) I switched from the pg8000 adapter to the psycopg2 adapter for my postgre database. Everything works fine as long as I have migrate set to False. But if I set migrate=True I get this error: class

[web2py] Re: Custom comparison function with orderby in select()

2015-05-05 Thread Ian W. Scott
having the database handle it. Anthony On Thursday, April 30, 2015 at 3:42:06 PM UTC-4, Ian W. Scott wrote: I want to sort the results of a select() based on a string field. Normally I can just use select(orderby=db.mytable.myfield), but the strings are not in Latin characters, so

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

2015-05-05 Thread Ian W. Scott
I was distracted from this thread, but a belated thanks for your response, Niphlod. To clarify, the error I posted was from Travis CI's remote process. I have no problem running my tests locally, but in that case I can start a web2py instance normally as part of the testing process. The

[web2py] New import problem when testing web2py app with pytest

2015-05-15 Thread Ian W. Scott
I've been successfully using pytest for quite a while now to do unit testing for my web2py apps. Today, after upgrading to the latest web2py version (Version 2.10.4-stable+timestamp.2015.04.26.15.11.54) my tests won't run. When I try to run the tests in a test file (in the tests/ directory)

[web2py] Re: New import problem when testing web2py app with pytest

2015-05-15 Thread Ian W. Scott
Never mind! I discovered the problem in my conftest.py file. Thanks anyway! On Friday, May 15, 2015 at 3:57:47 PM UTC-4, Ian W. Scott wrote: I've been successfully using pytest for quite a while now to do unit testing for my web2py apps. Today, after upgrading to the latest web2py version

[web2py] Re: SQLFORM hanging on insert

2015-04-11 Thread Ian W. Scott
. On Friday, February 6, 2015 at 12:10:58 PM UTC-5, Ian W. Scott wrote: Thanks for your response Massimo. I'll try to put together a minimal version today and post it. Ian On Thursday, February 5, 2015 at 4:46:46 PM UTC-5, Massimo Di Pierro wrote: Does it hang if you use sqlite? Can you provide

Re: [web2py] unicode error with postgre on 2.10.3 (with sample app)

2015-04-11 Thread Ian W. Scott
:24 PM, Ian W. Scott scot...@gmail.com javascript: wrote: Also, as I pointed out in my question I can insert the same string (with the same encoding) directly into the postgre database using the raw SQL code that is being sent by pydal to the postgre adapter. I inserted a print statement

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

2015-04-11 Thread Ian W. Scott
I take it from the lack of response here that what I want to is just impossible? On Wednesday, April 8, 2015 at 10:57:15 AM UTC-4, Ian W. Scott wrote: I've set up a travis-ci.org job to run my test suite (using pytest) whenever I push my app to its github repository. I'm running

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

2015-04-08 Thread Ian W. Scott
I've set up a travis-ci.org job to run my test suite (using pytest) whenever I push my app to its github repository. I'm running into the basic problem that pytest can't find the gluon libraries, since there's nothing in my repo above the level of my app directory. Does anyone know of a simple

[web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Ian W. Scott
I never got any suggestions on this, even though it seems like a significant limitation of the widget. Has anyone come up with a solution for keeping all the values in a list:string field after form submission? Thanks. On Wednesday, June 25, 2014 at 11:33:26 AM UTC-4, Ian W. Scott wrote

Re: [web2py] Re: Keep values with a list:string field?

2015-08-14 Thread Ian W. Scott
25, 2014 at 6:33:26 PM UTC+3, Ian W. Scott wrote: I've got a SQLFORM.factory form set to keep values after processing with process(keepvalues=True). But it doesn't work on a list:string field. The (otherwise very nice) widget loses all but the first value when the form is submitted (i.e., all

Re: [web2py] Re: Keep values with a list:string field?

2015-08-14 Thread Ian W. Scott
, requires=field.requires) Field('comment', 'string', widget=my_string_widget) On Fri, Aug 14, 2015 at 9:50 AM, Ian W. Scott scot...@gmail.com javascript: wrote: I agree with Richard that the issue (or my issue at least) has to do with the widget, not with the internals

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Ian W. Scott
issue... Also, can you tell us which web2py version you use. Thanks Richard PS.: Once I confirm I have the issue we should open a ticket on github... # On Wed, Aug 12, 2015 at 1:41 PM, Ian W. Scott scot...@gmail.com javascript: wrote: No, they're not submitted if I re-submit the form

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Ian W. Scott
: message = BEAUTIFY(form.errors) On Wednesday, August 12, 2015 at 11:04:46 AM UTC-4, Richard wrote: Could you show your model and controller... This make no sens... Richard On Wed, Aug 12, 2015 at 10:45 AM, Ian W. Scott scot...@gmail.com javascript: wrote: I never got any

Re: [web2py] Re: Keep values with a list:string field?

2015-08-12 Thread Ian W. Scott
display by the widget... Richard On Wed, Aug 12, 2015 at 1:21 PM, Ian W. Scott scot...@gmail.com javascript: wrote: Sorry if I'm not explaining this well. The default widget for a list:string field is a vertically stacked list of inputs, one per value. There is a little + at right

[web2py] How to store etree object that can't be pickled

2015-08-28 Thread Ian W. Scott
I have a parsed lxml.etree object that I need to persist from one request to the next so that users can interact with it. The problem is that etree objects can't be pickled, so when I try to store it in session I get a PicklingError. I just tried using memcache instead, but it seems to use

[web2py] Re: How to store etree object that can't be pickled

2015-08-29 Thread Ian W. Scott
On Saturday, August 29, 2015 at 10:03:42 PM UTC-4, Leonel Câmara wrote: Well you can use etree.tostring and save that. Another alternative is to put it in cache ram which does not pickle. I'd like to avoid serializing out to a string because I'd then have to do the parsing over again on

[web2py] Error 'module' object has no attribute 'Reference_unpickler'

2015-09-15 Thread Ian W. Scott
Hi. I just tried to access the admin/errors/appname page and I got the following error: 'module' object has no attribute 'Reference_unpickler' Traceback (most recent call last): File "/home/ianwscott/webapps/web2py/web2py/gluon/restricted.py", line 227, in restricted exec ccode in

[web2py] Re: Error 'module' object has no attribute 'Reference_unpickler'

2015-09-15 Thread Ian W. Scott
some error reports up to 3 years old. I haven't messed with the error reporting system at all, so I'm not sure why this app would throw the error. Ian On Tuesday, September 15, 2015 at 2:25:13 PM UTC-4, Ian W. Scott wrote: > > Hi. I just tried to access the admin/errors/appname page and

[web2py] Get return value from controller function via ajax

2016-01-20 Thread Ian W. Scott
I'm trying to use ajax calls to update the data for a chart dynamically. I don't want to make the chart a component that refreshes, I just want to get the controller return value back to the javascript in the view, so that I can update the chart via javascript. But web2py's ajax function seems

[web2py] Re: Get return value from controller function via ajax

2016-01-20 Thread Ian W. Scott
, Niphlod wrote: > > from gluon.serializers import json > > def uh(): > return json(blablabla) > > On Wednesday, January 20, 2016 at 8:45:55 PM UTC+1, Ian W. Scott wrote: >> >> I'm trying to use ajax calls to update the data for a chart dynamically. >> I d

Re: [web2py] Re: Get return value from controller function via ajax

2016-01-21 Thread Ian W. Scott
; On Wednesday, January 20, 2016 at 4:20:22 PM UTC-5, Ian W. Scott wrote: >> >> Thanks. So to clarify, if I serialize the return value as json in the >> controller, then I can use it in javascript. It looks like I still have to >> parse the json on the javascript

[web2py] Old field value returns in custom select widget

2016-02-18 Thread Ian W. Scott
I've got a custom select widget class that is working nicely except that when I submit a form via ajax the refreshed widget shows the old (pre-submission) field value. But the changes have been made properly to the database. If I refresh the page containing the form (not via ajax) the new

[web2py] Re: Old field value returns in custom select widget

2016-02-18 Thread Ian W. Scott
: > > Hard to say without seeing more code, but note that the widgets are > constructed before any database IO, so any database changes from the > current submission will not be reflected in the returned copy of the form. > > Anthony > > On Thursday, February 18, 2016 at

[web2py] Re: Old field value returns in custom select widget

2016-02-18 Thread Ian W. Scott
, 2016 at 4:06:06 PM UTC-5, Anthony wrote: > > On Thursday, February 18, 2016 at 3:54:43 PM UTC-5, Ian W. Scott wrote: >> >> Okay, that explains the behaviour. How, then, are values usually >> preserved on an ajax form for the built-in widgets? When I submit the form &g

[web2py] Re: Old field value returns in custom select widget

2016-02-19 Thread Ian W. Scott
e: > > When you pass a record to SQLFORM, it retains the changed values by > passing the values in request.post_vars to the respective field widgets. > Can't say what's going on in your case without the code. > > Anthony > > On Thursday, February 18, 2016 at 4:13:23 PM UTC-5, Ian W.

[web2py] Changing admin password

2017-02-16 Thread Ian W. Scott
I seem to have forgotten the admin password for my web2py installation, so I need to change it. Looking at posts here, the recommendation was: 1 - stop apache server 2 - restart web2py 3 - enter new password 4 - restart apache server I'm getting stuck at 2. The only way I know how to "restart"

Re: [web2py] Changing admin password

2017-02-16 Thread Ian W. Scott
py/ folder and then restart web2py instance and the new generated > password should work. > > Richard > > On Thu, Feb 16, 2017 at 11:29 AM, Ian W. Scott <scot...@gmail.com > > wrote: > >> I seem to have forgotten the admin password for my web2py installation, >>

Re: [web2py] Changing admin password

2017-02-16 Thread Ian W. Scott
save_password; > save_password('123456',443)" > > Where 123456 is you pass phrase. > > 443 is the port for which the password apply > > This will create parameters_443.py file that you drop/replace in the > web2py/ folder and then restart web2py instance and the new gener

Re: [web2py] Changing admin password

2017-02-16 Thread Ian W. Scott
ere 123456 is you pass phrase. > > 443 is the port for which the password apply > > This will create parameters_443.py file that you drop/replace in the > web2py/ folder and then restart web2py instance and the new generated > password should work. > > Richard > >

Re: [web2py] Migrate integer field to string type

2016-10-25 Thread Ian W. Scott
lete the old useless column... You need to transform the integer > into text at the insert step... > > Richard > > On Mon, Oct 24, 2016 at 3:32 PM, Ian W. Scott <scot...@gmail.com > > wrote: > >> I'm using Postgresql and I need to migrate the data type of a field

[web2py] Migrate integer field to string type

2016-10-24 Thread Ian W. Scott
I'm using Postgresql and I need to migrate the data type of a field from "integer" to "string". Will it work to just change the field type in the model table definition? What will happen to the existing "integer" data? Any problems foreseen? Thanks, Ian -- Resources: - http://web2py.com -

[web2py] Re: "Invalid email" when requesting password reset

2017-11-30 Thread Ian W. Scott
I think you're right. It looks like the execution hangs up in Auth.request_reset_password at the point where the system is checking a setting for password case sensitivity: if not self.settings.email_case_sensitive: table_user.email.requires.insert(0, IS_LOWER()) I

[web2py] "Invalid email" when requesting password reset

2017-11-30 Thread Ian W. Scott
I have one user (and only one) whose email has suddenly started to be rejected by the auth login system. With the correct email address and password (I've double-checked) he gets "Invalid login." Then when he tries to use the password reset form he gets an "Invalid email" notice, as if the

[web2py] Re: Routes.py to filter out file version numbers

2017-11-17 Thread Ian W. Scott
I should add that one reason I'm having trouble debugging is because I'm not sure how to test the output of the rewrite. Is there any way to see exactly what the rule is going to output, given a particular filename? On Friday, November 17, 2017 at 10:12:58 AM UTC-5, Ian W. Scott wrote: > &

[web2py] Routes.py to filter out file version numbers

2017-11-17 Thread Ian W. Scott
Hi there. I'm dynamically adding version numbers to the filenames for static assets like css, js, and image files. (These version numbers aren't actually in the filenames. They're just added to the url in the and

[web2py] Re: Routes.py to filter out file version numbers

2017-11-20 Thread Ian W. Scott
testing this on the bundled rocket server, so I don't think there's any issue with server settings. Any help would be much appreciated. On Friday, November 17, 2017 at 10:12:58 AM UTC-5, Ian W. Scott wrote: > > Hi there. I'm dynamically adding version numbers to the filenames for > stat

  1   2   >