[web2py] Re: Traceback with record versioning enabled and common_filter defined.

2015-01-09 Thread Jose C
Bug reported:

https://code.google.com/p/web2py/issues/detail?id=2032can=4


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Problem using grid after crud

2015-01-09 Thread Cássio Botaro
First,
crud is deprecated. it exists only for backyard compatibility.

Second, what you want to do?

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-09 Thread Robin Manoli
Thanks Anthony!
Does it work the same to use cache.disk(...) ?

Den fredag 9 januari 2015 kl. 14:02:42 UTC+1 skrev Anthony:

 To clear a single item, you can use cache.ram(key, None), and to clear 
 multiple items, you can use cache.ram.clear(regex='[some regex]'). To clear 
 the entire cache, cache.ram.clear(None).

 Anthony 

 On Friday, January 9, 2015 at 2:47:39 AM UTC-5, Robin Manoli wrote:

 Ok, thank you Derek.

 Is there any way to remove old cache from mem and disk then, that is no 
 longer in use?

 Den tisdag 6 januari 2015 kl. 19:42:58 UTC+1 skrev Derek:

 No, there's nothing going on in the background unless something is 
 processing. It will check as soon as a new request comes in that references 
 the cache, it will review the expiration date of the cached item before 
 using it.

 On Monday, January 5, 2015 6:27:29 PM UTC-7, Robin Manoli wrote:

 Hi!

 When caching selects, in memory or disk, are they then cleared 
 automatically when the expiration time is over? Removed and forgotten?
 Or is there some cleanup script similar to the one for sessions?

 - Robin



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-09 Thread Leonel Câmara
Yes cache disk has the same behaviour.

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] /appadmin/manage/auth GAE access

2015-01-09 Thread samuel bonill
You can use Admin-Plus ( https://github.com/pyner/admin_plus )

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] ldap auth manage user

2015-01-09 Thread Richard Vézina
Here it is, it was not a problem to import validators finally, what I did
is import IS_EMAIL() actually... But I am not sure it really solved the
issue... You should follow the other thread for more insight...

I make a diff with ldap_auth.py from 2.9.5 and there were not to much off
sync...

Hope it helps.

Richard

