[web2py] Re: Proposal: create "namespaces" for translation system

2013-09-23 Thread jamarcer
Hello: I'm Demetrio's mate, and he asked me to upgrade the T with namespaces functionality into trunk (Version 2.6.3-stable+timestamp.2013.09.18.14.36.14). I have added a comment into 1196 issue with a code patch and a explanation. https://code.google.com/p/web2py/issues/detail?id=1196 I hope

Re: [web2py] Re: SQLFORM.grid: how can I return to a page after a custom edit function

2013-09-23 Thread Johann Spies
Thanks for sharing. On 23 September 2013 03:03, tomt wrote: > I thought I'd post the solution I came up with. > > It turned out to be easier than I thought it would be. Just read the page > number from request.vars.page, and pass it in the redirect after the > form.accepts. > > > # I define th

Re: [web2py] dlsym(0x8fe46768, CCKeyDerivationPBKDF): symbol not found ?????

2013-09-23 Thread Michele Comitini
This points to a problem in detecting a missing function in the crypto library on that version (old) of mac os x). I am working on a fix. In the mean time to force web2py to the slow pure python version of pbkdf2 just rename the file cd mv gluon/contrib/pbkdf2_ctypes.py gluon/contrib/pbkdf2_ctypes

[web2py] How to create a gird without SQL

2013-09-23 Thread Jayakumar Bellie
Hi, Is it possible to create a SQLForm.grid functionality without reading data from SQL. I have a list or dict of data read from a file. I want to create a grid with search and view functionality like SQLForm is it possible? -- Resources: - http://web2py.com - http://web2py.com/book (Documenta

Re: [web2py] Permission check for a user in multiple groups

