[web2py] type 'exceptions.ImportError'

2015-06-28 Thread Auden RovelleQuartz
Error ticket for omniavx_joeTicket ID 24.211.17.122.2015-06-28.08-43-36.388910c0-3f65-456d-bcf2-7ee2c50e441e type 'exceptions.ImportError' No module named omniavx_joe.modules.app_constantsVersionweb2py™Version 2.11.2-stable+timestamp.2015.05.30.16.33.24PythonPython 2.7.6: /usr/bin/python

[web2py] Re: dynamic query on web2py

2015-06-28 Thread 黄祥
thank you again, massimo, for told me the different between those two. first time, i choose the sort random, because it can run on google sql, but the orderby = 'random' is what i need since i don't run it on google sql and it random over all of my query rows. thanks and best regards, stifan

[web2py] Re: distinct based on more than 1 field

2015-06-28 Thread Annet
For distinct to work you need orderby, I don't know if that works for more than one field. orderby=db.person.firstname | db.person.familyname, distinct = True Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: dynamic query on web2py

2015-06-28 Thread Massimo Di Pierro
db().select(orderby='random') http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=random On Saturday, 27 June 2015 07:28:09 UTC-5, 黄祥 wrote: yeah, something like that, but i don't know how to do an orderby with random option in web2py. any idea how to

[web2py] Re: languages.py, line 914 - error

2015-06-28 Thread Massimo Di Pierro
The traceback says: File C:\web2py-m\applications\ipay\views\buy/index.html, line 184, in module You should be able to look in the ticket for line 184 in the compiled index.html. Anyway, open a ticket and we will think how to better report it. On Saturday, 27 June 2015 16:45:44 UTC-5,

[web2py] Re: distinct based on more than 1 field

2015-06-28 Thread Davy Jacops
This works indeed, and I can build an SQLTABLE based on the rows now. Thank you. Consequence is that SQLFORM.grid or smart grid cannot be used in this case? (since there is no select statement possible, as it just takes a query?) Op zaterdag 27 juni 2015 22:47:34 UTC+2 schreef villas: I think

[web2py] Re: dynamic query on web2py

2015-06-28 Thread 黄祥
thank you so much for the pointer, massimo. anthony already point the url above. e.g. import random def index(): limitby = (0, 5) rows_random = db((db.product.quantity 0) ).select(limitby = limitby).sort(lambda row: random.random() ) return dict(rows_random = rows_random) thanks

[web2py] Re: dynamic query on web2py

2015-06-28 Thread Massimo Di Pierro
There is a difference. If you have 100 records rows = db(...).select(limitby = 10).sort(lambda row: random.random()) selects the first 10 out of 100 sorted by ID, then randomizes those 10. rows = db(...).select(limitby = 10, orderby='ranomd') gives you 10 randomly picked from the 100. On

Re: [web2py] Re: For those using ractive or vuejs. I need help !!

2015-06-28 Thread António Ramos
I dont use ractive. Only Vuejs and a template inside a script tag is what i learned from the docs and video tutorials. Is the script type=text/x-template id=pote span class=label label-info(%name%)/span div ul

[web2py] Re: For those using ractive or vuejs. I need help !!

2015-06-28 Thread Massimo Di Pierro
I am not sure but I think you are mixing ractive and vue syntax. In ractive you have a script/ and a div id=target/. The script is rendered in the target. In vue (which you use), the ractive code is in place but you still use a script instead of a div. Massimo On Saturday, 27 June 2015

Re: [web2py] Suggestions for multiple files upload in form

2015-06-28 Thread Chaitu P
can anyone help. I have copied all the files. But still not working. When i clicked on the + button it is not showing popup window to choose files. On Fri, Jun 26, 2015 at 11:43 AM, Chaitu P chaitanya.pochampa...@gmail.com wrote: Hi Paolo, I have installed your application and it is working

Re: [web2py] Re: Layout problem

2015-06-28 Thread Sébastien Loix
Yeah it's definitely a CSS not found. Did you double check the console and network tab (under Chrome) to see if all CSS files loaded correctly? On Friday, 26 June 2015 13:58:45 UTC+2, Chaitu P wrote: Thank you for reply. Iam using windows operating system. I have created a new application in

[web2py] new feature in trunk multi-word grid search.