On Fri, Jan 9, 2015 at 10:31 AM, Richard Vézina ml.richard.vez...@gmail.com
 wrote:

 Yes, I think it was the conclusion to which we were coming with Massimo
 that were making my modification to web2py not acceptable...

 The check has to be done in LDAP contrib... The problem at this level is
 to have access to web2py validators, if I remember we can't easily import
 them, we have to copy them which is not DRY...

 I can attach here my actual version of ldap_auth if you want... I saw a
 couple modifications pass throught PR request or on this list though, so it
 may be out of date...

 But you can see what I actually do that solved this issue for me for now...

 Richard

 On Thu, Jan 8, 2015 at 6:29 PM, Carlos Hanson car...@clanhanson.com
 wrote:

 I'm not talking about forcing username only in all cases. Since I know
 that for this application and my LDAP server configuration, usernames are
 okay, so I think that having the option to force a particular login methon
 is useful.

 Then we can say login_with_email=False, or something of that nature, and
 get an error message that says logging in with email addresses is not
 allowed.

 I'll keep playing with it, since I need a way to prevent a user from
 accidentally creating a second account. Plus, I need to figure out why some
 account, and not all, are getting a duplicate created. That doesn't make
 sense.

 If I find something useful and relatively simple, I'll make another
 suggestion to get some feedback.


 On Thursday, January 8, 2015 at 2:37:15 PM UTC-8, Richard wrote:

 I think we can't restrick using only username because AD may have been
 configure to use email address... To me, if I remember, the problem where
 coming from ldap_auth contrib that is overly convoluted regarding the way
 it manage login of user, transforming it from email to username to email...
 In addition not all the variant of ldap use the same code regarding login
 so... But it only some thoughts I didn't read the code since then and I
 prefered to patch web2py which was making sure there were no email used as
 login name. But I think it were not working for web2py and can't be
 included in web2py code base.

 Richard



 On Thu, Jan 8, 2015 at 5:21 PM, Carlos Hanson car...@clanhanson.com
 wrote:

 I definitely like and agree with your idea about using
 get_or_create_user() in a login_method that intends to create (or get) a
 user, but that doesn't eliminate the duplicate entry problem. Perhaps, my
 suggestion isn't the best for eliminating it either, since it would require
 an update to ldap_auth.

 I also just realized that it is only a few users that are getting
 duplicate user accounts created. I am uncertain what would cause the
 problem in a subset of new accounts and not all, so my case just got more
 confusing.

 I can't find a way to prevent logging in with an email address. If it
 doesn't exist, then perhaps we just need to be able to tell
 get_or_create_user() to not use the full email. Then it would be more
 likely to find the existing user created by ldap_auth.


 Carlos


 On Thursday, January 8, 2015 at 12:01:03 PM UTC-8, Richard wrote:

 I guess any solution si welcome, I didn't have spare time to work on
 this and because of the many ldap system to be tested against the change 
 to
 be made I have been reluctante to work on this scince could be very long 
 to
 finish the refactoring... :(

 Richard

 On Thu, Jan 8, 2015 at 2:49 PM, Carlos Hanson car...@clanhanson.com
 wrote:

 Greetings,

 I've been humming along quite nicely until I released a new
 application last month which is used by our entire staff rather than our
 department. Now I have run into the duplicate user problem, but I looked
 through the code and figured out why. I had forgotten that you mentioned 
 it
 to me in this thread.

 After reviewing your suggested solution and seeing that it has not
 been implemented, I thought we might consider an alternative. Since Auth
 has get_or_create_user() and it is called by Auth.login(), isn't it
 reasonable to think that a particular login_method can also create a 
 user?
 Given that ldap_auth is already doing so, I suggest that we ask the
 login_method for the user. If we get it, use it. If not, Auth can use its
 get_or_create_user().

 For example, in tools.py starting at line 2467:

 # try alternate logins 1st as these have the
 # current version of the password
 user = None
 for login_method in settings.login_methods:
 if login_method != self and \
 login_method(request.vars[username],
  request.vars[passfield]):
 if not self in settings.login_methods:
 # do not store password 

Re: [web2py] ldap auth manage user

2015-01-09 Thread Richard Vézina
Yes, I think it was the conclusion to which we were coming with Massimo
that were making my modification to web2py not acceptable...

The check has to be done in LDAP contrib... The problem at this level is to
have access to web2py validators, if I remember we can't easily import
them, we have to copy them which is not DRY...

I can attach here my actual version of ldap_auth if you want... I saw a
couple modifications pass throught PR request or on this list though, so it
may be out of date...

But you can see what I actually do that solved this issue for me for now...

Richard

On Thu, Jan 8, 2015 at 6:29 PM, Carlos Hanson car...@clanhanson.com wrote:

 I'm not talking about forcing username only in all cases. Since I know
 that for this application and my LDAP server configuration, usernames are
 okay, so I think that having the option to force a particular login methon
 is useful.

 Then we can say login_with_email=False, or something of that nature, and
 get an error message that says logging in with email addresses is not
 allowed.

 I'll keep playing with it, since I need a way to prevent a user from
 accidentally creating a second account. Plus, I need to figure out why some
 account, and not all, are getting a duplicate created. That doesn't make
 sense.

 If I find something useful and relatively simple, I'll make another
 suggestion to get some feedback.


 On Thursday, January 8, 2015 at 2:37:15 PM UTC-8, Richard wrote:

 I think we can't restrick using only username because AD may have been
 configure to use email address... To me, if I remember, the problem where
 coming from ldap_auth contrib that is overly convoluted regarding the way
 it manage login of user, transforming it from email to username to email...
 In addition not all the variant of ldap use the same code regarding login
 so... But it only some thoughts I didn't read the code since then and I
 prefered to patch web2py which was making sure there were no email used as
 login name. But I think it were not working for web2py and can't be
 included in web2py code base.

 Richard



 On Thu, Jan 8, 2015 at 5:21 PM, Carlos Hanson car...@clanhanson.com
 wrote:

 I definitely like and agree with your idea about using
 get_or_create_user() in a login_method that intends to create (or get) a
 user, but that doesn't eliminate the duplicate entry problem. Perhaps, my
 suggestion isn't the best for eliminating it either, since it would require
 an update to ldap_auth.

 I also just realized that it is only a few users that are getting
 duplicate user accounts created. I am uncertain what would cause the
 problem in a subset of new accounts and not all, so my case just got more
 confusing.

 I can't find a way to prevent logging in with an email address. If it
 doesn't exist, then perhaps we just need to be able to tell
 get_or_create_user() to not use the full email. Then it would be more
 likely to find the existing user created by ldap_auth.


 Carlos


 On Thursday, January 8, 2015 at 12:01:03 PM UTC-8, Richard wrote:

 I guess any solution si welcome, I didn't have spare time to work on
 this and because of the many ldap system to be tested against the change to
 be made I have been reluctante to work on this scince could be very long to
 finish the refactoring... :(

 Richard

 On Thu, Jan 8, 2015 at 2:49 PM, Carlos Hanson car...@clanhanson.com
 wrote:

 Greetings,

 I've been humming along quite nicely until I released a new
 application last month which is used by our entire staff rather than our
 department. Now I have run into the duplicate user problem, but I looked
 through the code and figured out why. I had forgotten that you mentioned 
 it
 to me in this thread.

 After reviewing your suggested solution and seeing that it has not
 been implemented, I thought we might consider an alternative. Since Auth
 has get_or_create_user() and it is called by Auth.login(), isn't it
 reasonable to think that a particular login_method can also create a user?
 Given that ldap_auth is already doing so, I suggest that we ask the
 login_method for the user. If we get it, use it. If not, Auth can use its
 get_or_create_user().

 For example, in tools.py starting at line 2467:

 # try alternate logins 1st as these have the
 # current version of the password
 user = None
 for login_method in settings.login_methods:
 if login_method != self and \
 login_method(request.vars[username],
  request.vars[passfield]):
 if not self in settings.login_methods:
 # do not store password in db
 form.vars[passfield] = None
 try:
 user = login_method.get_user()
 except AttributeError:
 # login method has not implemented get_user()
 pass
 if user is None:
 user = self.get_or_create_user(
 form.vars, settings.update_fields)
 break



 On Friday, August 16, 2013 at 3:10:36 PM UTC-7, Richard wrote:

 

Re: [web2py] current transaction is aborted, commands ignored until end of transaction block

2015-01-09 Thread Paolo Valleri
Hi, 
have you checked the logs as Michele suggested?
Can you tell us all steps to reproduce the issue?

Paolo

On Thursday, January 8, 2015 at 9:48:50 PM UTC+1, Hector Carrasco wrote:

 Up.

 El sábado, 14 de abril de 2012, 9:28:25 (UTC-3), Michele Comitini escribió:

 Activate error logging on the postgresql server and read the logs, it
 helps, not always but most of the time.

 mic


 Il 14 aprile 2012 08:59, Bruce Wade bruce...@gmail.com ha scritto:
  How do you trouble shoot this kind of error?
 
  class 'psycopg2.InternalError' current transaction is aborted, 
 commands
  ignored until end of transaction block
 
 
  --
  --
  Regards,
  Bruce Wade
  http://ca.linkedin.com/in/brucelwade
  http://www.wadecybertech.com
  http://www.fittraineronline.com - Fitness Personal Trainers Online
  http://www.warplydesigned.com
 



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Not getting expected results from a query

2015-01-09 Thread Niphlod
then do a 

def cost3():
jnum = request.args(0,cast=int)
a = 0
thequery = db(db.PO.job_id==jnum)._select()
results = db(db.PO.job_id==jnum).select()
for row in results:
a = a + row.mycost
return dict(a=a, howmany=len(results), thequery=thequery)

too see if the underlying t-sql is correct.

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: mobile menu item always active

2015-01-09 Thread Richard D
I have tested this on the iPhone and Samsung Note 2014 with the same 
behaviour. It looks to be a consequent issue.
I'll open a ticket for this.

Richard D

On Friday, January 9, 2015 at 6:07:36 AM UTC+1, Massimo Di Pierro wrote:

 Please open a ticket. Is this an IPad specific issue?

 On Thursday, 8 January 2015 13:07:15 UTC-6, Richard D wrote:

 When a menu-item in the nav-bar is selected on a iPad (both Chrome and 
 Safari) as mobile menu, the first menu item is always active.
 Another menu item is temporarily active, but after selecting that menu 
 item, the first becomes active again.
 The consequence is that all menu items can be used except the first item.

 I have defined this menu in menu.py

 response.menu = [
 (T('Interviews'), False, URL('default', 'index'), []),
 (T('Voeg interview toe'), False, URL('default', 'voegtoe'), []),
 (T('Statistieken'), False, URL('default', 'statistieken'), []),
 (T('Presentatie'), False,  '
 https://prezi.com/e36pz5qa1ghg/het-wij-gevoel/', [])
 ]

 Thank your for your feed back.

 Richard D



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Refresh DIV onclick

2015-01-09 Thread Richard Vézina
You should also use session.flash instead of response.flash if you want
your flash message to pop in the right place, I mean in your reloaded
component after the form it contains has been submitted...

Richard

On Fri, Jan 9, 2015 at 1:32 PM, Richard Vézina ml.richard.vez...@gmail.com
wrote:

 Is you LOAD() in view surrounding with a div? like so :

 div id=my_load_component_div'
 LOAD(...)
 /div

 Then response.js = 'web2py_component(%(URL)s,my_load_component_div' %
 {'URL': URL(Off the component)} should works just fine in your use
 scenario...

 Richard

 On Thu, Nov 6, 2014 at 6:38 PM, Tim Richardson t...@growthpath.com.au
 wrote:



 On Friday, 7 November 2014 09:19:40 UTC+11, Tim Richardson wrote:

 At first glance it seems to me that you should use LOAD components on
 the page.  Read that chapter.  You will process answers via Ajax (web2py
 submits a LOAD form via Ajax automatically).  You can refresh the div when
 your processing of answers is complete.


 I should have said that it looks like you have read the chapter. The
 problem with helping you further is that you refer to attempted solutions
 but don't provide the detail of what you tried and what went wrong. Lots of
 people have done what you want to do.

 --
 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 Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: /appadmin/manage/auth GAE access

2015-01-09 Thread Jacinto Parga
Yes, it is very nice and useful.
But I was worried because I thought than anyone could access to appadmin if 
I forgot to clear the session in the browser when access with google 
account.
Thanks Samuel 

El viernes, 9 de enero de 2015, 16:46:27 (UTC+1), samuel bonill escribió:

 You can use Admin-Plus ( https://github.com/pyner/admin_plus )

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Please help us test the 2.9.12 binaries

2015-01-09 Thread Richard Vézina
GTK and app too, but I didn't profile or do any investigation...

Richard

On Fri, Jan 9, 2015 at 12:08 AM, Massimo Di Pierro 
massimo.dipie...@gmail.com wrote:

 I am finding the GTK widget very slow. Is the server also slow?


 On Wednesday, 7 January 2015 14:10:26 UTC-6, Richard wrote:

 Most part of app seems to work... Is there some stuff I should check more
 then other, thing that you made change that you want to make sure it is not
 breaking backward compatibility?

 Richard

 On Wed, Jan 7, 2015 at 3:08 PM, Richard Vézina 
 ml.richard.vez...@gmail.com wrote:

 Source work now with Ubunt 12.04, very slow though...

 Richard

 On Wed, Jan 7, 2015 at 12:01 PM, Kiran Subbaraman 
 subbaraman.ki...@gmail.com wrote:

  WIN works - it comes up, and can navigate through the bundled welcome
 / examples / admin apps. Haven't tested a working DB based application on
 it, though.

 
 Kiran Subbaramanhttp://subbaraman.wordpress.com/about/

 On Wed, 07-01-2015 10:19 PM, Massimo Di Pierro wrote:

 Can you try once more please? I do not have a windows machine handy.

 On Wednesday, 7 January 2015 00:03:09 UTC-6, Kiran Subbaraman wrote:

  SRC seems to work ok now. I haven't deployed a working application
 on it to test it.
 WIN starts, but shows an error:

 Traceback (most recent call last):
   File gluon/restricted.py, line 224, in restricted
   File 
 C:/Users/subbaraman/Downloads/web2py_win/web2py/applications/welcome/models/db.py
  http://127.0.0.1:8000/admin/default/edit/welcome/models/db.py, line 
 14, in module
 db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
   File gluon/dal/base.py, line 443, in __init__
   File gluon/custom_import.py, line 92, in custom_importer
 ImportError: No module named reserved_sql_keywords


 
 Kiran Subbaramanhttp://subbaraman.wordpress.com/about/

 On Wed, 07-01-2015 10:40 AM, Massimo Di Pierro wrote:

 OK. One more try. The problems with SRC and OSX versions are fixed.
 How about the WIN version?

  The GTK widget of the OSX version seems very slow on my Mac. I
 cannot figure out if it is a local problem or a more general one.

 On Tuesday, 6 January 2015 11:37:59 UTC-6, Massimo Di Pierro wrote:

 The 2.9.12 source is in

  http://web2py.com/examples/static/nightly/web2py_src.zip

  The 2.9.12 binaries are in

  http://web2py.com/examples/static/nightly/web2py_win.zip
 http://web2py.com/examples/static/nightly/web2py_osx.zip

  Please help us test them so we can released 2.9.12.

  2.9.12 includes mostly bug fixes but there is some major DAL
 refactoring so we are concerned about backward compatibility. We think it
 works but please let us know asap if this breaks your code.

  Massimo

--
 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
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


   --
 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
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 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
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



  --
 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 Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 Groups 
web2py-users group.
To unsubscribe from 

Re: [web2py] Re: Refresh DIV onclick

2015-01-09 Thread Richard Vézina
Is you LOAD() in view surrounding with a div? like so :

div id=my_load_component_div'
LOAD(...)
/div

Then response.js = 'web2py_component(%(URL)s,my_load_component_div' %
{'URL': URL(Off the component)} should works just fine in your use
scenario...

Richard

On Thu, Nov 6, 2014 at 6:38 PM, Tim Richardson t...@growthpath.com.au
wrote:



 On Friday, 7 November 2014 09:19:40 UTC+11, Tim Richardson wrote:

 At first glance it seems to me that you should use LOAD components on the
 page.  Read that chapter.  You will process answers via Ajax (web2py
 submits a LOAD form via Ajax automatically).  You can refresh the div when
 your processing of answers is complete.


 I should have said that it looks like you have read the chapter. The
 problem with helping you further is that you refer to attempted solutions
 but don't provide the detail of what you tried and what went wrong. Lots of
 people have done what you want to do.

 --
 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 Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Problem migrating field type from 'string' to 'text' (postgresql)

2015-01-09 Thread Ian W. Scott
OK, I'm upgrading. Ran into a snag with my passwords file and finding the 
right port number, but when it's upgraded I'll see whether it does the 
migration correctly.

Thanks

On Thursday, January 8, 2015 at 11:47:54 PM UTC-5, Massimo Di Pierro wrote:

 Please upgrade. This should have worked with that version but this is so 
 old. Hard to day what the problem is.

 On Wednesday, 7 January 2015 13:42:52 UTC-6, Ian W. Scott wrote:

 2.8.2-stable+timestamp.2013.11.28.13.54.07
 (Running on Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.8)

 On Wednesday, January 7, 2015 2:22:57 PM UTC-5, Massimo Di Pierro wrote:

 which web2py version/date?

 On Wednesday, 7 January 2015 12:49:29 UTC-6, Ian W. Scott wrote:

 I need to migrate an existing database field from (the implicit 
 default) 'string' to 'text'. Since all of the existing data will satisfy 
 the new field contstraints (no 'string' will be ruled out as 'text') I 
 just 
 changed the field type in the model field definition. 

 Old:
 Field('response1'),
 New:
 Field('response1', 'text'),

 Everything seemed to go fine until I tried creating a new record with 
 a long string in that field. I got the following error: 

 class 'psycopg2.DataError'(value too long for type character 
 varying(512) ). 

 It looks to me like my postgresql database hasn't actually changed the 
 data type for that column. I thought this would be taken care of by the 
 DAL 
 migration. So how can I change the actual postgre column data type? Or did 
 I do something wrong in the migration?



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: /appadmin/manage/auth GAE access

2015-01-09 Thread Jacinto Parga
Yes!!

It is. The only issue is that the browser can store the google session so I 
have to be carefull width this, because you can logout your google account 
without finishing the appadmin session.

Finally thanks, Massimo.

El viernes, 9 de enero de 2015, 6:05:52 (UTC+1), Massimo Di Pierro escribió:

 Checking the code again. appadmin.py calls check_credentials to decide if 
 you have access. On GAE it does (in gluon/fileutils.py/check_credentials):

 from google.appengine.api import users
 if users.is_current_user_admin():
 return True
 elif gae_login:
 login_html = 'a href=%sSign in with your google 
 account/a.' \
 % users.create_login_url(request.env.path_info)
 raise HTTP(200, 'htmlbody%s/body/html' % login_html)
 else:
 return False

 users is the a GAE API. So if you are not logged in you asks you to sign 
 in. If you are signed and the user is an administrator, it returns True. 
 Now Google manages you access, not web2py. This is Google App engine works. 

 Appadmin has noting to do with the session of your application. It relies 
 exclusively on check_credentials with relies on Google login. 

 You as administrator have to know this and have to logout from Google in 
 order to disable access to appadmin.

 I am not understanding the issue?



 On Wednesday, 7 January 2015 17:10:48 UTC-6, Jacinto Parga wrote:

 First of all thanks so much for your attention Massimo.

 So I have done a complete example of what I mean.

 I have deployed an application in GAE: http://web2gae.appspot.com

 It has a user with administration privileges called:  
 super...@example.com javascript:  width password: superadmin

 I have created a google email that can log in the google appengine 
 console (width view privileges): web2g...@gmail.com javascript:   
 width password: superadmin

 So the thing is, I write in a browser (width no session in gmail or gae 
 initiated): https://web2gae.appspot.com/appadmin

 and I can access to the database appadmin without logging in the 
 application, just accessing width the google acount web2g...@gmail.com 
 javascript: 

 The thing is that the session may remain in the browser even if I log out 
 the google account. It depends on the browser settings. Widthout control of 
 the apps permissions.

 And I can't find the app /admin to logout once I am in google app engine 
 application.

 I hope the example is good...

 El miércoles, 7 de enero de 2015 20:20:25 UTC+1, Massimo Di Pierro 
 escribió:

  you try go to the admin app /admin and press the [logout] button?

 On Wednesday, 7 January 2015 11:34:19 UTC-6, Jacinto Parga wrote:

 Well, but I log out the application. Then I clean the browser history 
 and just put in the browser
 * https://myapp.appspot.com/appadmin 
 https://myapp.appspot.com/appadminI am required to sign with google 
 account.*

 I do so, and I can access the appadmin complete fucntionality, but I 
 had not logged in the application at all, neither  as an user with admin 
 privileges nor a simple user. And there is no way to log out as I have not 
 logged in the application. If I log out my google account I can continue 
 using the appadmin interface. Even if I log in with another different 
 google account and access several minutes later to the appadmin.

 If I use the https://myapp.appspot.com/appadmin/manage/auth then 
 everything works fine because I have to log in as an user with admin 
 privileges.

 It is very useful for me to be able to access to appadmin in the 
 application deployed in google app engine, but how can I force it to log 
 in 
 as an user with admin privileges?

 El miércoles, 7 de enero de 2015 15:47:20 UTC+1, Massimo Di Pierro 
 escribió:

 I partially agree. Problem is you signed out of google but you did not 
 sign out of admin. appadmin authorizes you if you are logged into admin. 
 The fact you logout from google does not automatically sign you out from 
 admin.

 Can you reproduce the problem if you sign our from admin?

 On Wednesday, 7 January 2015 06:08:13 UTC-6, Jacinto Parga wrote:

 Hi

 I have deployed my aplication in GAE and /appadmin/manage/auth works 
 fine, asking a login to access.

 But, if I try to go to: https://myapp.appspot.com/appadmin

 Then the browser asks me: Sign in with your google account 
 https://www.google.com/accounts/ServiceLogin?service=ahpassive=truecontinue=https://appengine.google.com/_ah/conflogin%3Fcontinue%3Dhttps://clubatletismosada.appspot.com/appadminltmpl=gmshdf=Ch8LEgZhaG5hbWUaE0NsdWIgQXRsZXRpc21vIFNhZGEMEgJhaCIU4rpxyPjOtFDC1cxqbSHxn4qazIsoATIUrdvnPgTHKBlIIF_ylVxiINsy4sI
 .

 Ok, I sing wiht my google account (the owner of the application) and 
 I can access to the whole database appadmin without loggin in as 
 'administrator' like in /appadmin/manage/auth

 So If the browser keeps the session anyone can access to my app 
 database from this browser. I have to remove the cookie of the session.

 I 

[web2py] Re: spelling errors on documentation page

2015-01-09 Thread Alex Glaros
is PR Pull Request?

I don't know how.  Can you please instruct?   Went to the site but didn't 
know what to type.

thanks

Alex

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Please help us test the 2.9.12 binaries

2015-01-09 Thread Richard Vézina
Should profiler can give us a cue if the server is more or less slow
between web2py version?

I can profile web2py 2.9.5 and the last beta if you want.

Richard

On Fri, Jan 9, 2015 at 12:18 PM, Richard Vézina ml.richard.vez...@gmail.com
 wrote:

 GTK and app too, but I didn't profile or do any investigation...

 Richard

 On Fri, Jan 9, 2015 at 12:08 AM, Massimo Di Pierro 
 massimo.dipie...@gmail.com wrote:

 I am finding the GTK widget very slow. Is the server also slow?


 On Wednesday, 7 January 2015 14:10:26 UTC-6, Richard wrote:

 Most part of app seems to work... Is there some stuff I should check
 more then other, thing that you made change that you want to make sure it
 is not breaking backward compatibility?

 Richard

 On Wed, Jan 7, 2015 at 3:08 PM, Richard Vézina 
 ml.richard.vez...@gmail.com wrote:

 Source work now with Ubunt 12.04, very slow though...

 Richard

 On Wed, Jan 7, 2015 at 12:01 PM, Kiran Subbaraman 
 subbaraman.ki...@gmail.com wrote:

  WIN works - it comes up, and can navigate through the bundled
 welcome / examples / admin apps. Haven't tested a working DB based
 application on it, though.

 
 Kiran Subbaramanhttp://subbaraman.wordpress.com/about/

 On Wed, 07-01-2015 10:19 PM, Massimo Di Pierro wrote:

 Can you try once more please? I do not have a windows machine handy.

 On Wednesday, 7 January 2015 00:03:09 UTC-6, Kiran Subbaraman wrote:

  SRC seems to work ok now. I haven't deployed a working application
 on it to test it.
 WIN starts, but shows an error:

 Traceback (most recent call last):
   File gluon/restricted.py, line 224, in restricted
   File 
 C:/Users/subbaraman/Downloads/web2py_win/web2py/applications/welcome/models/db.py
  http://127.0.0.1:8000/admin/default/edit/welcome/models/db.py, line 
 14, in module
 db = 
 DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
   File gluon/dal/base.py, line 443, in __init__
   File gluon/custom_import.py, line 92, in custom_importer
 ImportError: No module named reserved_sql_keywords


 
 Kiran Subbaramanhttp://subbaraman.wordpress.com/about/

 On Wed, 07-01-2015 10:40 AM, Massimo Di Pierro wrote:

 OK. One more try. The problems with SRC and OSX versions are fixed.
 How about the WIN version?

  The GTK widget of the OSX version seems very slow on my Mac. I
 cannot figure out if it is a local problem or a more general one.

 On Tuesday, 6 January 2015 11:37:59 UTC-6, Massimo Di Pierro wrote:

 The 2.9.12 source is in

  http://web2py.com/examples/static/nightly/web2py_src.zip

  The 2.9.12 binaries are in

  http://web2py.com/examples/static/nightly/web2py_win.zip
 http://web2py.com/examples/static/nightly/web2py_osx.zip

  Please help us test them so we can released 2.9.12.

  2.9.12 includes mostly bug fixes but there is some major DAL
 refactoring so we are concerned about backward compatibility. We think 
 it
 works but please let us know asap if this breaks your code.

  Massimo

--
 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
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


   --
 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
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 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
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



  --
 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 Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
Resources:
- http://web2py.com
- 

[web2py] Re: Please help us test the 2.9.12 binaries

2015-01-09 Thread Leonel Câmara
I'm testing this on a pretty beefy laptop but I didn't notice any slowdown.

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: FORM or SQLFORM

2015-01-09 Thread Steve
Massimo,

Thanks, i am still getting to know web2py. and i am going through the 
documentation
I guess i will go for the second option :-)

Steve
 

Op vrijdag 9 januari 2015 05:46:59 UTC+1 schreef Massimo Di Pierro:

 You have to options. You can use custom widgets to represent for example 
 options in integer fields as buttons or images. The problem is that I do 
 not know where the names of those options (or images) came from.. are they 
 constants? Are they from a lookup table?

 It may be easier to make the fields hidden and create an interface 
 manually in HTML and jQuery.

 Massimo

 On Tuesday, 6 January 2015 17:09:53 UTC-6, Steve wrote:

 Goodevening,

 Just started with web2py, looked at some of the web2py videos from 
 Massimo ( which i find very good).
 Still , i need some pointers to start with a specific page / form and 
 hope that someone can help me with this.

 Not sure if i should use FORM or SQLFORM and also if i should put al the 
 information in one table or one or more reference tables ( what is good 
 practice).

 Example of the form i would like to build:


 1) Button A, Button B, Button C and a field where someone can fill in a 
 INT ( user selects a value trough one of the buttons or fills in the free 
 field

 -- Show the selection the user made

 2) Select a Image from different images

 -- Show the selected Image --

 3) Select the delivery : Email, SMS or Print
 - When the selection at nr. 3 is Email or SMS the user has to fill in 
 : Name receiver + Email  receiver/ SMS receiver ( with print nothing has to 
 be filled in )
 - When the selection at nr. 3 is Email or SMS the user has to fill in 
 a date and time field for when the image has to be send.

 4) The Email + name of the user has to be filled in

 At the end a button.( kind of checkout button, after a check on a 
 different page , gets amapproval and after the approval stores the data 
 into the database.
 That is the idea, hope that someone can point me in the right direction.

 Steve



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Please help us test the 2.9.12 binaries

2015-01-09 Thread Dmitry Ermolaev
Field(..) work
db.Field(..) not work

пятница, 9 января 2015 г., 23:54:58 UTC+3 пользователь Dmitry Ermolaev 
написал:

 I use _src.zip 

 type 'exceptions.AttributeError' 'DAL' object has no attribute 'Field'
 Versionweb2py™Version 2.9.12-beta+timestamp.2015.01.07.16.40.02PythonPython 
 2.7.8: C:\Python27\python.exe (prefix: C:\Python27)Traceback

 1.
 2.
 3.
 4.
 5.
 6.
 7.
 8.
 9.

 Traceback (most recent call last):
   File C:\web2py-9-12\gluon\restricted.py, line 224, in restricted
 exec ccode in environment
   File C:/web2py-9-12/applications/bs3b/models/db.py 
 http://127.0.0.1:8000/admin/default/edit/bs3b/models/db.py, line 11, in 
 module
 db.Field('is_enabled', 'boolean', required=False, default=True),
   File C:\web2py-9-12\gluon\dal\base.py, line 893, in __getattr__
 return ogetattr(self, key)
 AttributeError: 'DAL' object has no attribute 'Field'



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Problem using grid after crud

2015-01-09 Thread Konstantin Fadeev
I make it:

db.py:
# -*- coding: utf-8 -*-
db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])

