Re: [web2py] Re: No module named objects / 2.9.12-stable+timestamp.2015.03.17.18.03.34 / Windows

2015-03-19 Thread Massimo Di Pierro
Can anybody else reproduce this issue? On Friday, 20 March 2015 00:04:12 UTC-5, Kiran Subbaraman wrote: > > Windows 8.1 64 bit > Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] > on win32 > Just the plain rocket server - have not installed / configured a web > server.

Re: [web2py] Re: No module named objects / 2.9.12-stable+timestamp.2015.03.17.18.03.34 / Windows

2015-03-19 Thread Kiran Subbaraman
Thanks for confirming. Opened an issue, to address the cache.disk: https://github.com/web2py/web2py/issues/858 Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Fri, 20-03-2015 1:56 AM, Niphlod wrote: mine is working fine. no errors reported (i.

Re: [web2py] Re: No module named objects / 2.9.12-stable+timestamp.2015.03.17.18.03.34 / Windows

2015-03-19 Thread Kiran Subbaraman
Windows 8.1 64 bit Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32 Just the plain rocket server - have not installed / configured a web server. Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Thu, 19-03-2015

[web2py] Re: iframes not working

2015-03-19 Thread horridohobbyist
Okay, so I changed the http: to https: in the iframe's src. That *should* solve the problem... However, the console shows that the URL was changed back to http:. WTF. Who's doing this??? I brought up View Source just to make that the src was, in fact, https:. Yep, it is. So for some reason, *

[web2py] Re: iframes not working

2015-03-19 Thread Leonel Câmara
Yep, the error is pretty explicit. If you use https all resources you load in the page should be pulled using https too. Just change the src of the iframe to use it. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - http

[web2py] Re: Show busy during AJAX?

2015-03-19 Thread Dave S
On Thursday, March 19, 2015 at 5:23:52 PM UTC-7, Derek wrote: > > eh, use an animated gif... > > http://www.ajaxload.info/ > > gotta love their license... > Interesting indeed! /dps > > On Thursday, March 19, 2015 at 5:00:31 PM UTC-7, Dave S wrote: >> >> >> >> On Wednesday, March 18, 2015 a

[web2py] Re: iframes not working

2015-03-19 Thread horridohobbyist
Yes... Mixed Content: The page at 'https://67.213.70.251/welcome/default/index' was loaded over HTTPS, but requested an insecure resource 'http://web2py.com/'. This request has been blocked; the content must be served over HTTPS. On Thursday, 19 March 2015 20:57:34 UTC-4, Leonel Câmara wrote:

[web2py] Re: iframes not working

2015-03-19 Thread Leonel Câmara
If you open the page with the iframe in google chrome and you press F12 and then click on the console tab do you see errors? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (

[web2py] Re: iframes not working

2015-03-19 Thread horridohobbyist
I don't know what that means. On Thursday, 19 March 2015 20:14:13 UTC-4, Leonel Câmara wrote: > > Do you have any errors in the console? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2p

[web2py] Re: Global search form example

2015-03-19 Thread Ron Chatterjee
Were you able to find a way around for the global search option. I believe one way you can do this is to create a form and call that form in menu.py using response.title. I am sure there are lot of other ways. Any thoughts? On Wednesday, March 11, 2015 at 4:43:29 AM UTC-4, Gael Princivalle wro

[web2py] Re: Show busy during AJAX?

2015-03-19 Thread Derek
eh, use an animated gif... http://www.ajaxload.info/ gotta love their license... On Thursday, March 19, 2015 at 5:00:31 PM UTC-7, Dave S wrote: > > > > On Wednesday, March 18, 2015 at 10:18:23 PM UTC-7, Dave S wrote: >> >> >> >> On Wednesday, March 18, 2015 at 7:26:35 PM UTC-7, Leonel Câmara wr

[web2py] Re: iframes not working

2015-03-19 Thread Leonel Câmara
Do you have any errors in the console? -- 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 Issues) --- You received this message because you are subscribed to the Google

[web2py] Re: Show busy during AJAX?

2015-03-19 Thread Dave S
On Wednesday, March 18, 2015 at 10:18:23 PM UTC-7, Dave S wrote: > > > > On Wednesday, March 18, 2015 at 7:26:35 PM UTC-7, Leonel Câmara wrote: >> >> fontawesome has spinner icons you can use that don't even need javascript >> because they use css transitions. Although they don't have an hourgla

[web2py] iframes not working