2013-09-23 Thread Jayakumar Bellie
The user will be in multiple groups, in that case how to check for specific permission. On Thursday, September 19, 2013 6:54:36 PM UTC+5:30, viniciusban wrote: > > Speaking in RBAC terms, you should check for permissions. > > In your controller, something like: > @auth.has_permission("can_do_it

Re: [web2py] Permission check for a user in multiple groups

2013-09-23 Thread Vinicius Assef
Have you tried the way I suggested? Didn't it work? On Mon, Sep 23, 2013 at 6:50 AM, Jayakumar Bellie wrote: > The user will be in multiple groups, in that case how to check for specific > permission. > > > On Thursday, September 19, 2013 6:54:36 PM UTC+5:30, viniciusban wrote: >> >> Speaking in

[web2py] web2py 2.6.4 mysql migration problem

2013-09-23 Thread frasse
Hi All I try to follow migration recommendation for mysql in web2py 2.6.4 . as follow 1. I am setting migrate_enabled=False 2. everything is ok 3. length=255 to string Fields 4. everything is ok 5. re-enable migrations with migrate_enabled=True 6. application crash Here

Re: [web2py] Permission check for a user in multiple groups

2013-09-23 Thread Jayakumar Bellie
Ya I did :( but it did not work. On Monday, September 23, 2013 4:53:30 PM UTC+5:30, viniciusban wrote: > > Have you tried the way I suggested? > Didn't it work? > > On Mon, Sep 23, 2013 at 6:50 AM, Jayakumar Bellie > > > wrote: > > The user will be in multiple groups, in that case how to chec

Re: [web2py] Permission check for a user in multiple groups

2013-09-23 Thread Anthony
Can you show your code and describe in more detail what you need to happen? On Monday, September 23, 2013 8:00:47 AM UTC-4, Jayakumar Bellie wrote: > > Ya I did :( but it did not work. > > On Monday, September 23, 2013 4:53:30 PM UTC+5:30, viniciusban wrote: >> >> Have you tried the way I suggeste

[web2py] Re: How to create a gird without SQL

2013-09-23 Thread Anthony
No, the grid needs a DAL table or query object in order to do .select() and .count() operations. You could load the data into a SQLite memory database: https://groups.google.com/d/msg/web2py/g4Mon6PvNFc/jytHfEnOXTIJ. Anthony On Monday, September 23, 2013 4:25:53 AM UTC-4, Jayakumar Bellie wrote

[web2py] Form encoding problem 'ascii' codec can't encode character..

2013-09-23 Thread David Austin
Hi All, I'm seeing a number of error tickets generated in the guts of web2py stemming from a form.accepts() call. File "/web2py/gluon/html.py", line 856, in _traverse self._postprocessing() File "x/web2py/gluon/html.py", line 1774, in _postprocessing _value = str(self['

[web2py] retrieve value from custom auth_user field for current user login

2013-09-23 Thread 黄祥
hi, i want to have default value for table field that refer to custom auth_user field for current user login. i tried something like: auth_user_branch = db(db.auth_user.id == auth.user_id).select().first #db.stock_movement_header.from_branch.default=auth_user_branch.branch #db.stock_movement_hea

Re: [web2py] retrieve value from custom auth_user field for current user login

2013-09-23 Thread Marin Pranjić
First is a method, not an attribute. Marin (mobile) On Sep 23, 2013 5:06 PM, "黄祥" wrote: hi, i want to have default value for table field that refer to custom auth_user field for current user login. i tried something like: auth_user_branch = db(db.auth_user.id == auth.user_id).select().first

[web2py] Re: Proposal: create "namespaces" for translation system

2013-09-23 Thread Massimo Di Pierro
I asked for opinion on the web2py-developers list. I like your patch but already have a machenism for this T("welcome ## namespace") you propose T("welcome", ns="namespace") The different is not just semantics. In the former case different namespaces go in the same file. In your case they go

[web2py] rendering a crud query.

2013-09-23 Thread Avi A
Hi, i'm using this for a user to see only items he owns: my_items=crud.select(db.t_categories,db.t_categories.created_by==auth.user.id ) Which returns as a dict. if i use {{=my_items}} I can see I got the expected list. but I didn't find a way how to render it: This is what I was trying for both t

[web2py] Re: Unique validation

2013-09-23 Thread Massimo Di Pierro
It will not work for data already stored in mixed case. It should work for newly created records. Does it not? On Sunday, 22 September 2013 16:50:11 UTC-5, Avi A wrote: > > This doesn't seem to work: > db.define_table('t_categories', > Field('f_category_name', type='string', notnull=True, >

[web2py] name id for form

2013-09-23 Thread Ángel Gabriel Morales Acosta
Hello. For example. *<>* def view(): form = SQLFORM(db.table) form['_id']='*name_for_form*' return dict(form=form) *<>* {{=form}} *<> * ---> Yes. OK. Print name id for form But if i use to the next in view: *<>* {{=form.custom.begin

[web2py] Re: Amazon RDS

2013-09-23 Thread Tushar Tuteja
he it is just the end point ? On Tuesday, January 15, 2013 10:41:05 AM UTC+5:30, Simon Ashley wrote: > > Wondering if it is possible to connect an EC2 instance/ application to a > RDS instance (MYSQL), and what the connection string should be? > There is some discussions here implying that it may

[web2py] Re: Proposal: create "namespaces" for translation system

2013-09-23 Thread step
Keeping namespaces in separate files makes distributing localized components easier, like in the wiki plugin example in the OP. OTOH -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issu

[web2py] SQLFORM.smartgrid linked tables links display empty tables and don't display the appropriate fields

2013-09-23 Thread TYRANISTAR
Hello everyone, I have two tables defined as such: # db.define_table('total_ec_numbers', Field('id','integer', label=T('ID')), Field('query_name','string', label=T('Gene ID')), Field('hit_name','string', label=T('Hit name')), Field('hit_accession','string', label=T('Hit ac

[web2py] Re: Unique validation

2013-09-23 Thread Avi A
It does. Thanks a lot. On Monday, September 23, 2013 7:52:40 PM UTC+3, Massimo Di Pierro wrote: > > It will not work for data already stored in mixed case. It should work for > newly created records. Does it not? > > On Sunday, 22 September 2013 16:50:11 UTC-5, Avi A wrote: >> >> This doesn't see

Re: [web2py] Trouble Updating to 2.6.4 from 2.5.1

2013-09-23 Thread Massimo Di Pierro
Two possibilities: 1) You have an incomplete upgrade. Some of the modules have not been upgraded. 2) you have another gluon in path and somehow it comes with the web2py gluon module. 3) you are not restarting the web server. Look into gluon/tools.py and there should be a class Config at the bott

Re: [web2py] retrieve value from custom auth_user field for current user login

2013-09-23 Thread Niphlod
meaning, you should use *first()*, not *first* On Monday, September 23, 2013 6:09:47 PM UTC+2, Marin Pranjić wrote: > > First is a method, not an attribute. > > Marin (mobile) > > On Sep 23, 2013 5:06 PM, "黄祥" > > wrote: > > hi, > > i want to have default value for table field that refer to custo

[web2py] Re: Permission check for a user in multiple groups

2013-09-23 Thread Massimo Di Pierro
Can you show us some of your code? On Thursday, 19 September 2013 00:13:59 UTC-5, Jayakumar Bellie wrote: > > Hi, > I have groups with multiple permission. > I have a user assigned to multiple groups. > How to give access to user only for the groups they are assigned to. > > -- Resources: - http

[web2py] Re: rendering a crud query.

2013-09-23 Thread Avi A
That works: my_items=crud.select(db.t_categories,db.t_categories.created_by==auth.user.id,fields= \ ['f_category_name'],headers={'t_categories.f_category_name': ''} ) {{for item in my_items:}} {{=item[0]}} {{pass}} Left it null here to not display it :'t_categories.f_ca

[web2py] Kvasir: Penetration test-driven data management in web2py

2013-09-23 Thread Kurt Grutzmacher
Hey everyone, A tool I created to help manage Penetration Test-related data was pushed this morning to Github. It's written in web2py which was (and still is) the best tool for the job when we started this back in 2010. I'm very proud to finally be releasing Kvasir publicly under the 3-clause BSD

[web2py] Re: Form encoding problem 'ascii' codec can't encode character..

2013-09-23 Thread Massimo Di Pierro
What is the code that generates this: certainly there is no font tag anywhere in web2py. It was deprecated in HTML years ago. On Monday, 23 September 2013 09:00:28 UTC-5, David Austin wrote: > > > Hi All, > > I'm seeing a number of error tickets generated in the guts of web2py > stemming from

[web2py] Re: Proposal: create "namespaces" for translation system

2013-09-23 Thread Massimo Di Pierro
I was skeptical but I have been convinced this is an excellent idea. Your patch is going to trunk now. Thank you! On Monday, 23 September 2013 02:13:10 UTC-5, jamarcer wrote: > > Hello: > > I'm Demetrio's mate, and he asked me to upgrade the T with namespaces > functionality into trunk (Version

[web2py] Re: name id for form

2013-09-23 Thread Massimo Di Pierro
Yes. The problem is that form.custom.begin is create when the form object is defined. Since it is a string it is not updated when you change a form attribute. If this is really an issue for you open a ticket. The behavior can be changed. On Monday, 23 September 2013 10:00:37 UTC-5, Ángel Gabrie

[web2py] Re: How to get started with web2py's Debug? - very basic questions

2013-09-23 Thread gtrzeciak
I have just installed web2py (on Windows) and having the same problem with online debugger - yet I don't see even a hint on what to do even though it was mentioned over a year ago? Has anyone found the solution? On Monday, August 13, 2012 5:31:31 PM UTC+2, Rob_McC wrote: > > > I have used debugg

[web2py] Re: Amazon RDS Connection String

2013-09-23 Thread Massimo Di Pierro
What's your connections string? On Monday, 23 September 2013 14:12:53 UTC-5, Tushar Tuteja wrote: > > hey > I am using turnkey on EC2, > I am unable to connect o my db > it says unable to connect. > is their is some problem with the connection string ? > or security groups ? > > > > -- Resource

[web2py] Amazon RDS Connection String

2013-09-23 Thread Tushar Tuteja
hey I am using turnkey on EC2, I am unable to connect o my db it says unable to connect. is their is some problem with the connection string ? or security groups ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https

Re: [web2py] Re: pluralization system problem

2013-09-23 Thread mcamel
El domingo, 22 de septiembre de 2013 12:59:23 UTC+2, dbdeveloper escribió: > > # This rule isn't perfect but covers many cases. Complete rules at > http://www.rae.es/dpd/srv/search?id=Iwao8PGQ8D6QkHPn4i. > construct_plural_form = lambda word, plural_id: (word + > ('es' if w

[web2py] Re: Kvasir: Penetration test-driven data management in web2py

2013-09-23 Thread Massimo Di Pierro
Fantastic tool! On Monday, 23 September 2013 13:47:11 UTC-5, Kurt Grutzmacher wrote: > > Hey everyone, > > A tool I created to help manage Penetration Test-related data was pushed > this morning to Github. It's written in web2py which was (and still is) > the best tool for the job when we start

[web2py] scheduler help

2013-09-23 Thread Tim Richardson
You need to debug the scheduled task. Add debug code so that the output captured is useful. The scheduler itself is unlikely to be the problem I think; it just sets up execution of your task. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py

Re: [web2py] Trouble Updating to 2.6.4 from 2.5.1

2013-09-23 Thread archeaneon
There is no class Config in gluon/tools.py. I have also tried upgrading on several copies of this folder, with the same result each time. I have tried restarting the web server. I am going to assume that the upgrade is somehow incomplete, but I do not think this is due to the connection being cu

Re: [web2py] retrieve value from custom auth_user field for current user login

2013-09-23 Thread 黄祥
i've tried that too, but still get an error : #auth_user_branch = db(db.auth_user.id == auth.user_id).select(db.auth_user.branch).first() #db.stock_movement_header.from_branch.default=auth_user_branch.branch #AttributeError: 'NoneType' object has no attribute 'branch' #auth_user_branch = db(db.a

Re: [web2py] Trouble Updating to 2.6.4 from 2.5.1

2013-09-23 Thread Richard Vézina
How do you update? Better, if you can, download web2py from download page and upload and un zip it your server manually before having made a backup (tar ball) of everything in case something goes wrong. If you did upgrade with the button in admin, try the process I just describe. Richard On Mo

[web2py] How to suppress output from anyserver.py

2013-09-23 Thread Mark Finkelstein
I noticed that when running python anyserver.py -s gevent, there's a lot of logging data pushed out into stdio, which I use for my own debugging. Is there any way of suppressing the default output? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/we

Re: [web2py] Trouble Updating to 2.6.4 from 2.5.1

2013-09-23 Thread Richard Vézina
Also, don't forget to copy web2py "reserved" app files from welcome app in your existing app : https://groups.google.com/d/msg/web2py/tVyL7z7WHkw/mce13Vh-k3UJ Richard On Mon, Sep 23, 2013 at 4:53 PM, Richard Vézina wrote: > How do you update? > > Better, if you can, download web2py from downl

[web2py] Re: How to get started with web2py's Debug? - very basic questions

2013-09-23 Thread 黄祥
had you already set the debug trace in your code? from gluon.debug import dbg dbg.set_trace() best regards, stifan -- 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

[web2py] Re: How to suppress output from anyserver.py

2013-09-23 Thread Niphlod
ehm do you use "print" anywhere in your code? if yes, you shouldn't at all use a redirection to /dev/null if you don't want to see anything on the console, but in any case, it's not a good practice (and I'm not sure if it will cause problems) On Monday, September 23, 2013 10:55:38 PM U

Re: [web2py] How to suppress output from anyserver.py

2013-09-23 Thread Michele Comitini
Does the following work? $ python anyserver.py -s gevent >/dev/null 2>&1 If you need your log instead, put the name of a file (ex. "my-server-debug.log") in place of /dev/null . mic 2013/9/23 Mark Finkelstein > I noticed that when running python anyserver.py -s gevent, there's a lot > of log

Re: [web2py] Re: pluralization system problem

2013-09-23 Thread Vladyslav Kozlovskyy
Thank you for your fix. I'll create the patch. With the best regards Vlad Kozlovskyy Chernivtsi, Ukraine У пн, 2013-09-23 у 13:29 -0700, mcamel пише: > El domingo, 22 de septiembre de 2013 12:59:23 UTC+2, dbdeveloper > escribió: > > > # This rule isn't perfect but covers many cases. Comp

Re: [web2py] retrieve value from custom auth_user field for current user login

2013-09-23 Thread Niphlod
you are not logged in in the shell. that's why auth.user_id is None and so you can't fetch the corresponding auth_user record > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/l

Re: [web2py] retrieve value from custom auth_user field for current user login

2013-09-23 Thread 黄祥
thank you so much for your explaination. my code is work now when i define it in controller. auth_user_branch = db(db.auth_user.id == auth.user_id).select(db.auth_user.branch).first() db.stock_movement_header.from_branch.default=auth_user_branch.branch it seems the auth_user can't work in models

Re: [web2py] Re: Proposal: create "namespaces" for translation system

2013-09-23 Thread Daniel Gonzalez Zaballos
The idea is exactly for this. To have separated localized components. I hope that in a few weeks/months we can release something that we are working on components. I cannot say to much now :) 2013/9/23 Massimo Di Pierro > I was skeptical but I have been convinced this is an excellent idea. Your

[web2py] Re: Form encoding problem 'ascii' codec can't encode character..

2013-09-23 Thread David Austin
On Tuesday, September 24, 2013 4:46:13 AM UTC+10, Massimo Di Pierro wrote: > > What is the code that generates this: > > > > certainly there is no font tag anywhere in web2py. It was deprecated in > HTML years ago. > Hi Massimo, I believe it comes from Microsoft Word. But the important thin

[web2py] references how to create module in web2py

2013-09-23 Thread 黄祥
hi, i have a function that reuse by another function for example for showing the grid, i read in this forum that they suggests to put the reusable function in modules. i want to learn how to create module in web2py, any references for this? i'm tried the code in web2py book : /test/modules/tes

[web2py] Enable button doesn't work (Admin Interface)

2013-09-23 Thread gtrzeciak
After disabling application when I wanted to enable it again the Enable button changed to Disable but the application was still disabled. After refresh the button was Disable again. I had to manually delete DISABLED file to re-enable application again. I -- Resources: - http://web2py.com - htt

[web2py] Re: How to get started with web2py's Debug? - very basic questions

2013-09-23 Thread gtrzeciak
Thank you Stifan for your reply Setting breakpoint programmatically triggered a breakpoint in the debug window which now gives me a way to debug. As a web2py noob I expected I will be able to set a breakpoint clicking on the line number in the Editor or adding breakpoint from Breakpoint window

[web2py] Re: Form encoding problem 'ascii' codec can't encode character..

2013-09-23 Thread Massimo Di Pierro
I think we need to see the source code On Monday, 23 September 2013 19:09:32 UTC-5, David Austin wrote: > > > > On Tuesday, September 24, 2013 4:46:13 AM UTC+10, Massimo Di Pierro wrote: >> >> What is the code that generates this: >> >> >> >> certainly there is no font tag anywhere in web2py. It

[web2py] Re: references how to create module in web2py

2013-09-23 Thread Massimo Di Pierro
Replace return "Your ip is " + test.ip() with return str(dir(test)) what do you get? You may be importing the wrong module. On Monday, 23 September 2013 19:45:08 UTC-5, 黄祥 wrote: > > hi, > > i have a function that reuse by another function for example for showing > the grid, i read in thi

[web2py] Re: references how to create module in web2py

2013-09-23 Thread Anthony
Did you add the ip() function after the first time the module was imported while running web2py? On Monday, September 23, 2013 8:45:08 PM UTC-4, 黄祥 wrote: > > hi, > > i have a function that reuse by another function for example for showing > the grid, i read in this forum that they suggests to

[web2py] Re: Enable button doesn't work (Admin Interface)

2013-09-23 Thread Massimo Di Pierro
Was this a one time event or was it reproducible? On Monday, 23 September 2013 18:01:28 UTC-5, gtrz...@gmail.com wrote: > > After disabling application when I wanted to enable it again the Enable > button changed to Disable but the application was still disabled. After > refresh the button was D

[web2py] links are using https instead of htttp

2013-09-23 Thread wiel
why do my links use https instead of http ? I installed web2py with this script http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/w

[web2py] Re: references how to create module in web2py

2013-09-23 Thread 黄祥
@massimo */test/controllers/default.py* from gluon.custom_import import track_changes; track_changes(True) import test def index(): return str(dir(test)) *['__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__']* @anthony i've already restarted web2py and

[web2py] session add value error on pythonanywhere

2013-09-23 Thread 黄祥
hi, i have an application that using session to store the value, it running well on my local, but got an error when i test on pythonanywere, is there any special treat for session (add, remove, destroy, etc) when running on pythonanywhere? the error i got on pythonanywere when i click the butt

[web2py] Re: sqlform.grid with div instead of html tables

2013-09-23 Thread ssuresh
Yes..Now it works.. I was returning row object back from myformat function. Web2py was internally creating tables when it encounters a row object. But when i changed the myformat function to return data formatted as divs, it is working as expected.. Thanx for the help On Sunday, September 22,

Re: [web2py] retrieve value from custom auth_user field for current user login

2013-09-23 Thread Marin Pranjić
It can be used in a model, but only after you define auth and auth tables (auth.define_tables) Marin On Mon, Sep 23, 2013 at 11:54 PM, 黄祥 wrote: > thank you so much for your explaination. > my code is work now when i define it in controller. > > auth_user_branch = db(db.auth_user.id == > auth.

Re: [web2py] Re: How to get started with web2py's Debug? - very basic questions

2013-09-23 Thread Mariano Reingart
dbg.set_trace() should not be needed if breakpoints are used via the web user interface. The "line not found" issue It is a problem in py2exe and linecache python module, I made a pull request with a patch. In the meantime, you could use the source code version of web2py, that should work as long

Re: [web2py] links are using https instead of htttp

2013-09-23 Thread Marin Pranjić
Which links, can you show an example? Do you use your site over http or https? Marin On Tue, Sep 24, 2013 at 6:02 AM, wiel wrote: > why do my links use https instead of http ? I installed web2py with this > script > http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh > > -- > Resou

Re: [web2py] Re: Enable button doesn't work (Admin Interface)

2013-09-23 Thread Marin Pranjić
It happened to my but only for applications that were already disabled before I updated web2py version. Marin On Tue, Sep 24, 2013 at 4:19 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Was this a one time event or was it reproducible? > > > On Monday, 23 September 2013 18:01:28 U