from gluon.tools import Auth, Service, PluginManager, Crud

auth = Auth(db)
service = Service()
plugins = PluginManager()
crud = Crud(db)

db.define_table('t_test',
   Field('f_test','string'),
   Field('f_test_1','string'))
default.py:
def index():
return locals()

def test_bug():
test_id = request.args(0)
test_crud = crud.read(db.t_test, test_id)
test_grid = SQLFORM.grid(db.t_test, user_signature=False)
return locals()

default/index.html:
{{=A('test', _href=URL(test_bug, args=1))}}

default/test_bug.html:
{{=BEAUTIFY(response._vars)}}

After click on link 'test' (index.html page) turn to test_bug.html.
On test_bug.html after click buttons + Add Records or View or Edit in 
grid, open URL /test_bug/default/test_bug/[ACTION]/t_test and message - 
404 NOT FOUND.

It is bug? Or I made wrong?

Sorry my bad English.

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Please help us test the 2.9.12 binaries

2015-01-09 Thread Massimo Di Pierro
sqlite? Do you know this worked before?


On Friday, 9 January 2015 15:19:00 UTC-6, Dmitry Ermolaev wrote:

 try define Field as
Field('balance', 'decimal(16,8)', default = Decimal('0.0')),

 then try insert default value - 0+e00
 it rise error!


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Please help us test the 2.9.12 binaries

