[web2py] data processing conditional on form input

2016-11-01 Thread Simon Andersson
Hey guys I have a relatively simple question to ask:

I have a form storing my input in an sqlite database.
Based on the response in the form I want to choose a certain file stored on 
the server.
How do I go about writing the if statement?

eg

db = DAL('sqlite://storage.sqlite')
db.define_table('dbname', Field('file', requires=IS_IN_SET(['file1','file2']
))) 




Then I want to write something conditional on the input being eg file1

def processing():
if db.dbname(request.args(0)).file == file1:
pathDir = /path/to/file1
else:
pathDir = /path/to/file2

What should I use to tell the processing to use the current row in the 
database? How do I tell the server to start processing once the form has 
been submitted?

Thanks!
-a noob

-- 
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] What is the recommended way to translate dynamic contents in a multilingual website?

2016-11-01 Thread at
Hi,

For small web-applications I've used T() and it worked well. But for larger 
websites with dynamic contents if T() is used, then translations files can 
grow extremely big. So what is the recommended way to translate dynamic 
contents in a multilingual website?
If T() is used, then those translation files can grow extremely big, since 
description for example can contain hundreds of words for each project. 
What do you think about this?
Thanks,
AT
If T() is used, then those translation files can grow extremely big, since 
description for example can contain hundreds of words for each project. 
What do you think about this?If T() is used, then those translation files 
can grow extremely big, since description for example can contain hundreds 
of words for each project. What do you think about this?

-- 
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: How can I access functions from multiple files in the controllers directory?

2016-11-01 Thread 黄祥
just an idea why not put it on modules?
e.g.
*controllers/default.py*
import file1

a = file1.function1(x, y)
b = file1.function2(y, z)

*modules/file1.py*
def function1(value1, value2):
code
return

def function2(value1, value2):
code
return

best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report 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] How can I access functions from multiple files in the controllers directory?

2016-11-01 Thread 'tomt' via web2py-users
Hi,

In the controllers directory I wanted to define some functions in another 
file.
I had hoped to import the functions to make them available to default.py but
I haven't been able to get this to work. 

I'm hoping that someone can point out my error, and possibly a solution.

In the controllers directory there is default.py and file1.py

--- default.py ---
...
from file1 import *
...
a = function1(x,y)
...
b = function2(y,z)
...

--- file1.py ---
...
def function1(value1,value2):
code
return

def function2(value1,value2):
code
return

ImportError: No module named file1

(I defined __init__.py in controllers, but this didn't help)

Any pointers would be appreciated - Tom

-- 
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: How to start a scheduler task from a module?

2016-11-01 Thread Dave S


On Tuesday, November 1, 2016 at 2:42:28 PM UTC-7, mweissen wrote:
>
> I want to start a task from a module. (The module contains a small 
> smtp-server.)
> I could it with a db.scheduler_task.insert(...), but I want to use 
> myschedule.queue_task(...)
>
> ​What would be the correct way to define "myschedule" ? Something like
>
> myschedule = Scheduler(current.db)​
>
>
> ​Regards, Martin​
>


My first thought is that you define myschedule in your model file(s), and 
then in whatever controller calls your module, add it to current and pass 
it that way, or make it an argument of your module's function.  I don't see 
any reason NOT to use queue_task, and inserting directly into the table is 
subject Change Without Notice.

/dps


 

-- 
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: IDE for using web2py on windows

2016-11-01 Thread Dave S


On Tuesday, November 1, 2016 at 2:48:36 PM UTC-7, Ramos wrote:
>
> Sublime with web2py console is way too good...
>
> 2016-11-01 21:24 GMT+00:00 Ron Chatterjee  >:
>
>> wing IDE wing IDE wing IDE!
>>
>>
Anaconda has some IDE features, though it's meant more as a numbers-kids' 
workbench.
Available on Win, Lin, and Mac.

I'm supposed to use it for a data science class, but so far I've just 
peeped over someone's shoulder.

/dps

 

> On Monday, October 31, 2016 at 7:28:07 PM UTC-4, Nikos Panagogiannopoulos 
>> wrote:
>>>
>>> I am a Linux user also. 
>>> So
>>> Wing IDE and PyCharm do clearly support web2py.
>>> Atom.io IDE maybe needs some configuration to run it directly 
>>> (proximity) (!not so very serius lack)
>>> and PyCharm Community version is restricted on Web Development only in 
>>> Javascript sections as you said, 
>>> hope after the evaluaton period i won't have subjects.
>>> Τη Δευτέρα, 31 Οκτωβρίου 2016 - 6:28:44 μ.μ. UTC+2, ο χρήστης Mirek 
>>> Zvolský έγραψε:

 Maybe the answer is about the Javascript support. Just for Python the 
 Community version works great. (But I am Linux user.)




 On Sunday, 30 October 2016 03:31:59 UTC+1, Nikos Panagogiannopoulos 
 wrote:
>
>
> Will the community version of PyCharm be capable to full service me or 
> i do have to go the the paid version?
>
> -- 
>> 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.


Re: [web2py] Re: IDE for using web2py on windows

2016-11-01 Thread António Ramos
Sublime with web2py console is way too good...

2016-11-01 21:24 GMT+00:00 Ron Chatterjee :

> wing IDE wing IDE wing IDE!
>
> On Monday, October 31, 2016 at 7:28:07 PM UTC-4, Nikos Panagogiannopoulos
> wrote:
>>
>> I am a Linux user also.
>> So
>> Wing IDE and PyCharm do clearly support web2py.
>> Atom.io IDE maybe needs some configuration to run it directly (proximity)
>> (!not so very serius lack)
>> and PyCharm Community version is restricted on Web Development only in
>> Javascript sections as you said,
>> hope after the evaluaton period i won't have subjects.
>> Τη Δευτέρα, 31 Οκτωβρίου 2016 - 6:28:44 μ.μ. UTC+2, ο χρήστης Mirek
>> Zvolský έγραψε:
>>>
>>> Maybe the answer is about the Javascript support. Just for Python the
>>> Community version works great. (But I am Linux user.)
>>>
>>>
>>>
>>>
>>> On Sunday, 30 October 2016 03:31:59 UTC+1, Nikos Panagogiannopoulos
>>> wrote:


 Will the community version of PyCharm be capable to full service me or
 i do have to go the the paid version?

 --
> 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] How to start a scheduler task from a module?

