[web2py] Re: deployment error

2014-04-15 Thread Richard
The issue was an admin app from an older version.
 
The site on Justhost.com is running again. I am using the cgihandler.py.
 
BUT: imported apps do not run and give the error [an error occurred while 
processing this directive]
I tried both : installing the w2p file and copying the application as a zip 
and extract in the application directory. 
 
Creating a new app from scratch thru the admin interface gives an app that 
works.
 
I have also put permisions to 777, so permissions is also excluded as 
possible cause.
 
Any clu? 
thanks 
Richard
 

On Sunday, April 13, 2014 10:12:46 PM UTC+2, Richard wrote:

 Gooed evening,

 When I call an app on my domain the index view is returned.
 But having an SSL connection In Chrome I do get the following error (In 
 IE 11 I do not get an error)

 Any clus what may cause this? I run from the latest source version of 
 web2py.

 Thank you in advance

 TICKET ID

 213.10.60.120.2014-04-13.14-08-36.a2f01714-7fb0-4aa9-8519-636ee745fb03
 type 'exceptions.TypeError' not enough arguments for format string
 VERSIONweb2py™stablePythonPython 2.6.6: /usr/bin/python (prefix: /usr)
 TRACEBACK

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

 Traceback (most recent call last):
   File /home4/mamplcom/public_html/cgi-bin/gluon/restricted.py, line 217, 
 in restricted
 exec ccode in environment
   File 
 /home4/mamplcom/public_html/cgi-bin/applications/admin/views/default/site.html,
  line 123, in module
 input id=appurl name=appurl type=text id=upload_url/
 TypeError: not enough arguments for format string

 ERROR SNAPSHOT 


-- 
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: deployment error

2014-04-15 Thread LightDot
Hmm, no... for example, on our servers, setting file permissions of a CGI 
script to 777 will prevent it from working as a security measure. So, file 
ownership or permissions are still first things that come to mind.

Create a new app from scratch (as you say, this works) and upload/extract a 
zip or a w2p of the same welcome app, then compare the file and directory 
ownership / permissions. By compare, I mean compare *exactly*, file for 
file, dir for dir...

Regards

On Tuesday, April 15, 2014 11:01:08 AM UTC+2, Richard wrote:

 The issue was an admin app from an older version.
  
 The site on Justhost.com is running again. I am using the cgihandler.py.
  
 BUT: imported apps do not run and give the error [an error occurred while 
 processing this directive]
 I tried both : installing the w2p file and copying the application as a 
 zip and extract in the application directory. 
  
 Creating a new app from scratch thru the admin interface gives an app that 
 works.
  
 I have also put permisions to 777, so permissions is also excluded as 
 possible cause.
  
 Any clu? 
 thanks 
 Richard
  

 On Sunday, April 13, 2014 10:12:46 PM UTC+2, Richard wrote:

 Gooed evening,

 When I call an app on my domain the index view is returned.
 But having an SSL connection In Chrome I do get the following error (In 
 IE 11 I do not get an error)

 Any clus what may cause this? I run from the latest source version of 
 web2py.

 Thank you in advance

 TICKET ID

 213.10.60.120.2014-04-13.14-08-36.a2f01714-7fb0-4aa9-8519-636ee745fb03
 type 'exceptions.TypeError' not enough arguments for format string
 VERSIONweb2py™stablePythonPython 2.6.6: /usr/bin/python (prefix: /usr)
 TRACEBACK

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

 Traceback (most recent call last):
   File /home4/mamplcom/public_html/cgi-bin/gluon/restricted.py, line 217, 
 in restricted
 exec ccode in environment
   File 
 /home4/mamplcom/public_html/cgi-bin/applications/admin/views/default/site.html,
  line 123, in module
 input id=appurl name=appurl type=text id=upload_url/
 TypeError: not enough arguments for format string

 ERROR SNAPSHOT 



-- 
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] use executesql results in grid

2014-04-15 Thread Niphlod
yep but valid only for read-only grid. You need a unique integer value to 
use the grid for editing purposes



 What I do is to either create a database view or a table containing the 
 result and then in the controller define a model with 'migrate = False'  to 
 read the view/table and then use the grid on that view/table.  In order for 
 web2py to use that view/table easily I put something like 'id = 1'  in the 
 select and then make the id field 'readable=False'  in the controller.

 Regards
 Johann
 -- 
 Because experiencing your loyal love is better than life itself, 
 my lips will praise you.  (Psalm 63:3)
  

