[web2py] Re: Admin app support in app engine

2014-02-22 Thread pallav
Great job! On Thursday, December 19, 2013 3:11:50 PM UTC-5, Alan Etkin wrote: > > A subset of the admin app features was enabled in trunk for Google App > Engine apps. New deployments using the app.yaml example file should support > the following (using GAE SDK 1.8.8 and Python 2.7/WSGI): > > -

[web2py] Auth with multiple E-mail addresses

2014-02-22 Thread Damien
I would like to associate to my users multiple E-mail addresses and phone numbers. I would like these users to be able to authenticate with any (verified) E-mail address or phone number. I am wondering what would be the best approach to achieve this. One idea would be to modify the existing A

[web2py] Using web2py build-in serwer

2014-02-22 Thread aslav
Hi there, I'm new to programming, python and web2py. I have a question - Can I use web2py build-in server insted of apache if I'm just running a small ( really small ) website with couple of visits and file downloads per day? -- Resources: - http://web2py.com - http://web2py.com/book (Documen

[web2py] When i'm uploading, my website lags

2014-02-22 Thread aslav
Hi there, I'm very new to programming, python and web2py and I have a question. I got this app in which I upload some file to db through appadmin ( code is almost the same as the one massimo gave in the book [ chapter about image blog ] ). And when I'm uploading something or downloading somethi

[web2py] Re: Is it possible to execute {{code}} from database?

2014-02-22 Thread Anthony
Is it web2py template code that you want to execute, or just plain Python? If the former, you can use the gluon.template.render function -- see https://groups.google.com/d/msg/web2py/4r65UNLQTgQ/SxkW2zzsuwwJ. If the latter, there is always eval/exec. In either case, be aware of the security ris

[web2py] Ref: Handling File Uploads

2014-02-22 Thread Teddy Nyambe
I am trying to find out how I can handle file uploads in web2py if I need total control of the process. For instance if I am using my own html form and not the web2py. In controller how do I access the uploaded file so that I can use python file system to rename the file and move it to a specific f

[web2py] Re: Allow NULL in form validator with reference Field

2014-02-22 Thread brahama von
Thanks Niphlod! Will try that. Yes. Mysql with INNODB. I am loading the courses manually but wanted to do it via the web2py form... El martes, 18 de febrero de 2014 17:24:25 UTC-3, Niphlod escribió: > > does your backend support a foreign key with a null value ? not all of > them can. > As an a

Re: [web2py] Is it possible to execute {{code}} from database?

2014-02-22 Thread Jonathan Lundell
On 22 Feb 2014, at 3:31 PM, Robin Manoli wrote: > Suppose db.page.content has some text like : {{ arbitrary python code }}. > Would this python code then be executed? Is it possible to execute such code? > > Assuming that the code is a valid web2py template, I think you could set response.vie

[web2py] Is it possible to execute {{code}} from database?

2014-02-22 Thread Robin Manoli
Suppose db.page.content has some text like : {{ arbitrary python code }}. Would this python code then be executed? Is it possible to execute such code? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

[web2py] Re: How to support flash in new layout

2014-02-22 Thread horridohobbyist
Solved. After much trial and error. Wish it was documented somewhere. The steps are fairly straightforward: 1. {{include 'web2py_ajax.html'}} 2. place {{=response.flash or ''}} somewhere in the body 3. div.flash { position: fixed; float: right; padding: 10px; top: 10px; right: 3

[web2py] Re: return all results for a field if no query.

2014-02-22 Thread Anthony
If you make sure your URL vars have the same names as the associated table fields, you can simplify further as follows: def eco: my_content = db.table.created_by == auth.user.id filter_query = reduce(lambda a, b: a & b, [db.table[v] == request.vars[v] for v in re

[web2py] Re: return all results for a field if no query.

2014-02-22 Thread Avi A
Great, thanks. the "moreover" idea is what i was missing. Yeah, I'll replace the args with vars url, thanks. On Saturday, February 22, 2014 9:36:58 PM UTC+2, Niphlod wrote: > > every > db.table.column == parameter > is something that further reduces the resultset (it's a "filter" condition) > i

[web2py] Re: return all results for a field if no query.

2014-02-22 Thread Niphlod
every db.table.column == parameter is something that further reduces the resultset (it's a "filter" condition) in case "parameter" is 0, just don't use that condition in the query ^_^ moreover, you can do filter_condition = (db.table.created_by == auth.user_id) if . filter_condition = fi

[web2py] return all results for a field if no query.

2014-02-22 Thread Avi A
Hi, Assuming I want to create an ajax query that will filter the results according to some data in fields: for example: ajax url: ... eco/1/6/4/5/3 def eco: my_content = db.table.created_by == auth.user.id query_a = db.table.field_a == request.args(0) query_b = db.table.field_b== re

[web2py] Re: SQL Muli Select to Web2py format

2014-02-22 Thread Fcosqui
're right ! i didn't know this sentence "count distinct" ( im not a professional dba :P) thnx! El jueves, 20 de febrero de 2014 17:57:27 UTC-3, Niphlod escribió: > > web2py's DAL has no support for subselects, so unfortunately there's no > current "DAL-way" to translate that query. > > BTW:

[web2py] How can i change the Label of_extra['count()'] in SQLTABLE headers ?

2014-02-22 Thread Fcosqui
Hi ! i have this simple problem. Example: rows = SQLTABLE(db(db.info).select(db.info.port.count(), headers={' *whats is the name of this Field ?* ':'new_name'} ) ) i tried, but isn't the real field : info._extra['Count(port)'] Thnx. -- Resources: - http://web2py.com - http://web2py.com/b

[web2py] JqueryMobile

2014-02-22 Thread clarix
Hi all, I am using JqueryMobile in a new web2py test application and it renders perfectly but the response.flash notifications don't work even though web2py_ajax.html is included in the layout file (\plugin_jqmobile\layout.html) which I didn't modify. I appreciate your help! Thanks, Clara --

[web2py] Load DAL only for DAL-related debugging in editor?

2014-02-22 Thread A36_Marty
Is there a (wise) way to load the DAL only for a project for debugging purposes in an editor. Example: I'm writing a class for doing some involved record calculations, look-ups from multiple tables, writing back to the tables using the app's DAL. >From PyCharm, I would like to run just the

[web2py] Re: Web2py Integration with Multiple Oauth Logins

2014-02-22 Thread Quint
Hi, About the exception: I changed the Field name to "oauth_uid". I did not notice this problem because i'm using GAE. About "*App does not exist or you are not authorized*": This means that your oauth key/secret is not properly set in your configuration. You are not supplying a valid/authoriz