2016-11-01 Thread Martin Weissenboeck
I want to start a task from a module. (The module contains a small
smtp-server.)
I could it with a db.scheduler_task.insert(...), but I want to use
myschedule.queue_task(...)

​What would be the correct way to define "myschedule" ? Something like

myschedule = Scheduler(current.db)​


​Regards, Martin​

-- 
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: IDE for using web2py on windows

2016-11-01 Thread Ron Chatterjee
wing IDE wing IDE wing IDE!

On Monday, October 31, 2016 at 7:28:07 PM UTC-4, Nikos Panagogiannopoulos 
wrote:
>
> I am a Linux user also. 
> So
> Wing IDE and PyCharm do clearly support web2py.
> Atom.io IDE maybe needs some configuration to run it directly (proximity) 
> (!not so very serius lack)
> and PyCharm Community version is restricted on Web Development only in 
> Javascript sections as you said, 
> hope after the evaluaton period i won't have subjects.
> Τη Δευτέρα, 31 Οκτωβρίου 2016 - 6:28:44 μ.μ. UTC+2, ο χρήστης Mirek 
> Zvolský έγραψε:
>>
>> Maybe the answer is about the Javascript support. Just for Python the 
>> Community version works great. (But I am Linux user.)
>>
>>
>>
>>
>> On Sunday, 30 October 2016 03:31:59 UTC+1, Nikos Panagogiannopoulos wrote:
>>>
>>>
>>> Will the community version of PyCharm be capable to full service me or i 
>>> do have to go the the paid version?
>>>
>>>

-- 
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: web2py for windows server. IIS or Nginx?

2016-11-01 Thread Omi Chiba
Thank you! I will stick to Apache/wsgi for now. 

On Tuesday, November 1, 2016 at 1:54:37 PM UTC-5, Jim S wrote:
>
> I think the thread you referenced was one discussing deployment on Ubuntu 
> where yes, nginx/uwsgi is preferred.  But, the Windows environment is 
> different (in my opinion) since the Windows nginx is still considered 
> 'beta'.   I wouldn't feel that comfortable using it.  (that said, I do use 
> many other 'beta' projects)
>
> If Apache/mod_wsgi is really frowned upon, should it be noted in the book?
>
> @omi - I migrated from Windows/Apache/mod_wsgi a while back to 
> Ubuntu/nginx/uwsgi.  I think that at that time I switched from using pyodbc 
> to pypyodbc.  I too access MS SQL servers from my ubuntu box using ODBC 
> (along with IBM AS/400 databases).  It works very well for me.
>
> -Jim
>
>
> On Tuesday, November 1, 2016 at 1:33:53 PM UTC-5, Richard wrote:
>>
>> I would say, we don't not don't support it, we just don't maintain a 
>> web2py setup script with Apache... I think the decision was to reduce the 
>> number of setup script to the bare minium to only the one web2py-devs are 
>> willing to maintain...
>>
>> That been said, I am sure that if you or someone else take owner ship to 
>> update and maintain Apache setup script because it important for you we 
>> will bring it back in the scripts folder... But I wouldn't take that path 
>> before someone demonstrate commitment to the task as we don't want to get 
>> back stuff that will not be maintain in years in the repo... I guess you 
>> can set your own github repo to demonstrate your commitment and help the 
>> community though, and it could be reference somewhere appropriate in the 
>> book.
>>
>> Richard
>>
>> On Tue, Nov 1, 2016 at 2:22 PM, Dave S  wrote:
>>
>>>
>>>
>>> On Tuesday, November 1, 2016 at 7:51:26 AM UTC-7, Omi Chiba wrote:

 Thank you. I thought the Massimo's comment below and he  also mentioned 
 somewhere we don't want to support Apache anymore... that's why I was 
 nervous. I was thinking to your direction (Moving to Ubuntu) but I use 
 pyodbc to connect Microsoft SQL Server and DB2, also python-ldap.. so not 
 sure if it works the same way.


 "P.S. I stand by Niphlod. He did not say anything offending and his 
 comment was insightful. We do not recommend apache+mod_wsgi because there 
 are better ways (nginx+uwsgi)."


>>> If you have a working Apache configuration, that's an argument for 
>>> staying with it [caveats follow].  Part of the deprecating is because 
>>> Apache configuration is delicate, complicated, and [reportedly] the 
>>> documentation isn't always helpful.  If you're beyond that stage, that's 
>>> one objection overcome.  The caveats: there is some concern that Apache 
>>> security updates may be frequent and patching may be delicate and 
>>> complicated [it's been around long enough that may have an "organic" 
>>> structure].
>>>
>>> I think Niphlod has run both IIS and nginx on Windows, and nginx on his 
>>> linux systems, but I'd have to go back through his posts to be sure of that.
>>>
>>> /dps
>>>
>>>  
>>>
 On Tuesday, November 1, 2016 at 9:39:17 AM UTC-5, Jim S wrote:
>
> I haven't seen anything about Apache no longer supported.  Did I miss 
> something?
>
> To my knowledge, nginx is not considered 'production ready' on 
> Windows.  See the first paragraph here:  
> http://nginx.org/en/docs/windows.html
>
> I think Apache is the way to go.   
> http://web2py.com/books/default/chapter/29/13/deployment-recipes#Apache-and-mod_wsgi
>
> For me though, I've moved all of my production servers to Ubuntu with 
> nginx / uwsgi.
>
> -Jim
>
> On Monday, October 31, 2016 at 5:31:06 PM UTC-5, Omi Chiba wrote:
>>
>> I'm running production site with Apache but it sounds like we don't 
>> support apache anymore...  which is one is better/easy option for me? I 
>> tried IIS long time ago but didn't success... maybe it was too 
>> complicated 
>> for me.
>>
> -- 
>>> 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 

