Re: [web2py] Re: is_list_of validator question

2014-11-18 Thread Manuele Pesenti
Il 18/11/14 05:54, Massimo Di Pierro ha scritto: > Problem is that IS_LIST_OF experts to validate a list. Instead you are > passing "" (not a list) and None (also not a list). > I agree that it is odd that interprets '' as [] and None as [None]. > They should either be interpreted as [''] and [None

[web2py] Re: RSS is an error! What to do?

2014-11-18 Thread damufo
on web2py 2.9.5 obj[key] I pass a unicode Solution now pass obj[key] a string and on gluon/serializers.py line 167 I changed (encode for decode) return str(obj[key]).encode('utf-8', 'replace') if key in obj else default for return str(obj[key]).decode('utf-8', 'replace') if key in obj else def

[web2py] Re: How do you issue a command to the operating system in web2py?

2014-11-18 Thread Leonel Câmara
This is a very very bad idea, it's also a python question not a web2py one (it's possible btw), what are you trying to accomplish? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/

[web2py] Re: Convert MongoDB / dict into a DAL Row

2014-11-18 Thread Leonel Câmara
What if you do use limitby in the select to limit the results to just one, is there still a performance difference? -- 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: Current controller function for Facebook buttons

2014-11-18 Thread Leonel Câmara
URL(args=request.args, vars=request.vars, scheme=True, host=True) -- 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 ar

[web2py] Web2py Funding

2014-11-18 Thread António Ramos
Funding web2py could punch it to the future faster Meteor did it , why cant web2py get some fundings ? https://www.meteor.com/blog/2012/07/25/meteors-new-112-million-development-budget Regards António -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.co

[web2py] Re: PythonAnywhere 405 Not Allowed - response.js problem?

2014-11-18 Thread Niphlod
response.js creates a header. I can only assume that pythonanywhere impose a limit on the length of the header. What you're doing is wrong on many levels for http specs. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Mercurial?

2014-11-18 Thread Dragan Matic
Also, file scripts/setup-web2py-centos7.sh is missing from mercurial repository. Obviously there is a problem in syncing two repositories. On Monday, November 17, 2014 8:25:44 AM UTC+1, Johann Spies wrote: > > According to https://code.google.com/p/web2py/source/checkout the > Mercurial reposit

[web2py] Re: Deployment script for CentOS: apache + mod_wsgi + msql

2014-11-18 Thread Dragan Matic
for centos6 you should use setup-web2py-fedora.sh, it does the job. for centos7 there is setup-web2py-centos7.sh as Massimo mentioned but it will not work on centos 6 due to differences is these two systems. On Tuesday, November 11, 2014 12:29:34 PM UTC+1, lesssugar wrote: > > Hi, guys, I would

[web2py] Re: Deployment script for CentOS: apache + mod_wsgi + msql

2014-11-18 Thread lesssugar
Thank you, guys. I guess the real problem I face is to get web2py working under Apache with Parallels Plesk as the control panel. Plesk is a bit of a black box for my when it comes to configuring it to use web2py application as default vhost, instead of using the default Plesk vhost. Unfortunat

Re: [web2py] Re: Current controller function for Facebook buttons

