[web2py] Re: groups and access control

2016-10-13 Thread Marlysson Silva
Here have some methods to manage users arround groups: http://web2py.com/books/default/chapter/29/09/access-control#Authorization Specially method : auth.add_membership(group_id, user_id) That add a user to the group , then you search the group, if ( business and individual ) , then make a "i

[web2py] Re: groups and access control

2016-10-13 Thread Marlysson Silva
B) To verify user permission use this: http://web2py.com/books/default/chapter/29/09/access-control#Decorators Em terça-feira, 11 de outubro de 2016 22:54:48 UTC-3, Joe Lwe escreveu: > > Hello, > a)How can i specify automatic group assignment on creation of user based > on a particular condition

[web2py] Re: groups and access control

2016-10-13 Thread Marlysson Silva
B) To verify user permission use these decorators , using membership or permission decorators. http://web2py.com/books/default/chapter/29/09/access-control#Decorators Em terça-feira, 11 de outubro de 2016 22:54:48 UTC-3, Joe Lwe escreveu: > > Hello, > a)How can i specify automatic group assignme

[web2py] Re: separating installation from application

2016-10-13 Thread Marlysson Silva
I think ( still don't I used ) that this solved you problem: http://web2py.com/books/default/chapter/29/04/the-core?#Command-line-options Using parameter : -f to the start up web2py webserver to specify folder of your applications. Em terça-feira, 11 de outubro de 2016 22:54:40 UTC-3, Terrence

[web2py] Re: separating installation from application

2016-10-13 Thread Marlysson Silva
but why you want to separate the applications of framework ? Em terça-feira, 11 de outubro de 2016 22:54:40 UTC-3, Terrence Monroe escreveu: > > Hello, in looking over the web2py deployment chapter for Unix/Apache, it > seems that one is expected to place their applications directly in the > ap

[web2py] Re: How to create a search field(while typing display suggested pages)

2016-10-13 Thread Marlysson Silva
Explain more your problem.. Em terça-feira, 11 de outubro de 2016 22:55:46 UTC-3, sanjana chowdary escreveu: > > 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

[web2py] Securing admin doc still accurate?

2016-10-13 Thread Richard
Hello, Is this section still accurate? : http://web2py.com/books/default/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

Re: [web2py] Securing admin doc still accurate?

2016-10-13 Thread Richard Vézina
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.

Re: [web2py] Re: Why isn't WEB2PY a part of Googles summer of code? Will it be this time?

2016-10-13 Thread Mathieu Clabaut
So as not to wait forever, I did a quick extraction of the needed file in a new github project : https://github.com/matclab/pytest-web2py.wip I did not retest that everything was working in a new web2py projects. I'll do it later, but i didn't want to postpone the publishing any longer. There's a

[web2py] How requires validations OR logic

2016-10-13 Thread Federico Ferraro
How validate if upload field is IS_IMAGE or pdf document ? Try upload pdf document and validate with : Alumnos.dsalud.requires = [IS_EMPTY_OR(IS_LENGTH(1048576, 1024,error_message=error_img_size)), IS_EMPTY_OR(IS_IMAGE(extensions='png','jpeg','gif','pdf'),error_message=error_img_tipo)), IS_EMPTY

[web2py] Re: Is it possible to use compiled modules only?, without source code

2016-10-13 Thread Jaime Herrero
I'm using python 2.7 and the problem is happening just remotely in the web. But, that's a good point I'm going to double check the python version used in the server (remotely); maybe it is not compatible. BR On Tuesday, October 11, 2016 at 11:29:35 PM UTC-4, Massimo Di Pierro wrote: > > What py

[web2py] accessing auth_user username

2016-10-13 Thread Jaimee S
Hello All, Im new to web2py and I can't seem to figure out how to access the usernames of the registered users. I added username to the default login and it renders just fine. In my controller I've tried various methods such as: def xx(): item = db(db.auth_user).select(db.auth_user.username.

[web2py] Help with App memory usage

2016-10-13 Thread daniel
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 g

[web2py] Re: "Private" controller functions

2016-10-13 Thread Sheidaev Vidadi
As of 2016, here's some info from https://web2py.wordpress.com/tag/private-function/: - Making a private function is easy in web2py : - Functions defined in a model are private. - Functions that are defined in controllers and that takes arguments are private. - Functions defined

[web2py] Re: separating installation from application

2016-10-13 Thread Massimo Di Pierro
Some times I want my applications to resize somewhere else and I do not want all the apps in one subfolder. One reason is that may have a project that is larger and includes a web2py application and want the whole project under version control. The project may include a cordova app, or some othe

[web2py] Re: How requires validations OR logic

2016-10-13 Thread Anthony
IS_IMAGE(extensions='png','jpeg','gif','pdf') should be: IS_IMAGE(extensions=['png','jpeg','gif','pdf']) Anyway, if you are using IS_IMAGE only to check the file extensions, then just use IS_UPLOAD_FILENAME, which will allow you to check for all the image extensions as well as pdf in a single

[web2py] Re: accessing auth_user username

2016-10-13 Thread Anthony
On Thursday, October 13, 2016 at 9:28:47 PM UTC-4, Jaimee S wrote: > > Hello All, > > Im new to web2py and I can't seem to figure out how to access the > usernames of the registered users. I added username to the default login > and it renders just fine. In my controller I've tried various metho

[web2py] from apache to nginx

2016-10-13 Thread Massimo Di Pierro
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

[web2py] Re: Help with App memory usage

2016-10-13 Thread Anthony
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