Re: [web2py] Re: web2py for windows server. IIS or Nginx?

2016-11-01 Thread Jim S
I think the thread you referenced was one discussing deployment on Ubuntu 
where yes, nginx/uwsgi is preferred.  But, the Windows environment is 
different (in my opinion) since the Windows nginx is still considered 
'beta'.   I wouldn't feel that comfortable using it.  (that said, I do use 
many other 'beta' projects)

If Apache/mod_wsgi is really frowned upon, should it be noted in the book?

@omi - I migrated from Windows/Apache/mod_wsgi a while back to 
Ubuntu/nginx/uwsgi.  I think that at that time I switched from using pyodbc 
to pypyodbc.  I too access MS SQL servers from my ubuntu box using ODBC 
(along with IBM AS/400 databases).  It works very well for me.

-Jim


On Tuesday, November 1, 2016 at 1:33:53 PM UTC-5, Richard wrote:
>
> I would say, we don't not don't support it, we just don't maintain a 
> web2py setup script with Apache... I think the decision was to reduce the 
> number of setup script to the bare minium to only the one web2py-devs are 
> willing to maintain...
>
> That been said, I am sure that if you or someone else take owner ship to 
> update and maintain Apache setup script because it important for you we 
> will bring it back in the scripts folder... But I wouldn't take that path 
> before someone demonstrate commitment to the task as we don't want to get 
> back stuff that will not be maintain in years in the repo... I guess you 
> can set your own github repo to demonstrate your commitment and help the 
> community though, and it could be reference somewhere appropriate in the 
> book.
>
> Richard
>
> On Tue, Nov 1, 2016 at 2:22 PM, Dave S  
> wrote:
>
>>
>>
>> On Tuesday, November 1, 2016 at 7:51:26 AM UTC-7, Omi Chiba wrote:
>>>
>>> Thank you. I thought the Massimo's comment below and he  also mentioned 
>>> somewhere we don't want to support Apache anymore... that's why I was 
>>> nervous. I was thinking to your direction (Moving to Ubuntu) but I use 
>>> pyodbc to connect Microsoft SQL Server and DB2, also python-ldap.. so not 
>>> sure if it works the same way.
>>>
>>>
>>> "P.S. I stand by Niphlod. He did not say anything offending and his 
>>> comment was insightful. We do not recommend apache+mod_wsgi because there 
>>> are better ways (nginx+uwsgi)."
>>>
>>>
>> If you have a working Apache configuration, that's an argument for 
>> staying with it [caveats follow].  Part of the deprecating is because 
>> Apache configuration is delicate, complicated, and [reportedly] the 
>> documentation isn't always helpful.  If you're beyond that stage, that's 
>> one objection overcome.  The caveats: there is some concern that Apache 
>> security updates may be frequent and patching may be delicate and 
>> complicated [it's been around long enough that may have an "organic" 
>> structure].
>>
>> I think Niphlod has run both IIS and nginx on Windows, and nginx on his 
>> linux systems, but I'd have to go back through his posts to be sure of that.
>>
>> /dps
>>
>>  
>>
>>> On Tuesday, November 1, 2016 at 9:39:17 AM UTC-5, Jim S wrote:

 I haven't seen anything about Apache no longer supported.  Did I miss 
 something?

 To my knowledge, nginx is not considered 'production ready' on 
 Windows.  See the first paragraph here:  
 http://nginx.org/en/docs/windows.html

 I think Apache is the way to go.   
 http://web2py.com/books/default/chapter/29/13/deployment-recipes#Apache-and-mod_wsgi

 For me though, I've moved all of my production servers to Ubuntu with 
 nginx / uwsgi.

 -Jim

 On Monday, October 31, 2016 at 5:31:06 PM UTC-5, Omi Chiba wrote:
>
> I'm running production site with Apache but it sounds like we don't 
> support apache anymore...  which is one is better/easy option for me? I 
> tried IIS long time ago but didn't success... maybe it was too 
> complicated 
> for me.
>
 -- 
>> 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.


Re: [web2py] Re: web2py for windows server. IIS or Nginx?

2016-11-01 Thread Richard Vézina
I would say, we don't not don't support it, we just don't maintain a web2py
setup script with Apache... I think the decision was to reduce the number
of setup script to the bare minium to only the one web2py-devs are willing
to maintain...

That been said, I am sure that if you or someone else take owner ship to
update and maintain Apache setup script because it important for you we
will bring it back in the scripts folder... But I wouldn't take that path
before someone demonstrate commitment to the task as we don't want to get
back stuff that will not be maintain in years in the repo... I guess you
can set your own github repo to demonstrate your commitment and help the
community though, and it could be reference somewhere appropriate in the
book.

Richard

On Tue, Nov 1, 2016 at 2:22 PM, Dave S  wrote:

>
>
> On Tuesday, November 1, 2016 at 7:51:26 AM UTC-7, Omi Chiba wrote:
>>
>> Thank you. I thought the Massimo's comment below and he  also mentioned
>> somewhere we don't want to support Apache anymore... that's why I was
>> nervous. I was thinking to your direction (Moving to Ubuntu) but I use
>> pyodbc to connect Microsoft SQL Server and DB2, also python-ldap.. so not
>> sure if it works the same way.
>>
>>
>> "P.S. I stand by Niphlod. He did not say anything offending and his
>> comment was insightful. We do not recommend apache+mod_wsgi because there
>> are better ways (nginx+uwsgi)."
>>
>>
> If you have a working Apache configuration, that's an argument for staying
> with it [caveats follow].  Part of the deprecating is because Apache
> configuration is delicate, complicated, and [reportedly] the documentation
> isn't always helpful.  If you're beyond that stage, that's one objection
> overcome.  The caveats: there is some concern that Apache security updates
> may be frequent and patching may be delicate and complicated [it's been
> around long enough that may have an "organic" structure].
>
> I think Niphlod has run both IIS and nginx on Windows, and nginx on his
> linux systems, but I'd have to go back through his posts to be sure of that.
>
> /dps
>
>
>
>> On Tuesday, November 1, 2016 at 9:39:17 AM UTC-5, Jim S wrote:
>>>
>>> I haven't seen anything about Apache no longer supported.  Did I miss
>>> something?
>>>
>>> To my knowledge, nginx is not considered 'production ready' on Windows.
>>> See the first paragraph here:  http://nginx.org/en/docs/windows.html
>>>
>>> I think Apache is the way to go.   http://web2py.com/books/defa
>>> ult/chapter/29/13/deployment-recipes#Apache-and-mod_wsgi
>>>
>>> For me though, I've moved all of my production servers to Ubuntu with
>>> nginx / uwsgi.
>>>
>>> -Jim
>>>
>>> On Monday, October 31, 2016 at 5:31:06 PM UTC-5, Omi Chiba wrote:

 I'm running production site with Apache but it sounds like we don't
 support apache anymore...  which is one is better/easy option for me? I
 tried IIS long time ago but didn't success... maybe it was too complicated
 for me.

