[web2py] Re: accessing auth_user username

2016-10-14 Thread Jaimee S
Oh I see, I misunderstood how to access Auth. You're right, I'll need to read 
more of the documentation. BTW your answer worked, 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.


[web2py] datetime midnight is None - BUG?

2016-10-14 Thread Yebach
Hello

I have a datetime field in db. If I set time to 0:00  - datetime.time(0, 0) 
the if statement behaves as variable is None

Any ideas why?

-- 
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: accessing auth_user username

2016-10-14 Thread Pierre
Hi,

Using* iterselect*  is there a better way to collect usernames than to 
include auth_user in join queries. Is there an equivalent of *rows.render()* 
compatible with *iterselect* ?


-- 
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: datetime midnight is None - BUG?

2016-10-14 Thread Anthony
It does not behave as None but as False (so you can actually test to see if 
it is None). For details, see https://bugs.python.org/issue13936. At the 
end of that issue discussion, you will not it was closed with a commit that 
changed the behavior in Python 3.5 (in 3.5, time(0, 0) evaluates to True). 
If you are trying to determine if the relevant value is None, just test for 
that explicitly:

if time_or_none is not None:
do_something_with(time_or_none)

Anthony

On Friday, October 14, 2016 at 5:07:16 AM UTC-4, Yebach wrote:
>
> Hello
>
> I have a datetime field in db. If I set time to 0:00  - datetime.time(0, 
> 0) the if statement behaves as variable is None
>
> Any ideas why?
>

-- 
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: datetime midnight is None - BUG?

2016-10-14 Thread Yebach
But how to distinguish between empty entry and a value of midnight? 

In my case i have a form with start1, end1 and start2 and end2:
   if start2 exists.
  end2 cannot be empty
   if start1 and end1 and start 2 exist:
  end2 cannot be smaller then start2, except if value 0:00 is inserted

Hope it is clear

On Friday, October 14, 2016 at 1:40:42 PM UTC+2, Anthony wrote:
>
> It does not behave as None but as False (so you can actually test to see 
> if it is None). For details, see https://bugs.python.org/issue13936. At 
> the end of that issue discussion, you will not it was closed with a commit 
> that changed the behavior in Python 3.5 (in 3.5, time(0, 0) evaluates to 
> True). If you are trying to determine if the relevant value is None, just 
> test for that explicitly:
>
> if time_or_none is not None:
> do_something_with(time_or_none)
>
> Anthony
>
> On Friday, October 14, 2016 at 5:07:16 AM UTC-4, Yebach wrote:
>>
>> Hello
>>
>> I have a datetime field in db. If I set time to 0:00  - datetime.time(0, 
>> 0) the if statement behaves as variable is None
>>
>> Any ideas why?
>>
>

-- 
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: datetime midnight is None - BUG?

2016-10-14 Thread Massimo Di Pierro
Anthony answered this question but I will rephrase:

 if not start2 is None:
  end2 cannot be empty
   if not start1 is None and not end1 is None and not start 2 is None:
  end2 cannot be smaller then start2, except if value 0:00 is inserted


On Friday, 14 October 2016 06:58:17 UTC-5, Yebach wrote:
>
> But how to distinguish between empty entry and a value of midnight? 
>
> In my case i have a form with start1, end1 and start2 and end2:
>if start2 exists.
>   end2 cannot be empty
>if start1 and end1 and start 2 exist:
>   end2 cannot be smaller then start2, except if value 0:00 is inserted
>
> Hope it is clear
>
> On Friday, October 14, 2016 at 1:40:42 PM UTC+2, Anthony wrote:
>>
>> It does not behave as None but as False (so you can actually test to see 
>> if it is None). For details, see https://bugs.python.org/issue13936. At 
>> the end of that issue discussion, you will not it was closed with a commit 
>> that changed the behavior in Python 3.5 (in 3.5, time(0, 0) evaluates to 
>> True). If you are trying to determine if the relevant value is None, just 
>> test for that explicitly:
>>
>> if time_or_none is not None:
>> do_something_with(time_or_none)
>>
>> Anthony
>>
>> On Friday, October 14, 2016 at 5:07:16 AM UTC-4, Yebach wrote:
>>>
>>> Hello
>>>
>>> I have a datetime field in db. If I set time to 0:00  - datetime.time(0, 
>>> 0) the if statement behaves as variable is None
>>>
>>> Any ideas why?
>>>
>>