-- 
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: Brazilian web2py users, what system do you use to receive credit card payments?

2014-04-15 Thread Carlos Costa
Pagseguro, for sure is the most used here in Brazil.
It belongs to UOL, it has a lot of advertising on TV.
Its the best know and trusted.

Another options are:
-mercado pago
-bcash
-moip
-braspag
-f2b
-paypal Brasil

I tried to sort them in an order of popularity.


2014-04-11 23:54 GMT-03:00 samuel bonill pythonn...@gmail.com:

 i use stripe.com

 El viernes, 11 de abril de 2014 09:39:15 UTC-5, Leonel Câmara escribió:

 I have a Brazilian costumer and I will need to implement this soon so I'm
 now evaluating the available options. Any suggestions?

 Until now I have found this project by Bruno Rocha:
 https://github.com/rochacbruno/python-pagseguro

  --
 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.




-- 
Att.

Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן

-- 
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: deployment error

2014-04-15 Thread Richard
It has to do with the controller or starting the view. Because when I 
delete default/index.html the error is still there, when I delete 
contrller/default.py then the app comes witht the error that no controller 
exists. When I make a python error in the cotroller the app reports a 
tickets, that ok in this case ;)
 
I'm comming colse to the cause but not completely. permissions are default 
ok (755 for a dir and 644 for a file)

On Tuesday, April 15, 2014 11:47:23 AM UTC+2, LightDot wrote:

 Hmm, no... for example, on our servers, setting file permissions of a CGI 
 script to 777 will prevent it from working as a security measure. So, file 
 ownership or permissions are still first things that come to mind.

 Create a new app from scratch (as you say, this works) and upload/extract 
 a zip or a w2p of the same welcome app, then compare the file and directory 
 ownership / permissions. By compare, I mean compare *exactly*, file for 
 file, dir for dir...

 Regards

 On Tuesday, April 15, 2014 11:01:08 AM UTC+2, Richard wrote:

 The issue was an admin app from an older version.
  
 The site on Justhost.com is running again. I am using the cgihandler.py.
  
 BUT: imported apps do not run and give the error [an error occurred 
 while processing this directive]
 I tried both : installing the w2p file and copying the application as a 
 zip and extract in the application directory. 
  
 Creating a new app from scratch thru the admin interface gives an app 
 that works.
  
 I have also put permisions to 777, so permissions is also excluded as 
 possible cause.
  
 Any clu? 
 thanks 
 Richard
  

 On Sunday, April 13, 2014 10:12:46 PM UTC+2, Richard wrote:

 Gooed evening,

 When I call an app on my domain the index view is returned.
 But having an SSL connection In Chrome I do get the following error (In 
 IE 11 I do not get an error)

 Any clus what may cause this? I run from the latest source version of 
 web2py.

 Thank you in advance

 TICKET ID

 213.10.60.120.2014-04-13.14-08-36.a2f01714-7fb0-4aa9-8519-636ee745fb03
 type 'exceptions.TypeError' not enough arguments for format string
 VERSIONweb2py™stablePythonPython 2.6.6: /usr/bin/python (prefix: /usr)
 TRACEBACK

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

 Traceback (most recent call last):
   File /home4/mamplcom/public_html/cgi-bin/gluon/restricted.py, line 217, 
 in restricted
 exec ccode in environment
   File 
 /home4/mamplcom/public_html/cgi-bin/applications/admin/views/default/site.html,
  line 123, in module
 input id=appurl name=appurl type=text id=upload_url/
 TypeError: not enough arguments for format string

 ERROR SNAPSHOT 



-- 
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: Online Manual: Chapter 9: Access Control - Formatting/content issues?

2014-04-15 Thread Tim Richardson


On Monday, 14 April 2014 22:05:44 UTC+10, Seeker wrote:

 Hi Tim,

 Any idea how long it will take for caches to clear?  The problem still 
 persists :-|


 It's ok now. 

-- 
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: deployment error

2014-04-15 Thread Richard
SOLVED :)
 
The print statements in the controller appear to be deadly and causing the 
error [an error occurred while processing this directive].
 
Thanks for the support !
 
 