>>> --
> 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: web2py for windows server. IIS or Nginx?

2016-11-01 Thread Dave S


On Tuesday, November 1, 2016 at 7:51:26 AM UTC-7, Omi Chiba wrote:
>
> Thank you. I thought the Massimo's comment below and he  also mentioned 
> somewhere we don't want to support Apache anymore... that's why I was 
> nervous. I was thinking to your direction (Moving to Ubuntu) but I use 
> pyodbc to connect Microsoft SQL Server and DB2, also python-ldap.. so not 
> sure if it works the same way.
>
>
> "P.S. I stand by Niphlod. He did not say anything offending and his 
> comment was insightful. We do not recommend apache+mod_wsgi because there 
> are better ways (nginx+uwsgi)."
>
>
If you have a working Apache configuration, that's an argument for staying 
with it [caveats follow].  Part of the deprecating is because Apache 
configuration is delicate, complicated, and [reportedly] the documentation 
isn't always helpful.  If you're beyond that stage, that's one objection 
overcome.  The caveats: there is some concern that Apache security updates 
may be frequent and patching may be delicate and complicated [it's been 
around long enough that may have an "organic" structure].

I think Niphlod has run both IIS and nginx on Windows, and nginx on his 
linux systems, but I'd have to go back through his posts to be sure of that.

/dps

 

> On Tuesday, November 1, 2016 at 9:39:17 AM UTC-5, Jim S wrote:
>>
>> I haven't seen anything about Apache no longer supported.  Did I miss 
>> something?
>>
>> To my knowledge, nginx is not considered 'production ready' on Windows. 
>>  See the first paragraph here:  http://nginx.org/en/docs/windows.html
>>
>> I think Apache is the way to go.   
>> http://web2py.com/books/default/chapter/29/13/deployment-recipes#Apache-and-mod_wsgi
>>
>> For me though, I've moved all of my production servers to Ubuntu with 
>> nginx / uwsgi.
>>
>> -Jim
>>
>> On Monday, October 31, 2016 at 5:31:06 PM UTC-5, Omi Chiba wrote:
>>>
>>> I'm running production site with Apache but it sounds like we don't 
>>> support apache anymore...  which is one is better/easy option for me? I 
>>> tried IIS long time ago but didn't success... maybe it was too complicated 
>>> for me.
>>>
>>

-- 
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] .git file in gluon/packages/dal/.git

2016-11-01 Thread Richard Vézina
I agree with you Simone, but should it stay there in the build for pydal
only?

Richard

On Tue, Nov 1, 2016 at 1:45 PM, Niphlod  wrote:

> it's perfectly normal as pydal is a subrepo (it's in the readme, too)
>
>
> On Tuesday, November 1, 2016 at 5:43:44 PM UTC+1, Giles Thomas wrote:
>>
>> Thanks, Richard.
>>
>> Regarding why -- I'm talking about the version that will be installed by
>> default when someone creates a web2py app on the hosting platform my
>> company provides, PythonAnywhere -- which would also affect the version
>> used by the "Try it now online" link on the front page of www.web2py.com.
>> I agree that doing version control the web2py way is probably more sensible
>> than making the whole web2py folder a git repo, but if people do want to
>> follow the git route, it would be better if we didn't have that "trap" in
>> there for them :-)
>>
>>
>> All the best,
>>
>> Giles
>>
>>
>> On Tuesday, 1 November 2016 16:13:22 UTC, Richard wrote:
>>>
>>> Sorry, you right in there is gluon/packages/dal/.git, I thought you were
>>> speaking of a .git/ folder at the root of web2py which there is not...
>>>
>>> I guess you can delete it if it cause problem, but if you have issue
>>> with it, it means you try to init you git repo over the entire web2py
>>> folder?
>>>
>>> Why don't you just version control your app? which is what we usually
>>> do...
>>>
>>> Thanks
>>>
>>> Richard
>>>
>>> On Tue, Nov 1, 2016 at 10:51 AM, Giles Thomas 
>>> wrote:
>>>
 The one labelled "For normal users", so presumably stable.  The VERSION
 file says:

 Version 2.14.6-stable+timestamp.2016.05.10.00.21.47


 All the best,

 Giles

 On Tuesday, 1 November 2016 14:48:03 UTC, Richard wrote:
>
> Nightly or stable? I don't have it in my last build 2.14.6 I think...
>
> Richard
>
> On Tue, Nov 1, 2016 at 10:42 AM, Giles Thomas 
> wrote:
>
>> This is in a download from web2py.com -- specifically, the "Source
>> code" download from http://www.web2py.com/init/default/download.
>>
>> Interestingly, gluon/packages/dal/.git is a file rather than a
>> directory.  It contains this:
>>
>> gitdir: ../../../.git/modules/gluon/packages/dal
>>
>>
>>
>> All the best,
>>
>> Giles
>>
>>
>>
>>
>> On Tuesday, 1 November 2016 13:25:51 UTC, Richard wrote:
>>>
>>> Do you download from Github or web2py.com? The later you shouldn't
>>> have this issue... If you get web2py from git, it normal that you have
>>> .git/ for web2py and for dal as dal have been extract from web2py and 
>>> is a
>>> project of it own so it is include in the web2py repository as a 
>>> submodule.
>>>
>>> Richard
>>>
>>> On Tue, Nov 1, 2016 at 8:50 AM, Giles Thomas 
>>> wrote:
>>>
 Hi all,

 Someone pointed out to us that web2py has a .git file in
 gluon/packages/dal/.git.  This can cause errors when you try to 
 initialize
 your project as a git repo.  Is there a specific reason for it to be
 there?  Or is it an artefact of the packaging procedure?  We're 
 considering
 removing it from the source that we install for users on 
 PythonAnywhere,
 but wanted to check first to make sure that we're not going to break
 anything or cause problems for our users.


 All the best,

 Giles
 --
 Giles Thomas 

 PythonAnywhere: Develop and host Python from your browser
 

 A product from PythonAnywhere LLP
 17a Clerkenwell Road, London EC1M 5RD, UK
 VAT No.: GB 893 5643 79
 Registered in England and Wales as company number OC378414.
 Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK


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

Re: [web2py] .git file in gluon/packages/dal/.git

2016-11-01 Thread Niphlod
it's perfectly normal as pydal is a subrepo (it's in the readme, too)

On Tuesday, November 1, 2016 at 5:43:44 PM UTC+1, Giles Thomas wrote:
>
> Thanks, Richard.  
>
> Regarding why -- I'm talking about the version that will be installed by 
> default when someone creates a web2py app on the hosting platform my 
> company provides, PythonAnywhere -- which would also affect the version 
> used by the "Try it now online" link on the front page of www.web2py.com. 
>  I agree that doing version control the web2py way is probably more 
> sensible than making the whole web2py folder a git repo, but if people do 
> want to follow the git route, it would be better if we didn't have that 
> "trap" in there for them :-)
>
>
> All the best,
>
> Giles
>
>
> On Tuesday, 1 November 2016 16:13:22 UTC, Richard wrote:
>>
>> Sorry, you right in there is gluon/packages/dal/.git, I thought you were 
>> speaking of a .git/ folder at the root of web2py which there is not...
>>
>> I guess you can delete it if it cause problem, but if you have issue with 
>> it, it means you try to init you git repo over the entire web2py folder?
>>
>> Why don't you just version control your app? which is what we usually 
>> do...
>>
>> Thanks
>>
>> Richard
>>
>> On Tue, Nov 1, 2016 at 10:51 AM, Giles Thomas  
>> wrote:
>>
>>> The one labelled "For normal users", so presumably stable.  The VERSION 
>>> file says:
>>>
>>> Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
>>>
>>>
>>> All the best,
>>>
>>> Giles
>>>
>>> On Tuesday, 1 November 2016 14:48:03 UTC, Richard wrote:

 Nightly or stable? I don't have it in my last build 2.14.6 I think... 

 Richard

 On Tue, Nov 1, 2016 at 10:42 AM, Giles Thomas  
 wrote:

> This is in a download from web2py.com -- specifically, the "Source 
> code" download from http://www.web2py.com/init/default/download.
>
> Interestingly, gluon/packages/dal/.git is a file rather than a 
> directory.  It contains this:
>
> gitdir: ../../../.git/modules/gluon/packages/dal
>
>
>
> All the best,
>
> Giles
>
>
>
>
> On Tuesday, 1 November 2016 13:25:51 UTC, Richard wrote:
>>
>> Do you download from Github or web2py.com? The later you shouldn't 
>> have this issue... If you get web2py from git, it normal that you have 
>> .git/ for web2py and for dal as dal have been extract from web2py and is 
>> a 
>> project of it own so it is include in the web2py repository as a 
>> submodule.
>>
>> Richard
>>
>> On Tue, Nov 1, 2016 at 8:50 AM, Giles Thomas  
>> wrote:
>>
>>> Hi all,
>>>
>>> Someone pointed out to us that web2py has a .git file in 
>>> gluon/packages/dal/.git.  This can cause errors when you try to 
>>> initialize 
>>> your project as a git repo.  Is there a specific reason for it to be 
>>> there?  Or is it an artefact of the packaging procedure?  We're 
>>> considering 
>>> removing it from the source that we install for users on 
>>> PythonAnywhere, 
>>> but wanted to check first to make sure that we're not going to break 
>>> anything or cause problems for our users.
>>>
>>>
>>> All the best,
>>>
>>> Giles
>>> -- 
>>> Giles Thomas 
>>>
>>> PythonAnywhere: Develop and host Python from your browser
>>> 
>>>
>>> A product from PythonAnywhere LLP
>>> 17a Clerkenwell Road, London EC1M 5RD, UK
>>> VAT No.: GB 893 5643 79
>>> Registered in England and Wales as company number OC378414.
>>> Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK 
>>>
>>>
>>> -- 
>>> 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
>>> - 

Re: [web2py] .git file in gluon/packages/dal/.git

2016-11-01 Thread Giles Thomas
Thanks, Richard.  

Regarding why -- I'm talking about the version that will be installed by 
default when someone creates a web2py app on the hosting platform my 
company provides, PythonAnywhere -- which would also affect the version 
used by the "Try it now online" link on the front page of www.web2py.com. 
 I agree that doing version control the web2py way is probably more 
sensible than making the whole web2py folder a git repo, but if people do 
want to follow the git route, it would be better if we didn't have that 
"trap" in there for them :-)


All the best,

Giles