2015-01-09 Thread Dmitry Ermolaev
I use _src.zip 

 type 'exceptions.AttributeError' 'DAL' object has no attribute 'Field'
 Versionweb2py™Version 2.9.12-beta+timestamp.2015.01.07.16.40.02PythonPython 
 2.7.8: C:\Python27\python.exe (prefix: C:\Python27)Traceback

 1.
 2.
 3.
 4.
 5.
 6.
 7.
 8.
 9.

 Traceback (most recent call last):
   File C:\web2py-9-12\gluon\restricted.py, line 224, in restricted
 exec ccode in environment
   File C:/web2py-9-12/applications/bs3b/models/db.py 
 http://127.0.0.1:8000/admin/default/edit/bs3b/models/db.py, line 11, in 
 module
 db.Field('is_enabled', 'boolean', required=False, default=True),
   File C:\web2py-9-12\gluon\dal\base.py, line 893, in __getattr__
 return ogetattr(self, key)
 AttributeError: 'DAL' object has no attribute 'Field'



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: spelling errors on documentation page

2015-01-09 Thread Paolo Valleri
In order to don't forget the spelling error you found, you can open an 
issue on https://github.com/mdipierro/web2py-book
In addition, if you want to provide a contribution by creating a Pull 
Request see https://help.github.com/articles/creating-a-pull-request/ 
and http://web2py.com/books/default/chapter/29/15/helping-web2py