2015-06-28 Thread Massimo Di Pierro
Until now multi world grid search would result in invalid query, but it now works. On Google App Engine if you search for pinco pallino it looks into all text fields for pinco pallino. On all the other supported backends, it search if for the separate existance of pinco and pallino in any text

[web2py] Re: New feature in trunk. bulk_register/invite

2015-06-28 Thread Massimo Di Pierro
OK but notice, anybody, not even logged in, can already register using somebody else's email address and that person would receive an unwanted email with a link to verify their email. Unless registration_requires_approval is set False. So perhaps the condition should only kick in if

[web2py] Re: type 'exceptions.ImportError'

2015-06-28 Thread Massimo Di Pierro
Not sure but you do not need from applications.omniavx_joe.modules.app_constants import * try instead: from app_constants import * less things can go bad On Sunday, 28 June 2015 08:19:46 UTC-5, Auden RovelleQuartz wrote: Error ticket for omniavx_joeTicket ID

[web2py] New feature in trunk. bulk_register/invite

2015-06-28 Thread Massimo Di Pierro
Hello web2py users, a new feature is in trunk, please help us test it. Originally developed here https://github.com/web2py/web2py/pull/985 as invite has been renamed as bulk_register. It is available to all web2py applications at this user:

[web2py] Re: New feature in trunk. bulk_register/invite

2015-06-28 Thread Anthony
I don't think this should be exposed by default for all users -- it should be disabled by default and only enabled when done so explicitly by the developer. I would think you would only want to expose this kind of functionality to admin/trusted users -- otherwise, you are providing a way for

[web2py] New feature in trunk: API tokens

2015-06-28 Thread Massimo Di Pierro
There is a new feature in trunk. Support for native API tokens. To enable in models/db.py use: auth.define_tables(username=False, signature=False, api_tokens=True) Then where appropriate replace @auth.requires_login() def test(): return 'hello %s' % auth.user.first_name with

Re: [web2py] Re: Layout problem

2015-06-28 Thread Chaitu P
I appreciate your help. That worked. On Sat, Jun 27, 2015 at 6:49 PM, Selman Kocael selciu...@gmail.com wrote: Every thing okay. But one thing missing. It is css file. In that page, right click and open source code, then search .css keyword. You must see this link: link rel=stylesheet

Re: [web2py] New feature in trunk. bulk_register/invite