On Tuesday, April 15, 2014 1:56:09 PM UTC+2, Richard wrote:

 It has to do with the controller or starting the view. Because when I 
 delete default/index.html the error is still there, when I delete 
 contrller/default.py then the app comes witht the error that no controller 
 exists. When I make a python error in the cotroller the app reports a 
 tickets, that ok in this case ;)
  
 I'm comming colse to the cause but not completely. permissions are default 
 ok (755 for a dir and 644 for a file)

 On Tuesday, April 15, 2014 11:47:23 AM UTC+2, LightDot wrote:

 Hmm, no... for example, on our servers, setting file permissions of a CGI 
 script to 777 will prevent it from working as a security measure. So, file 
 ownership or permissions are still first things that come to mind.

 Create a new app from scratch (as you say, this works) and upload/extract 
 a zip or a w2p of the same welcome app, then compare the file and directory 
 ownership / permissions. By compare, I mean compare *exactly*, file for 
 file, dir for dir...

 Regards

 On Tuesday, April 15, 2014 11:01:08 AM UTC+2, Richard wrote:

 The issue was an admin app from an older version.
  
 The site on Justhost.com is running again. I am using the cgihandler.py.
  
 BUT: imported apps do not run and give the error [an error occurred 
 while processing this directive]
 I tried both : installing the w2p file and copying the application as a 
 zip and extract in the application directory. 
  
 Creating a new app from scratch thru the admin interface gives an app 
 that works.
  
 I have also put permisions to 777, so permissions is also excluded as 
 possible cause.
  
 Any clu? 
 thanks 
 Richard
  

 On Sunday, April 13, 2014 10:12:46 PM UTC+2, Richard wrote:

 Gooed evening,

 When I call an app on my domain the index view is returned.
 But having an SSL connection In Chrome I do get the following error (In 
 IE 11 I do not get an error)

 Any clus what may cause this? I run from the latest source version of 
 web2py.

 Thank you in advance

 TICKET ID

 213.10.60.120.2014-04-13.14-08-36.a2f01714-7fb0-4aa9-8519-636ee745fb03
 type 'exceptions.TypeError' not enough arguments for format string
 VERSIONweb2py™stablePythonPython 2.6.6: /usr/bin/python (prefix: /usr)
 TRACEBACK

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

 Traceback (most recent call last):
   File /home4/mamplcom/public_html/cgi-bin/gluon/restricted.py, line 
 217, in restricted
 exec ccode in environment
   File 
 /home4/mamplcom/public_html/cgi-bin/applications/admin/views/default/site.html,
  line 123, in module
 input id=appurl name=appurl type=text id=upload_url/
 TypeError: not enough arguments for format string

 ERROR SNAPSHOT 



-- 
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: Change the download text from file to something else?

2014-04-15 Thread António Ramos
I tried the translation string but it doesn´t change the text in the web
page.
[image: Imagem inline 1]
Regards
António


2014-04-11 20:48 GMT+01:00 Niphlod niph...@gmail.com:

 make your own widget or act on the default translation of the string

 'file ## download'

 hint: anything after ## is to be treated as a comment.


 On Friday, April 11, 2014 12:37:37 PM UTC+2, Ramos wrote:

 no hints?


 2014-04-10 15:25 GMT+01:00 António Ramos ramst...@gmail.com:

 hello i want to change the text that appears on downloadable file links

 I see file but that is nothing informative especially when users dont
 speak english

 I want to default it to something else

 where do i change that behaviour?

 regards

 António


  --
 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.
inline: image.png

[web2py] Issue 1865 code sample as requested

2014-04-15 Thread Remco Boerma
Hi,

I've finally had the time to play a little with the code sample that was
requested on issue 1865. It's in the comment there.

https://code.google.com/p/web2py/issues/detail?id=1865

-- 
Cheers / Met vr. gr.
Remco Boerma

-- 
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: Change the download text from file to something else?

2014-04-15 Thread Niphlod
you need to translate the entire *file ## download *. my everthing after 
## is to be treated as comment means that if you put something after ## in 
the translation, it won't pop up.