On Tuesday, 1 November 2016 16:13:22 UTC, Richard wrote:
>
> Sorry, you right in there is gluon/packages/dal/.git, I thought you were 
> speaking of a .git/ folder at the root of web2py which there is not...
>
> I guess you can delete it if it cause problem, but if you have issue with 
> it, it means you try to init you git repo over the entire web2py folder?
>
> Why don't you just version control your app? which is what we usually do...
>
> Thanks
>
> Richard
>
> On Tue, Nov 1, 2016 at 10:51 AM, Giles Thomas  > wrote:
>
>> The one labelled "For normal users", so presumably stable.  The VERSION 
>> file says:
>>
>> Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
>>
>>
>> All the best,
>>
>> Giles
>>
>> On Tuesday, 1 November 2016 14:48:03 UTC, Richard wrote:
>>>
>>> Nightly or stable? I don't have it in my last build 2.14.6 I think... 
>>>
>>> Richard
>>>
>>> On Tue, Nov 1, 2016 at 10:42 AM, Giles Thomas  
>>> wrote:
>>>
 This is in a download from web2py.com -- specifically, the "Source 
 code" download from http://www.web2py.com/init/default/download.

 Interestingly, gluon/packages/dal/.git is a file rather than a 
 directory.  It contains this:

 gitdir: ../../../.git/modules/gluon/packages/dal



 All the best,

 Giles




 On Tuesday, 1 November 2016 13:25:51 UTC, Richard wrote:
>
> Do you download from Github or web2py.com? The later you shouldn't 
> have this issue... If you get web2py from git, it normal that you have 
> .git/ for web2py and for dal as dal have been extract from web2py and is 
> a 
> project of it own so it is include in the web2py repository as a 
> submodule.
>
> Richard
>
> On Tue, Nov 1, 2016 at 8:50 AM, Giles Thomas  
> wrote:
>
>> Hi all,
>>
>> Someone pointed out to us that web2py has a .git file in 
>> gluon/packages/dal/.git.  This can cause errors when you try to 
>> initialize 
>> your project as a git repo.  Is there a specific reason for it to be 
>> there?  Or is it an artefact of the packaging procedure?  We're 
>> considering 
>> removing it from the source that we install for users on PythonAnywhere, 
>> but wanted to check first to make sure that we're not going to break 
>> anything or cause problems for our users.
>>
>>
>> All the best,
>>
>> Giles
>> -- 
>> Giles Thomas 
>>
>> PythonAnywhere: Develop and host Python from your browser
>> 
>>
>> A product from PythonAnywhere LLP
>> 17a Clerkenwell Road, London EC1M 5RD, UK
>> VAT No.: GB 893 5643 79
>> Registered in England and Wales as company number OC378414.
>> Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK 
>>
>>
>> -- 
>> 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 

Re: [web2py] .git file in gluon/packages/dal/.git

2016-11-01 Thread Richard Vézina
Sorry, you right in there is gluon/packages/dal/.git, I thought you were
speaking of a .git/ folder at the root of web2py which there is not...

I guess you can delete it if it cause problem, but if you have issue with
it, it means you try to init you git repo over the entire web2py folder?

Why don't you just version control your app? which is what we usually do...

Thanks

Richard

On Tue, Nov 1, 2016 at 10:51 AM, Giles Thomas 
wrote:

> The one labelled "For normal users", so presumably stable.  The VERSION
> file says:
>
> Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
>
>
> All the best,
>
> Giles
>
> On Tuesday, 1 November 2016 14:48:03 UTC, Richard wrote:
>>
>> Nightly or stable? I don't have it in my last build 2.14.6 I think...
>>
>> Richard
>>
>> On Tue, Nov 1, 2016 at 10:42 AM, Giles Thomas 
>> wrote:
>>
>>> This is in a download from web2py.com -- specifically, the "Source
>>> code" download from http://www.web2py.com/init/default/download.
>>>
>>> Interestingly, gluon/packages/dal/.git is a file rather than a
>>> directory.  It contains this:
>>>
>>> gitdir: ../../../.git/modules/gluon/packages/dal
>>>
>>>
>>>
>>> All the best,
>>>
>>> Giles
>>>
>>>
>>>
>>>
>>> On Tuesday, 1 November 2016 13:25:51 UTC, Richard wrote:

 Do you download from Github or web2py.com? The later you shouldn't
 have this issue... If you get web2py from git, it normal that you have
 .git/ for web2py and for dal as dal have been extract from web2py and is a
 project of it own so it is include in the web2py repository as a submodule.

 Richard

 On Tue, Nov 1, 2016 at 8:50 AM, Giles Thomas 
 wrote:

> Hi all,
>
> Someone pointed out to us that web2py has a .git file in
> gluon/packages/dal/.git.  This can cause errors when you try to initialize
> your project as a git repo.  Is there a specific reason for it to be
> there?  Or is it an artefact of the packaging procedure?  We're 
> considering
> removing it from the source that we install for users on PythonAnywhere,
> but wanted to check first to make sure that we're not going to break
> anything or cause problems for our users.
>
>
> All the best,
>
> Giles
> --
> Giles Thomas 
>
> PythonAnywhere: Develop and host Python from your browser
> 
>
> A product from PythonAnywhere LLP
> 17a Clerkenwell Road, London EC1M 5RD, UK
> VAT No.: GB 893 5643 79
> Registered in England and Wales as company number OC378414.
> Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK
>
>
> --
> 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.
>

-- 
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] .git file in gluon/packages/dal/.git

2016-11-01 Thread Giles Thomas
The one labelled "For normal users", so presumably stable.  The VERSION 
file says:

Version 2.14.6-stable+timestamp.2016.05.10.00.21.47


All the best,

Giles