2014-11-18 Thread Gael Princivalle
Thanks a lot Leonel. -- Gael Princivalle 2014-11-18 11:38 GMT+01:00 Leonel Câmara : > URL(args=request.args, vars=request.vars, scheme=True, host=True) > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (So

[web2py] Re: Sending email from server

2014-11-18 Thread Yang
It was caused by selinux. soloved by enabling the httpd_can_sendmail. Thank you for all the help! -- 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 re

[web2py] Re: Web2py Funding

2014-11-18 Thread Leonel Câmara
I think this would be hard to do. Funding is a lot easier when you're riding some kind of hipster wave like meteor did. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Repor

Re: [web2py] Re: Web2py Funding

2014-11-18 Thread Michele Comitini
IMHO funding would be more effective if directed toward a specific feature or goal, not to the web2py project as a whole. The latter would require a kind of political organization that is simply not in place. 2014-11-18 13:40 GMT+01:00 Leonel Câmara : > I think this would be hard to do. Funding

[web2py] Re: read an excel file stored in session using xlrd

2014-11-18 Thread Anthony
First, upload fields do not store the full file path, only the filename itself. The file path is obtained from the Field object, which you are not persisting in this case because you are using SQLFORM.factory. Also, uploads with SQLFORM.factory are tricky because the filename includes the datab

[web2py] Re: second page to be accessed only from first page

2014-11-18 Thread Anthony
So what is the problem? It sounds like it is working as expected -- with the "not session.visitor_name" condition, you get a redirect if no name has previously been entered on the first page, correct? Are you observing something different? Note, once you have visited the first page, you can the

[web2py] Passing request.arg variables to .load components on the same page

2014-11-18 Thread Stephen McCamy
Hello, We have a web2py application that loads results from a database and navigates/displays the results by passing the primary key in the URL and reading the number using request.args. For example, below would display record number 1500 in the DB. If you clink the navigation tab below it it

Re: [web2py] Re: a proposal for form improvement

2014-11-18 Thread Richard Vézina
I miss this one... How does JForm will cohabit with Angularjs or Ractivejs? Richard On Mon, Nov 17, 2014 at 11:56 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > In my todo list but no great progress yet. > > > On Friday, 14 November 2014 05:58:10 UTC-6, Ramos wrote: >> >> Just che

[web2py] Re: Passing request.arg variables to .load components on the same page

2014-11-18 Thread Leonel Câmara
You can pass args to LOAD the same way you pass them to URL. You probably want something like LOAD('controllerfile', 'function', args=request.args) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com

[web2py] Re: Passing request.arg variables to .load components on the same page

2014-11-18 Thread Stephen McCamy
That was it. Thanks! On Tuesday, November 18, 2014 10:17:45 AM UTC-5, Leonel Câmara wrote: > > You can pass args to LOAD the same way you pass them to URL. You probably > want something like LOAD('controllerfile', 'function', args=request.args) > -- Resources: - http://web2py.com - http://we

[web2py] Re: Web2py Funding

2014-11-18 Thread lyn2py
I think a lot has to do with the culture. Notice in Meteor there is a very commercial culture about it. In web2py it's a family of giving and sharing. At least that's how I perceive it. I feel more comfortable here. On Tuesday, November 18, 2014 7:15:04 PM UTC+8, Ramos wrote: > > Funding web2py

[web2py] in grid, can "fields" argument name virtual fields?

2014-11-18 Thread Alex Glaros
in grid, can fields argument name virtual fields? Or can it only use fields from the table? If it can, what is the format? How would it identify the virtual fields? I ask because am seeking granular control over column order. If all "links" through the placement argument are on "left", then tab

[web2py] Packed application changes

2014-11-18 Thread Gael Princivalle
Hello all. Well I've got a strange problem. I've got an app in my web2py application. I do a package of my app. I upload my app package in the same web2py application. So I expect that the application will be the same, but it's not. Containers width are something like 50 pixel smaller. I've tried

[web2py] Re: in grid, can "fields" argument name virtual fields?

2014-11-18 Thread Anthony
On Tuesday, November 18, 2014 11:42:35 AM UTC-5, Alex Glaros wrote: > > in grid, can fields argument name virtual fields? > Have you tried it? Sometimes its easier to just try something then to post a question about it. ;-) Anyway, this is covered in the book: http://web2py.com/books/default/ch

[web2py] Re: Packed application changes

2014-11-18 Thread Leonel Câmara
Maybe, in the original, you zoomed in and firefox saved your preferences? -- 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 becaus

[web2py] Re: in grid, can "fields" argument name virtual fields?

2014-11-18 Thread Alex Glaros
when I tried it, didn't know how to identify the field did not see specific answer in the book correct, about virtual fields not being sortable, but when I move table fields to links argument, they lose their sortability can you please post syntax if fields argument can use virtual fields? tha