2015-06-28 Thread Ovidio Marinho
ok - testing [image: http://itjp.net.br] http://itjp.net.br http://itjp.net.b http://itjp.net.brr *Ovidio Marinho Falcao Neto* ovidio...@gmail.com Brasil 2015-06-28 11:19 GMT-03:00 Massimo Di

[web2py] Re: New feature in trunk. bulk_register/invite

2015-06-28 Thread Massimo Di Pierro
I have done what you suggest, except for the cleanup-script. I added auth.settings.bulk_register_enabled = False We can than leave to the developer to do something like: self.setting.bulk_register_enabled = auth.has_membership(role='whatever') On Sunday, 28 June 2015 10:05:45 UTC-5, Massimo

[web2py] Re: New feature in trunk. bulk_register/invite

2015-06-28 Thread Anthony
On Sunday, June 28, 2015 at 11:05:45 AM UTC-4, Massimo Di Pierro wrote: OK but notice, anybody, not even logged in, can already register using somebody else's email address and that person would receive an unwanted email with a link to verify their email. Unless

[web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Niphlod
IMHO token should not be restricted to a var... it should be also possible to use an header... Performance-wise...as it is it's as bad as it could possibly be. 1) the extra table needs a solid unique=True on the token field: we don't want to do a full scan of that table for every request

[web2py] Re: expire user password

2015-06-28 Thread Massimo Di Pierro
There is no built-in mechanism since we do not store the time when a password changes but you can do it in this way: auth.settings.extra_fields['auth_user'] = [Field('password_charged_on','datetime',compute=lambda row: row.password and request.now, writable=False)] if auth.user and

[web2py] expire user password

2015-06-28 Thread 黄祥
hi, just wondering is it possible to have expire password in web2py application? perhaps something like the most os have (windows, linux) that have an option to set the user password is expired let say in 90 days, or 30 days. thanks and best regards, stifan -- Resources: - http://web2py.com

[web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Niphlod
PS: the code doesn't take into consideration an expired token. the mere existance of the record allows the authentication. -- 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: New feature in trunk: API tokens

2015-06-28 Thread Niphlod
Ok, read it carefullyAll of that IMHO isn't really what users wants to implement a token-based auth on top of an API. Apart from the fact that if the scheme of the tokens table gets corrected (a FK to the user_id and token unique) the first two queries are collapsible into one, calling

[web2py] Peculiar behavior of request.vars inside URL() (BUG?)

2015-06-28 Thread Robert Porter
I have lat/lng coordinates in my request.vars['coords'] saved with a '|' separating each coordinate. When I use URL(request.vars['coords']), it converts the '|' into '%7C'. This seems like a web2py error, but please let me know if I've made a mistake. And please let me know if there's some

[web2py] GUI crossroads: Cappuccino and/or web2py

2015-06-28 Thread Phillip Veda
I started a project in web2py aimed to store and manipulate user files, which at some point needs a dynamic GUI interface. Due to the intensive nature of the file processing, I am unsure whether embedding this python code would be very price-sensitive as deployed to GAE with its server-side

[web2py] Re: Bug in XML(...,sanitize=True) ?

2015-06-28 Thread Brian M
Thank you Massimo! On Saturday, June 27, 2015 at 12:34:18 AM UTC-5, Massimo Di Pierro wrote: The bug was introduced yesterday. Fixed in trunk now. On Saturday, 27 June 2015 00:12:10 UTC-5, Massimo Di Pierro wrote: I this with the latest trunk or earlier version. It may be a recent bug.

[web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Massimo Di Pierro
as you suggested I added unique=True as you suggested I reduced the number of db queries from 2 to 1 (when not on GAE) yes it should check for expiration (will add that) as you suggested you can now use a header (web2py_api_token) instead of ?_token=... I think the manage_tokens page is useful

Re: [web2py] Re: subprocess.call output to a file

2015-06-28 Thread Chaitu P
Thank you that worked.. On Thu, Jun 25, 2015 at 11:46 AM, Leonel Câmara leonelcam...@gmail.com wrote: You need to set stdout to be a file like object, so just open a file in write mode and use that as the stdout. Something like: ofile = open(path_to_the_output_file, 'w')

[web2py] Re: Peculiar behavior of request.vars inside URL() (BUG?)

2015-06-28 Thread villas
Hi Robert, I think args and vars are all url encoded. I think I worked around it with urllib.unquote( string ) when I hit this problem. Regards, D -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: GUI crossroads: Cappuccino and/or web2py

2015-06-28 Thread villas
I do not know Cappuchino but it is an interesting concept for 'desktop' client-side apps. So a Cappuchino client-side app could connect to your Web2py server-side app. At any rate, I suppose Cappuchino must connect to a server for DB functionality, so why not Web2py running on GAE or

[web2py] new (actually old) feature in trunk: /welcome/appadmin/manage/auth

2015-06-28 Thread Massimo Di Pierro
How many of you know of the existence of this page? http://... /welcome/appadmin/manage/auth Nobody knows because of the number of steps required to give a user access to the page. A recent change in trunk give the administrator access by default (that was not the case). So you can try it.

Re: [web2py] new (actually old) feature in trunk: /welcome/appadmin/manage/auth

2015-06-28 Thread Vinicius Assef
Is it documented anywhere? On 28 Jun 2015, at 19:13, Massimo Di Pierro massimo.dipie...@gmail.com wrote: How many of you know of the existence of this page? http://... /welcome/appadmin/manage/auth Nobody knows because of the number of steps required to give a user access to the

[web2py] Re: How do I check of the version of pysimplesoap in web2py.

2015-06-28 Thread Encompass solutions
Thanks for the hints. I think mine is sending ok but there is something with the receiving side of things. (response) I am going to try to grab just what I need from the xml response when it doesn't work like it should. BR, Jason Brower On Thursday, June 25, 2015 at 12:30:42 AM UTC+3,

Re: [web2py] Re: New feature in trunk: API tokens

2015-06-28 Thread Jason (spot) Brower
Name: Bearer Token? http://self-issued.info/docs/draft-ietf-oauth-v2-bearer.html Or am I wrong? On Mon, Jun 29, 2015 at 1:08 AM Massimo Di Pierro massimo.dipie...@gmail.com wrote: as you suggested I added unique=True as you suggested I reduced the number of db queries from 2 to 1 (when not