On Tuesday, 1 November 2016 14:48:03 UTC, Richard wrote:
>
> Nightly or stable? I don't have it in my last build 2.14.6 I think... 
>
> Richard
>
> On Tue, Nov 1, 2016 at 10:42 AM, Giles Thomas  > wrote:
>
>> This is in a download from web2py.com -- specifically, the "Source code" 
>> download from http://www.web2py.com/init/default/download.
>>
>> Interestingly, gluon/packages/dal/.git is a file rather than a 
>> directory.  It contains this:
>>
>> gitdir: ../../../.git/modules/gluon/packages/dal
>>
>>
>>
>> All the best,
>>
>> Giles
>>
>>
>>
>>
>> On Tuesday, 1 November 2016 13:25:51 UTC, Richard wrote:
>>>
>>> Do you download from Github or web2py.com? The later you shouldn't have 
>>> this issue... If you get web2py from git, it normal that you have .git/ for 
>>> web2py and for dal as dal have been extract from web2py and is a project of 
>>> it own so it is include in the web2py repository as a submodule.
>>>
>>> Richard
>>>
>>> On Tue, Nov 1, 2016 at 8:50 AM, Giles Thomas  
>>> wrote:
>>>
 Hi all,

 Someone pointed out to us that web2py has a .git file in 
 gluon/packages/dal/.git.  This can cause errors when you try to initialize 
 your project as a git repo.  Is there a specific reason for it to be 
 there?  Or is it an artefact of the packaging procedure?  We're 
 considering 
 removing it from the source that we install for users on PythonAnywhere, 
 but wanted to check first to make sure that we're not going to break 
 anything or cause problems for our users.


 All the best,

 Giles
 -- 
 Giles Thomas 

 PythonAnywhere: Develop and host Python from your browser
 

 A product from PythonAnywhere LLP
 17a Clerkenwell Road, London EC1M 5RD, UK
 VAT No.: GB 893 5643 79
 Registered in England and Wales as company number OC378414.
 Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK 


 -- 
 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: web2py for windows server. IIS or Nginx?

2016-11-01 Thread Omi Chiba
Thank you. I thought the Massimo's comment below and he  also mentioned 
somewhere we don't want to support Apache anymore... that's why I was 
nervous. I was thinking to your direction (Moving to Ubuntu) but I use 
pyodbc to connect Microsoft SQL Server and DB2, also python-ldap.. so not 
sure if it works the same way.


"P.S. I stand by Niphlod. He did not say anything offending and his comment 
was insightful. We do not recommend apache+mod_wsgi because there are 
better ways (nginx+uwsgi)."

On Tuesday, November 1, 2016 at 9:39:17 AM UTC-5, Jim S wrote:
>
> I haven't seen anything about Apache no longer supported.  Did I miss 
> something?
>
> To my knowledge, nginx is not considered 'production ready' on Windows. 
>  See the first paragraph here:  http://nginx.org/en/docs/windows.html
>
> I think Apache is the way to go.   
> http://web2py.com/books/default/chapter/29/13/deployment-recipes#Apache-and-mod_wsgi
>
> For me though, I've moved all of my production servers to Ubuntu with 
> nginx / uwsgi.
>
> -Jim
>
> On Monday, October 31, 2016 at 5:31:06 PM UTC-5, Omi Chiba wrote:
>>
>> I'm running production site with Apache but it sounds like we don't 
>> support apache anymore...  which is one is better/easy option for me? I 
>> tried IIS long time ago but didn't success... maybe it was too complicated 
>> for me.
>>
>

-- 
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] .git file in gluon/packages/dal/.git

2016-11-01 Thread Richard Vézina
Nightly or stable? I don't have it in my last build 2.14.6 I think...

Richard

On Tue, Nov 1, 2016 at 10:42 AM, Giles Thomas 
wrote:

> This is in a download from web2py.com -- specifically, the "Source code"
> download from http://www.web2py.com/init/default/download.
>
> Interestingly, gluon/packages/dal/.git is a file rather than a directory.
> It contains this:
>
> gitdir: ../../../.git/modules/gluon/packages/dal
>
>
>
> All the best,
>
> Giles
>
>
>
>
> On Tuesday, 1 November 2016 13:25:51 UTC, Richard wrote:
>>
>> Do you download from Github or web2py.com? The later you shouldn't have
>> this issue... If you get web2py from git, it normal that you have .git/ for
>> web2py and for dal as dal have been extract from web2py and is a project of
>> it own so it is include in the web2py repository as a submodule.
>>
>> Richard
>>
>> On Tue, Nov 1, 2016 at 8:50 AM, Giles Thomas  wrote:
>>
>>> Hi all,
>>>
>>> Someone pointed out to us that web2py has a .git file in
>>> gluon/packages/dal/.git.  This can cause errors when you try to initialize
>>> your project as a git repo.  Is there a specific reason for it to be
>>> there?  Or is it an artefact of the packaging procedure?  We're considering
>>> removing it from the source that we install for users on PythonAnywhere,
>>> but wanted to check first to make sure that we're not going to break
>>> anything or cause problems for our users.
>>>
>>>
>>> All the best,
>>>
>>> Giles
>>> --
>>> Giles Thomas 
>>>
>>> PythonAnywhere: Develop and host Python from your browser
>>> 
>>>
>>> A product from PythonAnywhere LLP
>>> 17a Clerkenwell Road, London EC1M 5RD, UK
>>> VAT No.: GB 893 5643 79
>>> Registered in England and Wales as company number OC378414.
>>> Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK
>>>
>>>
>>> --
>>> 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.
>

-- 
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] convert request.vars to set default value in a custom .factory() form

2016-11-01 Thread Richard
Hello,

I have an high customized SQLFORM.factory() form... I set default value for 
the update form for which I have no problem with values types as they get 
out of the database... But in case I want to emulate keepvalue feature with 
this form I need to pass value to request.vars which I need to set as 
default... The problem is that all value are string when I get them and I 
need to populate many fields and would greatly prefer not have to handle 
each fields manually one by one but instead do it dynamically so if I had 
field to the table I don't have to add it... So I am searching a way to 
convert appropriately value for each field type... I could use the approach 
proposed in the answer accepted hear 
: 
http://stackoverflow.com/questions/7402573/use-type-information-to-cast-values-stored-as-strings

I there surely such a thing in the web2py internal... I thought 
_filter_fields() would do it, but it only filter field that are member of a 
table, it doesn't act over the value of the field... I thought of using 
requires/validator, but I am not sure how to use them.

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.


Re: [web2py] .git file in gluon/packages/dal/.git

2016-11-01 Thread Giles Thomas
This is in a download from web2py.com -- specifically, the "Source code" 
download from http://www.web2py.com/init/default/download.

Interestingly, gluon/packages/dal/.git is a file rather than a directory. 
 It contains this:

gitdir: ../../../.git/modules/gluon/packages/dal



All the best,

Giles