-- 
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: Help with App memory usage

2016-10-14 Thread Paolo Valleri
Which driver are you using for postgres? Are you using cache in models?
Try to figure out if there are controllers using more memory than others.


On Friday, October 14, 2016 at 4:03:20 AM UTC+2, Anthony wrote:
>
> That's a lot of code to review. You're probably going to have to do some 
> digging and narrow it down for us. I did see one problem, though:
>
> class IS_BARCODE_AVAILABLE(object): 
> T = current.T
>
> You can't use current in a class attribute (for the same reason it can't 
> be used at the top level of a module -- it's value will be fixed at the 
> first import, though it is a thread-local object that should change with 
> every request).
>
> Anthony
>
> On Thursday, October 13, 2016 at 9:28:44 PM UTC-4, dan...@betanetweb.com 
>  wrote:
>>
>> Hello im an developing an opensource POS (link 
>> ) using web2py, 
>> everything is fine except that on my development environment and in a 
>> production server, my app memory usage grows without limits, it does not 
>> crash the server however sometimes i get python MemoryError's, things like 
>> error: 
>> unpack_from requires a buffer of at least 5 bytes 
>>  or postgres memory errors 
>> in the production server, in my development environment i see the memory 
>> grow by 3 to 6 MB for every request, i dont know what is causing this 
>> behavior, i am not using caching. any help appreciated.
>>
>

-- 
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] Referencing another table

2016-10-14 Thread James Booth
Hey guys,

Excuse me if I'm missing something (or a lot), but I'm pretty experienced 
with web2py.

I have the following defined in my model:

db.define_table('bursary_users',
> Field('forename', type='string', requires=IS_NOT_EMPTY()),
> Field('surname', type='string', requires=IS_NOT_EMPTY()),
> Field('studentId', type='string', requires=IS_NOT_EMPTY(), 
> unique=True),
> Field('barcode', type='string', requires=IS_NOT_EMPTY(), 
> unique=True),
> Field('email', type='string', requires=IS_EMAIL(), 
> unique=True),
> Field('bursary', requires=IS_IN_SET(['Free school 
> meals','Bursary','Disabled'])),
> Field('notes', type='text'),
> format='%(studentId)s'
> )
> db.define_table('bursary_entries',
> Field('barcode', 'reference bursary_users', requires = 
> [IS_IN_DB(db, 'bursary_users.barcode')]),
> Field('entry_date', type='datetime', default=request.now, 
> readable=False, writable=False),
> format='%(barcode)s'
> )


When I use the SQLFORM on a page, I can enter a barcode and it validates it 
(Fails if not in bursary_users, pass if it is). However, when I come to 
check the database, I'm getting a '0' (Althought it is hyperlinked to 
nothing) for the barcode value and a correct value for the entry_date.

Any ideas why this is happening?

Kind regards,
James. 

-- 
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] Referencing another table

2016-10-14 Thread James Booth
And that was meant to be INexperienced with web2py. It's been a long week.

-- 
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] nested loops in views

2016-10-14 Thread Pierre
Hi,

why is this not working ?

{{extend 'layout.html'}}
{{ d={'a':[1,2],'b':[3,4]} }}

{{for k,v in d.items():}}{{=k}}{{pass}}
{{for vi in v:}}{{=vi}}{{pass}}



-- 
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] Securing admin doc still accurate?

2016-10-14 Thread Richard Vézina
We could update this section by adding a suggestion... Someone can just
clone it nginx config (virtual server) for port 80 and set "listen
127.0.0.1:8002;" instead of "listen 80;" and now you can access the admin
app as long as you made the ssh port foward and had create the
parameters_8002.py file...