On Tuesday, April 15, 2014 2:45:56 PM UTC+2, Ramos wrote:

 I tried the translation string but it doesn´t change the text in the web 
 page.
 [image: Imagem inline 1]
 Regards
 António


 2014-04-11 20:48 GMT+01:00 Niphlod nip...@gmail.com javascript::

 make your own widget or act on the default translation of the string

 'file ## download'

 hint: anything after ## is to be treated as a comment.


 On Friday, April 11, 2014 12:37:37 PM UTC+2, Ramos wrote:

 no hints?


 2014-04-10 15:25 GMT+01:00 António Ramos ramst...@gmail.com:

 hello i want to change the text that appears on downloadable file links

 I see file but that is nothing informative especially when users dont 
 speak english 

 I want to default it to something else

 where do i change that behaviour?

 regards

 António


  -- 
 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 javascript:.
 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.


Re: [web2py] possible issue (read bug) with web2py controllers parser

2014-04-15 Thread Richard Vézina
Done!

https://code.google.com/p/web2py/issues/detail?id=1923

Thanks

Richard


On Tue, Apr 15, 2014 at 12:40 AM, Massimo Di Pierro 
massimo.dipie...@gmail.com wrote:

 Please open a ticket about this. I see the problem.


 On Monday, 14 April 2014 14:45:07 UTC-5, Richard wrote:

 Hello,

 I had pretty weird issue with commented block of code. I was in the
 process to migrate to 2.9.5 and I had code in controllers file that were
 not executing at all. I have been searching for wild and finally discover
 that I had leave an opening triple double quote in dash commented block of
 code... Something like this :

 # Controllers
 # Begin
 def this_func_execute():
 return dict(a='Works!')

 # Commented block
 # Code with the triple double quotes 


 def this_func_not_execute():
 This docstring is required for the issue to kickin!!
 return dict(a=I don't execute)
 # End

 Just copy the code above and than try to access the
 this_func_not_execute: not working. Try removing the docstring or the
 triple double quotes and it works ok.

 Both are required for the issue to happen. If only the commented triple
 double quote is there and no docstring in the following functions the issue
 is not happening.

 Thanks

 Richard



  --
 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.


Re: [web2py] Re: Change the download text from file to something else?

2014-04-15 Thread António Ramos
2014-04-15 14:24 GMT+01:00 Niphlod niph...@gmail.com:

 'file ## download'


You lost me
where do i find the string 'file ## download'
?

-- 
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] Problem with rname?

2014-04-15 Thread Richard Vézina
Hello Johann,

Do you get any advice?

I am in the process to test the rname feature and I don't find much
information, it's seems highly experimental and undocumented...


Except maybe this :

https://groups.google.com/d/msg/web2py/_q5qcARON4E/6JLCHM3eQHAJ


Richard

On Tue, Apr 1, 2014 at 4:41 AM, Johann Spies johann.sp...@gmail.com wrote:

 Database: Postgresql

 I get this regularly when I modify a table's definition (tables using
 rname):

 ProgrammingError: relation org_unit does not exist

 I either set 'migrate = False'  or drop the table, delete the entry in
 databases and do it over - that is when the table is empty.

 I suspect it is a problem with rname.

 Here is an example definition (btw the fields with 'text' will be changed
 to 'citext' in Postgresql)


 db.define_table('org_unit',
 Field('name', 'text'),
 Field('city', 'text'),
 Field('post_code', length=14),
 Field('street', 'text'),
 Field('country', 'text'),
 Field('countrycode', length = 2),
 rname = 'level1.org_unit',
 migrate = True,
 fake_migrate = False)

 Regards
 Johann
 --
 Because experiencing your loyal love is better than life itself,
 my lips will praise you.  (Psalm 63:3)

 --
 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.


Re: [web2py] Problem with rname?

2014-04-15 Thread Richard Vézina
I am not sure what rname does...

Does it do, what it means, so it should contains the real name of the
backend table name for instance or the reverse...

I make a test with one of my model, adding rname to the model for the table
name and one of the table field and try to make a query and look at it
(._select()) and get the rname that I defined as a table name and field.

Richard