Paolo

On Friday, January 9, 2015 at 5:55:56 PM UTC+1, Alex Glaros wrote:

 is PR Pull Request?

 I don't know how.  Can you please instruct?   Went to the site but didn't 
 know what to type.

 thanks

 Alex


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Please help us test the 2.9.12 binaries

2015-01-09 Thread Dmitry Ermolaev
try define Field as
   Field('balance', 'decimal(16,8)', default = Decimal('0.0')),

then try insert default value - 0+e00
it rise error!

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: In search of CAS 2 provider and consumer example

2015-01-09 Thread Gökhan Şahin
Hi
First off all I tried hard to find a solution via search without success, 
then decided to write down. Sorry for reviving a - possibly dead - thread.

I am a beginner web2py user. I am trying to setup an auth system which is 
Role Based and controlled centrally via CAS.
I will have multiple apps, one of them being dedicated to be CAS provider, 
which handles user access control across roles versus apps.

For achieving this kind of functionality first i try to learn basic 
concepts of CAS.

For a start exercise I followed the below steps:
1. Copied welcome app to welcas
2. welcas  models  db.py: changed the line as below
auth.define_tables(username=True, signature=False)

3. Copied welcome app to welcons
4. welcons  models  db.py  changed the lines as below
auth = Auth(db,cas_provider = 
'http:127.0.0.1:8000/welcas/default/user/cas')
auth.define_tables(username=True, signature=False)