[web2py] Re: PythonAnywhere 405 Not Allowed - response.js problem?

2014-11-18 Thread Rob0
Thanks Niphlod. I realize this solution was probably using the response.js in a manner for which it wasn't intended. I took the idea from http://stackoverflow.com/questions/20633959/ajax-response-in-web2py I guess that's not the right approach - or perhaps I deviated from the idea. Is there

[web2py] Re: in grid, can "fields" argument name virtual fields?

2014-11-18 Thread Anthony
On Tuesday, November 18, 2014 12:50:29 PM UTC-5, Alex Glaros wrote: > > when I tried it, didn't know how to identify the field > > did not see specific answer in the book > Same as any field: db.mytable.myfield. > correct, about virtual fields not being sortable, but when I move table > fields

Re: [web2py] SQLFORM.grid custom search where is the error?

2014-11-18 Thread Prasad Muley
This problem still exist in web2py 2.9.6. I've tried to use custom grid search But It is showing me "invalid query" near grid. On Thursday, February 21, 2013 10:09:33 PM UTC+5:30, Mandar Vaze wrote: > > I'm using Version "2.3.2 (2012-12-17 15:03:30) stable" and the problem > still persists. i

Re: [web2py] Re: Packed application changes

2014-11-18 Thread Gael Princivalle
a you're right ! I've made some confusion, good dimension was with the app on my production web2py application. All production app were with a 90 % zoom. My apologize for the disturb. Thanks. -- Gael Princivalle 2014-11-18 18:19 GMT+01:00 Leonel Câmara : > Maybe,

[web2py] Re: PythonAnywhere 405 Not Allowed - response.js problem?

2014-11-18 Thread Anthony
On Tuesday, November 18, 2014 1:41:18 PM UTC-5, Rob0 wrote: > > Thanks Niphlod. > > I realize this solution was probably using the response.js in a manner for > which it wasn't intended. > > I took the idea from > http://stackoverflow.com/questions/20633959/ajax-response-in-web2py > I guess tha

[web2py] Re: PythonAnywhere 405 Not Allowed - response.js problem?

2014-11-18 Thread Rob0
Right. Looks like I oversimplified the (your?) approach. Thanks for the quick reply Anthony, I appreciate it. On Tuesday, November 18, 2014 2:39:37 PM UTC-5, Anthony wrote: > > On Tuesday, November 18, 2014 1:41:18 PM UTC-5, Rob0 wrote: >> >> Thanks Niphlod. >> >> I realize this solution was pr

[web2py] Re: Mercurial?

2014-11-18 Thread Dave S
On Tuesday, November 18, 2014 4:02:17 AM UTC-8, Dragan Matic wrote: > > Also, file scripts/setup-web2py-centos7.sh is missing from mercurial > repository. Obviously there is a problem in syncing two repositories. > > Mercurial has pretty good tools for syncing repositories of various forms, wh

[web2py] Starting to shed my newbie skin

2014-11-18 Thread Dave S
I actually used a Form! I have a very simple web site. Originally it had one page beyond the (sample) index.html, which just did a query of my db based on the current date. Now I have 2 more pages, one of which allows entries from your-choice-of-month to be listed, and one which allows listin

[web2py] Re: web2py: RESTful API returns "invalid arguments" for any POST request with JSON body

2014-11-18 Thread Tomáš Slobodník
Ok, I tried to install Python 2.7.8 in my home directory on production server and error disappeared. Then I tried the same with Python 2.6.8 with same result - no error. Don't know what caused the error but my guess is some bug in Python 2.6.1. Dne středa, 5. listopadu 2014 23:37:03 UTC+1 Niphl

[web2py] Re: Starting to shed my newbie skin

2014-11-18 Thread Dave S
On Tuesday, November 18, 2014 11:56:59 AM UTC-8, Dave S wrote: > > I actually used a Form! > > I have a very simple web site. Originally it had one page beyond the > (sample) index.html, which just did a query of my db based on the current > date. > > Now I have 2 more pages, one of which allo