On Tue, Apr 15, 2014 at 10:42 AM, Richard Vézina 
ml.richard.vez...@gmail.com wrote:

 Hello Johann,

 Do you get any advice?

 I am in the process to test the rname feature and I don't find much
 information, it's seems highly experimental and undocumented...


 Except maybe this :

 https://groups.google.com/d/msg/web2py/_q5qcARON4E/6JLCHM3eQHAJ


 Richard


 On Tue, Apr 1, 2014 at 4:41 AM, Johann Spies johann.sp...@gmail.comwrote:

 Database: Postgresql

 I get this regularly when I modify a table's definition (tables using
 rname):

 ProgrammingError: relation org_unit does not exist

 I either set 'migrate = False'  or drop the table, delete the entry in
 databases and do it over - that is when the table is empty.

 I suspect it is a problem with rname.

 Here is an example definition (btw the fields with 'text' will be changed
 to 'citext' in Postgresql)


 db.define_table('org_unit',
 Field('name', 'text'),
 Field('city', 'text'),
 Field('post_code', length=14),
 Field('street', 'text'),
 Field('country', 'text'),
 Field('countrycode', length = 2),
 rname = 'level1.org_unit',
 migrate = True,
 fake_migrate = False)

 Regards
 Johann
 --
 Because experiencing your loyal love is better than life itself,
 my lips will praise you.  (Psalm 63:3)

 --
 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.


Re: [web2py] Problem with rname?

2014-04-15 Thread Richard Vézina
This is exactly what happen...

Let say I have a table like this one in Postgres :

# Postgres

CREATE TABLE address
(
  id serial NOT NULL,
  door_number character varying,
  street character varying,
  city_id integer,
  CONSTRAINT address_pkey PRIMARY KEY (id )
)
WITH (
  OIDS=FALSE
);
ALTER TABLE address
  OWNER TO richard;

# OLD Models
db.define_table('address',
Field('door_number', 'string'),
Field('street', 'string'),
Field('city_id', 'reference city'),
)


# NEW Models with rname
db.define_table('Address',
   Field('Door_Number', 'string', rname='door_number'),
   Field('Street', 'string', rname='street'),
   Field('City', 'reference city', rname='city_id'),
   rname='address'
   )

Then, I can access value like that :

db(db.Address.Door_Number == '1000').select(db.Address.ALL)

DAL, only know the models names, ex.: Door_Number

You can't not use the backend rname to interract with the backend...

Richard






On Tue, Apr 15, 2014 at 10:52 AM, Richard Vézina 
ml.richard.vez...@gmail.com wrote:

 I am not sure what rname does...

 Does it do, what it means, so it should contains the real name of the
 backend table name for instance or the reverse...

 I make a test with one of my model, adding rname to the model for the
 table name and one of the table field and try to make a query and look at
 it (._select()) and get the rname that I defined as a table name and field.

 Richard


 On Tue, Apr 15, 2014 at 10:42 AM, Richard Vézina 
 ml.richard.vez...@gmail.com wrote:

 Hello Johann,

 Do you get any advice?

 I am in the process to test the rname feature and I don't find much
 information, it's seems highly experimental and undocumented...


 Except maybe this :

 https://groups.google.com/d/msg/web2py/_q5qcARON4E/6JLCHM3eQHAJ


 Richard


 On Tue, Apr 1, 2014 at 4:41 AM, Johann Spies johann.sp...@gmail.comwrote:

 Database: Postgresql

 I get this regularly when I modify a table's definition (tables using
 rname):

 ProgrammingError: relation org_unit does not exist

 I either set 'migrate = False'  or drop the table, delete the entry in
 databases and do it over - that is when the table is empty.

 I suspect it is a problem with rname.

 Here is an example definition (btw the fields with 'text' will be
 changed to 'citext' in Postgresql)


 db.define_table('org_unit',
 Field('name', 'text'),
 Field('city', 'text'),
 Field('post_code', length=14),
 Field('street', 'text'),
 Field('country', 'text'),
 Field('countrycode', length = 2),
 rname = 'level1.org_unit',
 migrate = True,
 fake_migrate = False)

 Regards
 Johann
 --
 Because experiencing your loyal love is better than life itself,
 my lips will praise you.  (Psalm 63:3)

 --
 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.


Re: [web2py] autodelete(?) on computed field

2014-04-15 Thread Marin Pranjić
Ok, I'll just code it by myself. I was hoping there is better solution.

Marin


On Mon, Apr 14, 2014 at 11:49 AM, Marin Pranjić marin.pran...@gmail.comwrote:

 db.define_table(...,
   Field('image', 'upload', autodelete=True),
   Field('thumbnail', 'upload', autodelete=True, compute=create_thumbnail),
  ...)

 This is not working because on _before_update/_before_delete callbacks
 thumbnail is not one of the upload_fields.
 I am talking about delete_uploaded_files defined inside gluon/dal.py.

 Is there an easier way or I have to manually do the code?

 Marin

 --
 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] AYUDA como ajustar la resolucion de la pagina de web segun el navegador ?