5. Created a user on welcas app
6. Go to welcons/default/index and clicked on login button
7. I expected to get the welcas login screen, instead i get an HTTP 404 
error.

web2py version 2.9.11-stable rocket server running on WIN7 64bit

Any idea?


On Thursday, February 21, 2013 at 9:37:05 PM UTC+2, Massimo Di Pierro wrote:

 Not sure what example to write.

 Make two copies of the welcome app. Call one app1 and one app2. Create and 
 account and login in app1.

 Edit app2/models/db.py and replace 

 auth = Auth(db)

 with 

 auth = Auth(db,cas_provider = 'http://127.0.0.1:8000/app1/default/user/cas')

 Now try login in app2. and you will get redirected to app1.


 

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Problem migrating field type from 'string' to 'text' (postgresql)

2015-01-09 Thread Paolo Valleri
Hi,
I've checked and web2py trunk works as expected (both directions namely 
string to text and viceversa)
@scott, have you enabled migration? ( DAL(db_uri, migrate=True))

Paolo

On Friday, January 9, 2015 at 7:38:08 PM UTC+1, Ian W. Scott wrote:

 OK, I'm upgrading. Ran into a snag with my passwords file and finding the 
 right port number, but when it's upgraded I'll see whether it does the 
 migration correctly.

 Thanks

 On Thursday, January 8, 2015 at 11:47:54 PM UTC-5, Massimo Di Pierro wrote:

 Please upgrade. This should have worked with that version but this is so 
 old. Hard to day what the problem is.

 On Wednesday, 7 January 2015 13:42:52 UTC-6, Ian W. Scott wrote:

 2.8.2-stable+timestamp.2013.11.28.13.54.07
 (Running on Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.8)

 On Wednesday, January 7, 2015 2:22:57 PM UTC-5, Massimo Di Pierro wrote:

 which web2py version/date?

 On Wednesday, 7 January 2015 12:49:29 UTC-6, Ian W. Scott wrote:

 I need to migrate an existing database field from (the implicit 
 default) 'string' to 'text'. Since all of the existing data will satisfy 
 the new field contstraints (no 'string' will be ruled out as 'text') I 
 just 
 changed the field type in the model field definition. 

 Old:
 Field('response1'),
 New:
 Field('response1', 'text'),

 Everything seemed to go fine until I tried creating a new record with 
 a long string in that field. I got the following error: 

 class 'psycopg2.DataError'(value too long for type character 
 varying(512) ). 

 It looks to me like my postgresql database hasn't actually changed the 
 data type for that column. I thought this would be taken care of by the 
 DAL 
 migration. So how can I change the actual postgre column data type? Or 
 did 
 I do something wrong in the migration?



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Please help us test the 2.9.12 binaries