Richard

On Thu, Oct 13, 2016 at 3:52 PM, Richard Vézina  wrote:

> Nevermind, I figure it out... I had create a parameters_443.py file in my
> restored system and didn't realize that I actually need to not create it
> and create 8002 instead...
>
> :)
>
> Richard
>
> On Thu, Oct 13, 2016 at 3:44 PM, Richard 
> wrote:
>
>> Hello,
>>
>> Is this section still accurate? : http://web2py.com/books/defa
>> ult/chapter/29/13/deployment-recipes#Securing-sessions-and-admin
>>
>>
>> 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] web2py + cordova + APIs

2016-10-14 Thread Massimo Di Pierro
So I made this:

https://github.com/mdipierro/web2py-cordova

Anyone is brave enough to try make a sample app that uses it and runs with 
APIMaker (https://github.com/mdipierro/collection2)?

Massimo

 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Help with App memory usage

2016-10-14 Thread daniel
anthony, thats a good point did not notice that, thanks

El jueves, 13 de octubre de 2016, 21:03:20 (UTC-5), Anthony escribió:
>
> That's a lot of code to review. You're probably going to have to do some 
> digging and narrow it down for us. I did see one problem, though:
>
> class IS_BARCODE_AVAILABLE(object): 
> T = current.T
>
> You can't use current in a class attribute (for the same reason it can't 
> be used at the top level of a module -- it's value will be fixed at the 
> first import, though it is a thread-local object that should change with 
> every request).
>
> Anthony
>
> On Thursday, October 13, 2016 at 9:28:44 PM UTC-4, dan...@betanetweb.com 
>  wrote:
>>
>> Hello im an developing an opensource POS (link 
>> ) using web2py, 
>> everything is fine except that on my development environment and in a 
>> production server, my app memory usage grows without limits, it does not 
>> crash the server however sometimes i get python MemoryError's, things like 
>> error: 
>> unpack_from requires a buffer of at least 5 bytes 
>>  or postgres memory errors 
>> in the production server, in my development environment i see the memory 
>> grow by 3 to 6 MB for every request, i dont know what is causing this 
>> behavior, i am not using caching. any help appreciated.
>>
>

-- 
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: Help with App memory usage

2016-10-14 Thread daniel
On my development environment i am using psycopg2 in production pg8000, and 
im not using db cache anywhere


El viernes, 14 de octubre de 2016, 10:07:43 (UTC-5), Paolo Valleri escribió:
>
> Which driver are you using for postgres? Are you using cache in models?
> Try to figure out if there are controllers using more memory than others.
>
>
> On Friday, October 14, 2016 at 4:03:20 AM UTC+2, Anthony wrote:
>>
>> That's a lot of code to review. You're probably going to have to do some 
>> digging and narrow it down for us. I did see one problem, though:
>>
>> class IS_BARCODE_AVAILABLE(object): 
>> T = current.T
>>
>> You can't use current in a class attribute (for the same reason it can't 
>> be used at the top level of a module -- it's value will be fixed at the 
>> first import, though it is a thread-local object that should change with 
>> every request).
>>
>> Anthony
>>
>> On Thursday, October 13, 2016 at 9:28:44 PM UTC-4, dan...@betanetweb.com 
>> wrote:
>>>
>>> Hello im an developing an opensource POS (link 
>>> ) using web2py, 
>>> everything is fine except that on my development environment and in a 
>>> production server, my app memory usage grows without limits, it does not 
>>> crash the server however sometimes i get python MemoryError's, things like 
>>> error: 
>>> unpack_from requires a buffer of at least 5 bytes 
>>>  or postgres memory errors 
>>> in the production server, in my development environment i see the memory 
>>> grow by 3 to 6 MB for every request, i dont know what is causing this 
>>> behavior, i am not using caching. any help appreciated.
>>>
>>

-- 
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: nested loops in views