2014-04-15 Thread Mayra Marticorena
hola buen dia , como andan ? estoy teniendo problemas de resolucion en mi 
pagina de web , http://www.distribuidorahenry.com.ar/welcome/default/index 
, si entro en la pc que he utilize para armar esta misma , se ve claramente 
, sin embargo cuando entro con otra pc se ve mal , saltos de pagina e 
margenes etc . Existe un parche , que automaticamente se ajuste a los 
diferentes resoluciones , de los navegadores ? .
Desde ya , muchas gracias !

mayra

-- 
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] a private auth.wiki()

2014-04-15 Thread Ben Lawrence

Hi
I would really appreciate more information on the in-built wiki. I read 
what there is in the book and would like to know how to implement a private 
wiki with only @auth.requires_login() users allowed. (I tried implementing 
manage_permissions but only got two extra fields in the create page form 
with no drop-down of choices, @auth.requires_login() would make those 
fields redundant). For those in the know, I am sure this is a few lines of 
code, could you please show me?
many thanks.

-- 
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] Nginx/passenger/web2py - 504 Gateway Timeout?

2014-04-15 Thread Krzysztof Socha
Thanks... But I kinda cannot... The hosting I am using is providing nginx + 
phusion passenger... and it works with a simple script, as I have shown. 
Unfortunately, it looks like the web2py handler never returns anything and 
the request time-outs... I do not even know where to look to understand 
what happens... Any suggestions?

Krzysztof.

On Monday, April 14, 2014 3:58:16 PM UTC+2, Richard wrote:

 Use unicorn!!

 Phusion is more work...

 You can have a look in contrib there is a scrip that help deploy redmine 
 beside web2py with unicorn, so you can derive something for you need from 
 it. It works with 12.04.

 Richard




-- 
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] Import of a package

2014-04-15 Thread Beat Kohler
I installed a package (not a single module) with easy_install. The 
installation works fine with Python (2.7). The package can be imported and 
used without any problems.
Inside web2py the import failed: cannot import module.
As a workaround I placed the package folder in the site-packages folder. 
But still no success..
Web2py-Version: 2.8.2
Plattform:windows 7 
Python Version:   2.7

What is wrong in the paradies??
Thanks for any help
Beat

-- 
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: download hidden field in a grid

2014-04-15 Thread Girolamo Giudice
Hi all, i'm a  new user of web2py
My question is simple (maybe)
In my app I display a grid with two hidden fields. 
Is there any method to export the grid including the hidden fields?
Thank you
Girolamo

-- 
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] Nginx/passenger/web2py - 504 Gateway Timeout?

2014-04-15 Thread Richard Vézina
I make it works with Phusion long time ago, and then get convinced after
reading a blog post that this were a bad idea, since at that time phusion
was not following the same rule as other linux in matter of service
managment, so I resign. I remember having read and work hard, since there
were no single one-stop place to make it works... The phusion doc, was the
better place + blog post and tuto.

Sorry I couldn't help more... But I would again suggest you to walkaway of
phusion if you can somehow. My understanding is this project is not enough
or wasn't (1,5 years ago) to work in production. I was required to compile
Nginx to include phusion module because it is not include by default, to me
just that is enough to not consider it prod ready...

Richard


On Tue, Apr 15, 2014 at 3:34 AM, Krzysztof Socha kszy...@gmail.com wrote:

 Thanks... But I kinda cannot... The hosting I am using is providing nginx
 + phusion passenger... and it works with a simple script, as I have shown.
 Unfortunately, it looks like the web2py handler never returns anything and
 the request time-outs... I do not even know where to look to understand
 what happens... Any suggestions?

 Krzysztof.


 On Monday, April 14, 2014 3:58:16 PM UTC+2, Richard wrote:

 Use unicorn!!

 Phusion is more work...

 You can have a look in contrib there is a scrip that help deploy redmine
 beside web2py with unicorn, so you can derive something for you need from
 it. It works with 12.04.

 Richard


  --
 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] Current date/time for datetime field (time is wrong)

2014-04-15 Thread LoveWeb2py
Hello,

I love the calendar that pops up in the 'datetime' field with a time/date 
selector. However, when my customers use it their time is always off. Is 
there a way to prepopulate the field with the current time, or make a 
button for them to click which will take their local system time?