On Tuesday, 1 November 2016 13:25:51 UTC, Richard wrote:
>
> Do you download from Github or web2py.com? The later you shouldn't have 
> this issue... If you get web2py from git, it normal that you have .git/ for 
> web2py and for dal as dal have been extract from web2py and is a project of 
> it own so it is include in the web2py repository as a submodule.
>
> Richard
>
> On Tue, Nov 1, 2016 at 8:50 AM, Giles Thomas  > wrote:
>
>> Hi all,
>>
>> Someone pointed out to us that web2py has a .git file in 
>> gluon/packages/dal/.git.  This can cause errors when you try to initialize 
>> your project as a git repo.  Is there a specific reason for it to be 
>> there?  Or is it an artefact of the packaging procedure?  We're considering 
>> removing it from the source that we install for users on PythonAnywhere, 
>> but wanted to check first to make sure that we're not going to break 
>> anything or cause problems for our users.
>>
>>
>> All the best,
>>
>> Giles
>> -- 
>> Giles Thomas 
>>
>> PythonAnywhere: Develop and host Python from your browser
>> 
>>
>> A product from PythonAnywhere LLP
>> 17a Clerkenwell Road, London EC1M 5RD, UK
>> VAT No.: GB 893 5643 79
>> Registered in England and Wales as company number OC378414.
>> Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK 
>>
>>
>> -- 
>> 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: web2py for windows server. IIS or Nginx?

2016-11-01 Thread Jim S
I haven't seen anything about Apache no longer supported.  Did I miss 
something?

To my knowledge, nginx is not considered 'production ready' on Windows. 
 See the first paragraph here:  http://nginx.org/en/docs/windows.html

I think Apache is the way to go. 
  
http://web2py.com/books/default/chapter/29/13/deployment-recipes#Apache-and-mod_wsgi

For me though, I've moved all of my production servers to Ubuntu with nginx 
/ uwsgi.

-Jim

On Monday, October 31, 2016 at 5:31:06 PM UTC-5, Omi Chiba wrote:
>
> I'm running production site with Apache but it sounds like we don't 
> support apache anymore...  which is one is better/easy option for me? I 
> tried IIS long time ago but didn't success... maybe it was too complicated 
> for me.
>

-- 
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: DEADLOCKs between two or more scheduler worker

2016-11-01 Thread Erwn Ltmann
Hi Niphold,

you are right: I have an extra database select in order to get the list of 
dead workers.

Usually I have four workers for example. They are static and shouldn't 
terminate often. In this case, I call only once the database in order to 
get the list of dead workers and I assume this list is always empty. In 
this case nothing is to do. The inner part of my condition will be 
important very rare and because of that I can ignore this within my runtime 
complexity calculation. In our original code we call always twice the 
question how many dead workers there are (update and delete). My suggestion 
reflects a runtime rate of 1 for 2.

Anyway, if I run the worker with my suggested extra condition I could 
eliminate the deadlock cases. This works very well because the extra 
condition. I am happy :)

Thx a lot.
Erwn

On Monday, October 31, 2016 at 3:02:42 PM UTC+1, Niphlod wrote:
>
> sorry, but it doesn't really make sense. 
> You're executing twice the same command (the call enclosed in len() and 
> the actual .delete() call), which is the counter-arg for relaxing a 
> pressured database environment. 
>
> On Monday, October 31, 2016 at 2:04:24 PM UTC+1, Erwn Ltmann wrote:
>>
>> Hi,
>>
>> thank you for your reply.
>>
>> @Pierre: MariaDB (in my case) handled deadlocks automaticly too. Good to 
>> known, I don't have to be worry about that.
>>
>> @Niphlod: I tried to beef up my database host. No effects. Another 
>> suggestion is to prevent the cases for such situation. I did it by an 
>> another extra code line in your worker function send_heartbeat:
>>
>> *if len(db.executesql(dead_workers_name)) > 0:*
>>>   db(
>>>(st.assigned_worker_name.belongs(dead_workers_name)) &
>>>(st.status == RUNNING)
>>>   ).update(assigned_worker_name='', status=QUEUED)
>>>   dead_workers.delete()
>>>
>>
>>
>>
>> Erwn
>>
>

-- 
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] .git file in gluon/packages/dal/.git

2016-11-01 Thread Richard Vézina
Do you download from Github or web2py.com? The later you shouldn't have
this issue... If you get web2py from git, it normal that you have .git/ for
web2py and for dal as dal have been extract from web2py and is a project of
it own so it is include in the web2py repository as a submodule.

Richard

On Tue, Nov 1, 2016 at 8:50 AM, Giles Thomas  wrote:

> Hi all,
>
> Someone pointed out to us that web2py has a .git file in
> gluon/packages/dal/.git.  This can cause errors when you try to initialize
> your project as a git repo.  Is there a specific reason for it to be
> there?  Or is it an artefact of the packaging procedure?  We're considering
> removing it from the source that we install for users on PythonAnywhere,
> but wanted to check first to make sure that we're not going to break
> anything or cause problems for our users.
>
>
> All the best,
>
> Giles
> --
> Giles Thomas 
>
> PythonAnywhere: Develop and host Python from your browser
> 
>
> A product from PythonAnywhere LLP
> 17a Clerkenwell Road, London EC1M 5RD, UK
> VAT No.: GB 893 5643 79
> Registered in England and Wales as company number OC378414.
> Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK
>
>
> --
> 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] .git file in gluon/packages/dal/.git

2016-11-01 Thread Giles Thomas
Hi all,

Someone pointed out to us that web2py has a .git file in 
gluon/packages/dal/.git.  This can cause errors when you try to initialize 
your project as a git repo.  Is there a specific reason for it to be there? 
 Or is it an artefact of the packaging procedure?  We're considering 
removing it from the source that we install for users on PythonAnywhere, 
but wanted to check first to make sure that we're not going to break 
anything or cause problems for our users.


All the best,

Giles
-- 
Giles Thomas 

PythonAnywhere: Develop and host Python from your browser


A product from PythonAnywhere LLP
17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79
Registered in England and Wales as company number OC378414.
Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK 


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