2016-10-14 Thread Val K
just keep in mind simple rule:  {{pass}} == anti-indent 

On Friday, October 14, 2016 at 7:24:11 PM UTC+3, Pierre wrote:
>
> Hi,
>
> why is this not working ?
>
> {{extend 'layout.html'}}
> {{ d={'a':[1,2],'b':[3,4]} }}
> 
> {{for k,v in d.items():}}{{=k}}{{pass}}
> {{for vi in v:}}{{=vi}}{{pass}}
> 
>
>
>

-- 
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: Referencing another table

2016-10-14 Thread Val K

'reference bursary_users' and requires = [IS_IN_DB(db, 'bursary_users
.barcode')]  - I think, that  it's mutually exclusive requirements 
'reference bursary_users' == requires = IS_IN_DB(db, 'bursary_users.*id*')







On Friday, October 14, 2016 at 6:21:38 PM UTC+3, James Booth wrote:
>
> Hey guys,
>
> Excuse me if I'm missing something (or a lot), but I'm pretty experienced 
> with web2py.
>
> I have the following defined in my model:
>
> db.define_table('bursary_users',
>> Field('forename', type='string', requires=IS_NOT_EMPTY()),
>> Field('surname', type='string', requires=IS_NOT_EMPTY()),
>> Field('studentId', type='string', 
>> requires=IS_NOT_EMPTY(), unique=True),
>> Field('barcode', type='string', requires=IS_NOT_EMPTY(), 
>> unique=True),
>> Field('email', type='string', requires=IS_EMAIL(), 
>> unique=True),
>> Field('bursary', requires=IS_IN_SET(['Free school 
>> meals','Bursary','Disabled'])),
>> Field('notes', type='text'),
>> format='%(studentId)s'
>> )
>> db.define_table('bursary_entries',
>> Field('barcode', 'reference bursary_users', requires = 
>> [IS_IN_DB(db, 'bursary_users.barcode')]),
>> Field('entry_date', type='datetime', default=request.now, 
>> readable=False, writable=False),
>> format='%(barcode)s'
>> )
>
>
> When I use the SQLFORM on a page, I can enter a barcode and it validates 
> it (Fails if not in bursary_users, pass if it is). However, when I come to 
> check the database, I'm getting a '0' (Althought it is hyperlinked to 
> nothing) for the barcode value and a correct value for the entry_date.
>
> Any ideas why this is happening?
>
> Kind regards,
> James. 
>

-- 
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: nested loops in views

2016-10-14 Thread Pierre
I dedented it with an "air extractor"


{{extend 'layout.html'}}
{{ d={'a':[1,2],'b':[3,4]} }}

{{for k,v in d.items():}}{{=k}}
{{for vi in v:}}{{=vi}}{{pass}}{{pass}}


-- 
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: from apache to nginx

2016-10-14 Thread Niphlod
in-process I think it's a no-go, as nginx just doesn't know how to 
interpret python in the same process as apache does.
http_auth_request together with http_access though can help, as you should 
be able to code an handler that returns either 200 or 403 instead of 
true/false . 
Check http://nginx.org/en/docs/http/ngx_http_auth_request_module.html

On Friday, October 14, 2016 at 3:50:05 AM UTC+2, Massimo Di Pierro wrote:
>
> Does anybody here know how port these links to Nginx?
>
>
> 
>
>ScriptAlias /bin/ "/whatever/cgi-bin/"
>
>
>
>  WSGIAccessScript  /whatever/access.wsgi
>
>
>
> 
>
>
> They basically say that some URLs /whatever/cgi-bin point to legacy 
> cgi-bin scripts but before executing the scripts it should pass the 
> environment vars and the header info to the access.wsgi python script to 
> ask for access permission. This allows me to have a web2py app that links 
> the legacy scripts and because on the same domain, the client passes the 
> session cookie, the access.wsgi code retrieves the session cookie and check 
> permissions.
>
>
> The script looks like this:
>
>
> def allow_access(environ,host):
>
>  # get credentials from environ, ask web2py is user is authorized and 
> return true/false
>
>
> I am happy to rewrite the script but the question is whether nginx 
> provides an equivalent mechanism. I cannot find one.
>
>
> Massimo
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Help with App memory usage

2016-10-14 Thread Niphlod
try using psycopg2 on the prod env too. pg8000 (especially the one shipped 
with web2py in the latest stable, which was quite old) can exhibit memory 
leaks (or, for better saying, a premature optimization resulted in an 
"evil" usage of the memory for the way web2py uses pg8000).

On Friday, October 14, 2016 at 8:21:21 PM UTC+2, dan...@betanetweb.com 
wrote:
>
> On my development environment i am using psycopg2 in production pg8000, 
> and im not using db cache anywhere
>
>
> El viernes, 14 de octubre de 2016, 10:07:43 (UTC-5), Paolo Valleri 
> escribió:
>>
>> Which driver are you using for postgres? Are you using cache in models?
>> Try to figure out if there are controllers using more memory than others.
>>
>>
>> On Friday, October 14, 2016 at 4:03:20 AM UTC+2, Anthony wrote:
>>>
>>> That's a lot of code to review. You're probably going to have to do some 
>>> digging and narrow it down for us. I did see one problem, though:
>>>
>>> class IS_BARCODE_AVAILABLE(object): 
>>> T = current.T
>>>
>>> You can't use current in a class attribute (for the same reason it can't 
>>> be used at the top level of a module -- it's value will be fixed at the 
>>> first import, though it is a thread-local object that should change with 
>>> every request).
>>>
>>> Anthony
>>>
>>> On Thursday, October 13, 2016 at 9:28:44 PM UTC-4, dan...@betanetweb.com 
>>> wrote:

 Hello im an developing an opensource POS (link 
 ) using web2py, 
 everything is fine except that on my development environment and in a 
 production server, my app memory usage grows without limits, it does not 
 crash the server however sometimes i get python MemoryError's, things like 
 error: 
 unpack_from requires a buffer of at least 5 bytes 
  or postgres memory 
 errors in the production server, in my development environment i see the 
 memory grow by 3 to 6 MB for every request, i dont know what is causing 
 this behavior, i am not using caching. any help appreciated.

>>>

-- 
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 create a search field(while typing display suggested pages)

2016-10-14 Thread Val K


web2py has SQLFORM.widgets.autocomplete, but you  can try chosen.js 



On Wednesday, October 12, 2016 at 4:55:46 AM UTC+3, sanjana chowdary wrote:
>
> please help 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: web2py + cordova + APIs

2016-10-14 Thread samuel bonill
Hi massimo, I like a lot APPMaker, i would like collaborate in this 
project... i'm thinking implements authentication on token based 
 authentication

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (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 remove column header

2016-10-14 Thread Alex Glaros
how to supress field header

   {{taxonomy_set = ['super_city_3', 'super_city_2', 'super_city_1', 
'city', 'sub_city_1', 'sub_city_2', 'sub_city_3']}}
{{for r in taxonomy_set:}}
{{db.geo_political_generic_fields_lookup.taxonomy_column_fk.label = 
''}} #does not work
{{geoFieldName = 
db((db.geo_political_generic_fields_lookup.country_fk == specificCountryID) 
& (db.geo_political_generic_fields_lookup.generic_geo_political_field_name 
== r)).select(db.geo_political_generic_fields_lookup.taxonomy_column_fk)}}
{{=r }}   translates to: {{=geoFieldName}}
{{pass}}

PRODUCES

*super_city_3* translates to:
geo_political_generic_fields_lookup.taxonomy_column_fk  # want to remove 
this header
Federal US government 
*super_city_2* translates to:
geo_political_generic_fields_lookup.taxonomy_column_fk # want to remove 
this header 
State
*super_city_1* translates to:
geo_political_generic_fields_lookup.taxonomy_column_fk # want to remove 
this header
County

thanks,

Alex Glaros

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