2015-01-09 Thread Dave S
 
On Thursday, January 8, 2015 at 12:18:35 PM UTC-8, Niphlod wrote:

 all working fine in Windows . 


For me, also, but my test case is still a toy app:  local access only, 
sqlite database, a few hundred entries.  But Mozart still shows a birthday 
on January 27th.
Running on a W7 laptop.

/dps


 

 On Wednesday, January 7, 2015 at 9:10:26 PM UTC+1, Richard wrote:

 Most part of app seems to work... Is there some stuff I should check more 
 then other, thing that you made change that you want to make sure it is not 
 breaking backward compatibility?

 Richard

 On Wed, Jan 7, 2015 at 3:08 PM, Richard Vézina ml.richa...@gmail.com 
 wrote:

 Source work now with Ubunt 12.04, very slow though...

 Richard

 On Wed, Jan 7, 2015 at 12:01 PM, Kiran Subbaraman subbaram...@gmail.com
  wrote:

  WIN works - it comes up, and can navigate through the bundled welcome 
 / examples / admin apps. Haven't tested a working DB based application on 
 it, though.

 
 Kiran Subbaramanhttp://subbaraman.wordpress.com/about/

 On Wed, 07-01-2015 10:19 PM, Massimo Di Pierro wrote:
  
 Can you try once more please? I do not have a windows machine handy.

 On Wednesday, 7 January 2015 00:03:09 UTC-6, Kiran Subbaraman wrote: 

  SRC seems to work ok now. I haven't deployed a working application 
 on it to test it.
 WIN starts, but shows an error:

 Traceback (most recent call last):
   File gluon/restricted.py, line 224, in restricted
   File 
 C:/Users/subbaraman/Downloads/web2py_win/web2py/applications/welcome/models/db.py
  http://127.0.0.1:8000/admin/default/edit/welcome/models/db.py, line 
 14, in module
 db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
   File gluon/dal/base.py, line 443, in __init__
   File gluon/custom_import.py, line 92, in custom_importer
 ImportError: No module named reserved_sql_keywords


 
 Kiran Subbaramanhttp://subbaraman.wordpress.com/about/

 On Wed, 07-01-2015 10:40 AM, Massimo Di Pierro wrote:
  
 OK. One more try. The problems with SRC and OSX versions are fixed. 
 How about the WIN version? 

  The GTK widget of the OSX version seems very slow on my Mac. I 
 cannot figure out if it is a local problem or a more general one.

 On Tuesday, 6 January 2015 11:37:59 UTC-6, Massimo Di Pierro wrote: 

 The 2.9.12 source is in 

  http://web2py.com/examples/static/nightly/web2py_src.zip
  
  The 2.9.12 binaries are in 
  
  http://web2py.com/examples/static/nightly/web2py_win.zip
 http://web2py.com/examples/static/nightly/web2py_osx.zip
  
  Please help us test them so we can released 2.9.12.

  2.9.12 includes mostly bug fixes but there is some major DAL 
 refactoring so we are concerned about backward compatibility. We think 
 it 
 works but please let us know asap if this breaks your code.

  Massimo
  
-- 
 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 
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


   -- 
 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 
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  -- 
 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 
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.





-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is the .select(cache.x) cleared automatically upon expiration?

2015-01-09 Thread Anthony
To clear a single item, you can use cache.ram(key, None), and to clear 
multiple items, you can use cache.ram.clear(regex='[some regex]'). To clear 
the entire cache, cache.ram.clear(None).

Anthony 

On Friday, January 9, 2015 at 2:47:39 AM UTC-5, Robin Manoli wrote:

 Ok, thank you Derek.

 Is there any way to remove old cache from mem and disk then, that is no 
 longer in use?

 Den tisdag 6 januari 2015 kl. 19:42:58 UTC+1 skrev Derek:

 No, there's nothing going on in the background unless something is 
 processing. It will check as soon as a new request comes in that references 
 the cache, it will review the expiration date of the cached item before 
 using it.

 On Monday, January 5, 2015 6:27:29 PM UTC-7, Robin Manoli wrote:

 Hi!

 When caching selects, in memory or disk, are they then cleared 
 automatically when the expiration time is over? Removed and forgotten?
 Or is there some cleanup script similar to the one for sessions?

 - Robin



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.