-- 
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] Current date/time for datetime field (time is wrong)

2014-04-15 Thread Marco Mansilla
El Tue, 15 Apr 2014 10:13:26 -0700 (PDT)
LoveWeb2py atayloru...@gmail.com escribió:

 Hello,
 
 I love the calendar that pops up in the 'datetime' field with a
 time/date selector. However, when my customers use it their time is
 always off. Is there a way to prepopulate the field with the current
 time, or make a button for them to click which will take their local
 system time?
 

set default=request.now in the table definition

Marco.

-- 
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] Current date/time for datetime field (time is wrong)

2014-04-15 Thread Austin Taylor
Perfect. Thank you!


On Tue, Apr 15, 2014 at 1:04 PM, Marco Mansilla thebigsho...@gmail.comwrote:

 El Tue, 15 Apr 2014 10:13:26 -0700 (PDT)
 LoveWeb2py atayloru...@gmail.com escribió:

  Hello,
 
  I love the calendar that pops up in the 'datetime' field with a
  time/date selector. However, when my customers use it their time is
  always off. Is there a way to prepopulate the field with the current
  time, or make a button for them to click which will take their local
  system time?
 

 set default=request.now in the table definition

 Marco.

 --
 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 a topic in the
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/web2py/-d2AJBX_1ns/unsubscribe.
 To unsubscribe from this group and all its topics, 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] experimental rname feature documentation compendium

2014-04-15 Thread Richard
Hello,

I was trying the rname feature and I had to find those ressources, so I 
thought it could be nice to aggregate them :


What rname is :
https://groups.google.com/d/msg/web2py/_q5qcARON4E/6JLCHM3eQHAJ

Precision on how to use it :
https://groups.google.com/d/msg/web2py/Z8O-h2lyVKk/XINO2f3Y5UUJ

Mine :
https://groups.google.com/d/msg/web2py/UNaVAsuKUXM/7noGyVkgsdcJ

Less informations :

https://groups.google.com/d/msg/web2py-developers/4tYHhO0emmo/87tFsPo8KGoJ

The whole thread should be read to understand :
https://groups.google.com/d/msg/web2py-developers/4hzZ4HkNCTo/8hAxqzkoSIMJ
https://groups.google.com/d/msg/web2py-developers/4hzZ4HkNCTo/j7swvWyYzJUJ
https://groups.google.com/d/msg/web2py-developers/4hzZ4HkNCTo/nUQ2IPaPADQJ

Another interresting thread :
https://groups.google.com/d/msg/web2py-developers/v_O5eD61n9k/u_2vyvnpLlcJ

Also this one :
https://github.com/web2py/web2py/pull/296

Hope it helps other...

Richard

-- 
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] AYUDA como ajustar la resolucion de la pagina de web segun el navegador ?

2014-04-15 Thread Carlos Costa
Mayra, esto es lo grupo web2py en ingles.
Por favor, reecriba tu question en ingles para que qualquier uno pueda
compreenderla.
Asi tenes mas chances de ser respondida.

Mayra, this is the web2py group in english.
Please, rewrite your question in english so anyone can understand it.
So you more chances to be answered.

The default layout.html already fits well and resizes itself when displayed
and smaller devices.
You can teste this by simpling resizing your browser window.
For me, it looks like you have a issue with your own css styling.
Maybe you need to redesign it avoiding fixed widths and heights.
Also give a look at the Bootstrap documentation, it is the css (and other
things) framework used now in Web2py.
Look how you can design your layout safely across different devices using
the appropriated classes.
http://getbootstrap.com/2.3.2/scaffolding.html#gridSystem


2014-04-15 9:12 GMT-03:00 Mayra Marticorena marticorenama...@gmail.com:

 hola buen dia , como andan ? estoy teniendo problemas de resolucion en mi
 pagina de web , http://www.distribuidorahenry.com.ar/welcome/default/index, 
 si entro en la pc que he utilize para armar esta misma , se ve claramente
 , sin embargo cuando entro con otra pc se ve mal , saltos de pagina e
 margenes etc . Existe un parche , que automaticamente se ajuste a los
 diferentes resoluciones , de los navegadores ? .
 Desde ya , muchas gracias !

 mayra

 --
 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.




-- 
Att.

Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן

-- 
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.