[web2py] Using two words in html helpers

2014-11-18 Thread LoveWeb2py
How can I have two words in the html helper? For example I'm trying to use tags and have tried using TAG.audio(str('content here'), _autoplay) but it treats autoplay as a variable at that point. When I try to set autoplay as a string it doesn't work. Any thoughts? -- Resources: - http://we

[web2py] Re: Using two words in html helpers

2014-11-18 Thread LoveWeb2py
Figured it out... sorry for the trouble. Here is the solution TAG['audio autoplay'] If you use the dictionary format you can combine multiple values (as mentioned in the book) Thanks!! On Tuesday, November 18, 2014 5:57:44 PM UTC-5, LoveWeb2py wrote: > > How can I have two words in the html h

[web2py] Re: play audio file from controller

2014-11-18 Thread LoveWeb2py
Thanks, Massimo! In my controller am I right in thinking I can have something like this: def soundControl(): sound = db().select(db.sounds.ALL) query = db(db.sounds.id>0).select().first() AudioFile = db.sounds.filename.retrieve(query.filename)[1] soundToPlay = TAG['audio autoplay'

[web2py] Re: play audio file from controller

2014-11-18 Thread LoveWeb2py
Quick update: When I type AudioFile.name it brings back the path, but it exposes the full path. There has to be a better way? I hope? On Tuesday, November 18, 2014 6:55:40 PM UTC-5, LoveWeb2py wrote: > > Thanks, Massimo! > > In my controller am I right in thinking I can have something like this:

[web2py] Re: Using two words in html helpers

2014-11-18 Thread Leonel Câmara
No no, don't do this, then it will close with which is not what you want, there are no HTML tags with two words. TAG.audio(_autoplay='autoplay') is ok and will work. Autoplay is an attribute, the reason you can use it without a value is because HTML allows attribute minimization. If the value

[web2py] Re: play audio file from controller

2014-11-18 Thread LoveWeb2py
Figured it out following this thread: https://groups.google.com/forum/#!searchin/web2py/response.download/web2py/KLK9i_7eNOc/BXTrCefrUtoJ Had to set args = to my db query.filename Thank you! On Wednesday, November 5, 2014 11:19:17 PM UTC-5, LoveWeb2py wrote: > > *Hello,* > > *I'd like to play

[web2py] SQLFORM.grid edit only selects the first record and updates all records.

2014-11-18 Thread Stephen McCamy
Hello, I am having an issue with SQLFORM.grid where when there are more than one records returned the edit button only shows data for the first record. If I do update it then updates all the records with the new values. I can't seem to figure out why. Here is my db definition: db.define_tab

[web2py] Re: second page to be accessed only from first page

2014-11-18 Thread T.R.Rajkumar
@Anthony Yes the session var is OK. But I would like to see that the second page can be visited only after the first page. Keeping the session var flags can be troublesome if we have hundreds of pages and the same session var gets set in some other page. Is their a way out? The request.function

[web2py] Re: read an excel file stored in session using xlrd

2014-11-18 Thread T.R.Rajkumar
@Anthony Thanks for your kind reply. I don't need to save the file. That's why w/o db, session becomes handy. I upload the file in master data page having two forms. One form is the SQLFORM.factory for uploading the excel file and the other form is to enter the key parameters. When the second f

[web2py] Migrating only a single auth table ?

2014-11-18 Thread Chris Baron
I am trying to add columns to auth_group, but the migration breaks here : auth.define_tables(username=False, signature=False, migrate=True) It tries to migrate auth_user first, and fails because it already exists. How do I migrate only the auth_group table ? -- Resources: - http://web2py.com

[web2py] All request forwarded to https - How to stop this

2014-11-18 Thread sabbir
OS - Ubantu 12.4 Deployed using deployment script on the book While browsing apps all the request are forwarding to *https :( * How can i stop this. ideally users who browse with http should be able to browse as it is. Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Docum