2015-03-19 Thread horridohobbyist
No matter what I do, I cannot use iframes in my web2py apps. The *same iframe code* used in a static HTML file served from the same server as web2py works fine. (For testing, I used the same example as in the web2py book: http://web2py.com";>) Here's the odd thing: It has to do with the blocki

[web2py] Re: another table ref table ref table

2015-03-19 Thread 黄祥
i think you can explicit describe the field name of the ref table : db.programs._format = lambda r: '%s %s %s' % (*r.program_type.name, r.age_group.age, r.age_group.gender*) db.sessions._format = lambda r: '%s at %s on %s' % (*r.program_name.name*, datetime.time(r.session_date_time), datetime.da

[web2py] several vars in page

2015-03-19 Thread 黄祥
hi, i have several vars that store : view (grid or list), sort (a_z, z_a, highest_price, lowest_price, newest), search_product, category_product (drop down list IS_IN_DB() ) and product_brand (drop down list IS_IN_DB() ) search_product, category_product (drop down list IS_IN_DB() ) and product

[web2py] Re: Minor tweak for book? Pluralization

2015-03-19 Thread Massimo Di Pierro
You are right. Fixed in trunk, will be pushed live asap. On Thursday, 19 March 2015 14:52:38 UTC-5, Dave S wrote: > > In http://www.web2py.com/books/default/chapter/29/04/the-core#Pluralization-engine > > > > Should > > It knows, for example, that Slovenian has one singular form and 3 plural >>

[web2py] another table ref table ref table

2015-03-19 Thread Oliver Holloway
I've seen other posts about doing

[web2py] Re: how to change the represent of auth_user

2015-03-19 Thread Anthony
On Thursday, March 19, 2015 at 1:10:34 PM UTC-4, Moiz Nagpurwala wrote: > > Field('foo', 'reference auth_user', requires=IS_IN_DB(db, 'auth_user.id', >> '%(first_name)s %(last_name)s')) >> > > This worked for me. > It works, but (a) it only affects select dropdowns in forms, not other displays s

Re: [web2py] Re: No module named objects / 2.9.12-stable+timestamp.2015.03.17.18.03.34 / Windows

2015-03-19 Thread Niphlod
mine is working fine. no errors reported (i.e. I don't see any "no module named objects"), but there's a bug in cache.disk. On Thursday, March 19, 2015 at 6:04:07 PM UTC+1, Massimo Di Pierro wrote: > > which windows version? what Python version? are you behind Apache or other > web server? > >

[web2py] Re: Page hangs when calling subprocess.check_call from within web2py

2015-03-19 Thread Toby
Thanks Dave and MCM. Yes, I'm using uwsgi. I'll have a dig through the log file. Just found my uwsgi.log and its 2GB (!). Think I'm gonna delete it and start with a fresh one that's not gonna crash my text editor. Toby -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Minor tweak for book? Pluralization

2015-03-19 Thread Dave S
In http://www.web2py.com/books/default/chapter/29/04/the-core#Pluralization-engine> Should It knows, for example, that Slovenian has one singular form and 3 plural > forms (for x==1, x==3 or x==4 and x>4). be instead It knows, for example, that Slovenian has one singular form and 3 plural

Re: [web2py] Re: Page hangs when calling subprocess.check_call from within web2py

2015-03-19 Thread Michele Comitini
what are you using between nginx and web2py? uwsgi? if that's the case check the uwsgi logs for clues mic 2015-03-19 19:12 GMT+01:00 Dave S : > > > On Thursday, March 19, 2015 at 5:17:21 AM UTC-7, Toby wrote: >> >> Hi, >> >> I'm having issues using subprocess.call from within a module file in >>

[web2py] Re: Page hangs when calling subprocess.check_call from within web2py

2015-03-19 Thread Dave S
On Thursday, March 19, 2015 at 5:17:21 AM UTC-7, Toby wrote: > > Hi, > > I'm having issues using subprocess.call from within a module file in > web2py. > > [...] > The funny thing is that if I use an imagemagick command that's faster to > run (e.g. a lower resolution image) then it works f

Re: [web2py] admin or Admin

2015-03-19 Thread Richard Vézina
I know notting about plugin_manage_groups if it an feature I ignore... But what I say, stay valid as captialize a group name or not is only a matter of preferences and lower case is often the best option... :) Richard On Thu, Mar 19, 2015 at 1:32 PM, Mirek Zvolský wrote: > I just want to have

[web2py] New plugin: MANAGE_GROUPS

2015-03-19 Thread Mirek Zvolský
Use plugin_manage_groups to auto-*create the admin group and make the first logged user its member*. This give him possibility *create new groups and add members to the groups* from the registered user. For the system, which control the access with requires_membership() and has_membership() only

Re: [web2py] admin or Admin

2015-03-19 Thread Mirek Zvolský
I just want to have a default for new plugin_manage_groups. Because there is just your answer and my meaning is same as yours, default became: admin About the plugin_manage_groups in separate topic. Dne pondělí 16. března 2015 16:00:02 UTC+1 Richard napsal(a): > > I don't think there is one b

[web2py] Re: how to change the represent of auth_user

2015-03-19 Thread Moiz Nagpurwala
> > Field('foo', 'reference auth_user', requires=IS_IN_DB(db, 'auth_user.id', > '%(first_name)s %(last_name)s')) > This worked for me. Thanks a lot. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

[web2py] Re: reCaptcha works locally but not on PythonAnywhere

2015-03-19 Thread NeoToren
Ok...So the issue was on PythonAnywhere side. Once the guys at PA took care of the whitelist - reCaptcha works as expected from the website hosted at PythonAnywhere. Andthis feature is now also part of the FREE option (it used to be available only for paid sites). Thanks Giles and Conrad, Y

[web2py] Re: Layout login

2015-03-19 Thread Massimo Di Pierro
One way to avoid this mistake is leave the views alone {{include 'layout.html}} and replace layout.html with "{{include 'layout_html.html}}{{include}}" This allows you change the layout file in one single place. On Thursday, 19 March 2015 12:03:54 UTC-5, Gael Princivalle wrote: > > ...Yes for s

[web2py] Re: Search in web2py book case sensitive

2015-03-19 Thread Massimo Di Pierro
done. Thanks. On Thursday, 19 March 2015 05:26:22 UTC-5, Kiran Subbaraman wrote: > > Yes, it is. > This line of code probably needs to be changed: > https://github.com/mdipierro/web2py-book/blob/master/controllers/default.py#L152 > > to > k = data.lower().find(search.lower()) > > > > > On Thu

[web2py] Re: Layout login

2015-03-19 Thread Gael Princivalle
...Yes for sure. Sorry for that, I've totally forgot that for all over applications I've changed user.html. Thanks. Il giorno giovedì 19 marzo 2015 16:48:46 UTC+1, Niphlod ha scritto: > > default/user.html is probably using > > {{extend 'layout.html'}} > instead of > {{extend 'layout_site.html'}}

Re: [web2py] Re: No module named objects / 2.9.12-stable+timestamp.2015.03.17.18.03.34 / Windows

2015-03-19 Thread Massimo Di Pierro
which windows version? what Python version? are you behind Apache or other web server? On Thursday, 19 March 2015 03:24:45 UTC-5, Kiran Subbaraman wrote: > > Tried with the latest (for testers): > I saw the same "no module named objects" error. > > Went back to admin, and selected the "clean" op

Re: [web2py] Re: Migrating Passwords

2015-03-19 Thread Massimo Di Pierro
In fact in order to use proper sessions in Flask you need sqlalchemy. Flask+SQLAlchemy contains more code than web2py without admin/examples/welcome app. Flask is faster on "hello world" apps but the difference washes out as soon as you access storage server side. Massimo On Thursday, 19 Mar

[web2py] Re: Layout login

2015-03-19 Thread Niphlod
default/user.html is probably using {{extend 'layout.html'}} instead of {{extend 'layout_site.html'}} On Thursday, March 19, 2015 at 9:46:54 AM UTC+1, Gael Princivalle wrote: > > Hello all. > > In all my applications I use a custom layout.html called layout_site.html. > When the user login the

[web2py] Re: Login error - Table corrupted

2015-03-19 Thread Leonel Câmara
migrate=True Tells the DAL to save the table definitions in the .table files and by comparing with the previous definitions perform migrations as necessary (for instance create missing columns or delete old ones no long used) fake_migrate=True Tells it not to really migrate so we will just re

[web2py] Re: Login error - Table corrupted

2015-03-19 Thread Gael Princivalle
This app is in production. What's the function of migrate? I've tried this: db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'], fake_migrate_all=True, migrate=True) And I don't have any .table file. What's the function of .table files? Is it a problem don't having these files

[web2py] Re: Login error - Table corrupted

2015-03-19 Thread Leonel Câmara
migrate=True and fake_migrate=True will make them be recreated. Then you can set fake_migrate=False and probably you will want to set migrate to False if this is in production until such a time as you change the tables. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Re: Login error - Table corrupted

2015-03-19 Thread Gael Princivalle
Yes that's an important information. .table files not part of the database. I've done that: Cancel all .table files db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'],fake_migrate_all=True) And now it works like a charm. I've cancel fake_migrate_all=True and it's ok. Thanks aga

[web2py] Re: temp table

2015-03-19 Thread Leonel Câmara
Another simple solution is to just use the regular database. Except you would add a boolean "published" field to all the tables. Records that are not published would not show up in the main website. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/w

[web2py] Page hangs when calling subprocess.check_call from within web2py

2015-03-19 Thread Toby
Hi, I'm having issues using subprocess.call from within a module file in web2py. My code is something like import shlex import subprocess # This is a command to call the imagemagick convert function cmd_string = 'convert "/home/www-data/web2py/applications/subway_art_dev/modules/a_temp/tmp521

Re: [web2py] Re: temp table

2015-03-19 Thread Kevin Bethke
storing it in a session is probably not a good idea since the the action from the user should be 2-4 times a month the update of the file is every hour. but creating a new temp database will probably work. On Thu, Mar 19, 2015 at 12:28 PM, Leonel Câmara wrote: > Instead of using a database you c

[web2py] Re: how to change the represent of auth_user

2015-03-19 Thread Anthony
Assuming the issue is with reference fields in tables that reference auth_user, you do not set the "represent" attribute of the auth_user.id field, nor is it necessary to customize the IS_IN_DB validator. Instead, you should set the "_format" attribute of the auth_user table. After calling auth

[web2py] Re: temp table

2015-03-19 Thread Leonel Câmara
Instead of using a database you can store it in the session. An alternative is to use a sqlite mem adapter temp_db = DAL('sqlite:memory:'). -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2p

[web2py] temp table

2015-03-19 Thread BlueShadow
Hi, I get some information from constantly updating files. (this part works already) Some of these information I want to save in a temp db table. So once the user opens the "temp table site" he should get an overview about all information in the temp table and decide for each entry if its taken

[web2py] Re: Search in web2py book case sensitive

2015-03-19 Thread Kiran Subbaraman
Yes, it is. This line of code probably needs to be changed: https://github.com/mdipierro/web2py-book/blob/master/controllers/default.py#L152 to k = data.lower().find(search.lower()) On Thursday, March 19, 2015 at 2:35:59 PM UTC+5:30, Kenneth wrote: > > Hello, > > is the search function in

[web2py] Re: how to change the represent of auth_user

2015-03-19 Thread Leonel Câmara
In the field that references auth_user you have a requires IS_IN_DB, right? that validator can take a format. Example: Field('foo', 'reference auth_user', requires=IS_IN_DB(db, 'auth_user.id', '%(first_name)s %(last_name)s')) As for the represent not working it's because it's missing an argumen

[web2py] Re: Login error - Table corrupted

2015-03-19 Thread Leonel Câmara
Notice that, this isn't a problem with your database table. Files with .table extension in the databases folder are web2py's bookkeeping for migrations. If you didn't do any changes to the database you can just delete them and tell web2py to make them again with a fake migration. -- Resources:

[web2py] Re: Login error - Table corrupted

2015-03-19 Thread Leonel Câmara
Probably you don't load that table on the management interface. -- 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 Issues) --- You received this message because you are

[web2py] Search in web2py book case sensitive

2015-03-19 Thread Kenneth
Hello, is the search function in web2py Book supposed to be case sensitive? I went to the online book and typed sqlform in the search field. Was a little bit surprised when I got: No results for "sqlform" Searching for SQLFORM works. Kenneth -- Resources: - http://web2py.com - http://web

[web2py] Layout login

2015-03-19 Thread Gael Princivalle
Hello all. In all my applications I use a custom layout.html called layout_site.html. When the user login the layout is the custom one, layout_site.html, ok. But I've got an application where when the login page use the layout.html instead of the layout_site.html, so the wrong layout. Someone k

[web2py] Re: Login error - Table corrupted

2015-03-19 Thread Gael Princivalle
Thank you Leonel. But the problem seems more strange. In fact if I try to login for www.mydomainapp.com I've got this error. If I run the same application from the administration interface, I can login. Do you have an idea of what could be the problem? Il giorno mercoledì 18 marzo 2015 17:31:22

Re: [web2py] Re: Printing data on web2py view page is different from python shell

2015-03-19 Thread Maurice Waka
Thanks Leo. It worked! On Mar 18, 2015 3:53 PM, "Leonel Câmara" wrote: > This is just how HTML works. You may want to study HTML a bit more but > here's a quick n' dirty solution. > > {{extend.layout.html}} > Answer: > {{=XML(result.replace('\n', ''))}} > > -- > Resources: > - http://web2py.com >

Re: [web2py] Re: Printing data on web2py view page is different from python shell

2015-03-19 Thread Maurice Waka
Thank so much. It worked! On Mar 18, 2015 3:53 PM, "Leonel Câmara" wrote: > This is just how HTML works. You may want to study HTML a bit more but > here's a quick n' dirty solution. > > {{extend.layout.html}} > Answer: > {{=XML(result.replace('\n', ''))}} > > -- > Resources: > - http://web2py.co

Re: [web2py] Re: No module named objects / 2.9.12-stable+timestamp.2015.03.17.18.03.34 / Windows

2015-03-19 Thread Niphlod
nope, can't replicate. Try downloading the latest. On Thursday, March 19, 2015 at 5:46:43 AM UTC+1, Kiran Subbaraman wrote: > > Downloaded it from > http://www.web2py.com/examples/static/nightly/web2py_win.zip. This > contains the binary / exe. > > > Ki