[web2py] Re: New feature in trunk. bulk_register/invite

2015-10-30 Thread James Burke
 

Thank you Massimo.


Also I just noticed the subject line variable line 1255:

bulk_invite_subject='Invitation to join%(site)s’,


Should be:

bulk_invite_subject='Invitation to join %(site)s’,


And if I may suggest exposing bulk_register_enabled in the welcome app 
models/dp.py file to alert users to its existence. Since there is currently 
no documentation for this feature yet.


## set True or auth.has_membership(role='whatever') to enable 
/app/default/user/bulk_register
auth.settings.bulk_register_enabled = False

-- 
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: Re-use user's login and password to bind with LDAP server

2015-10-30 Thread Jonathan Renon
Thank You Anthony, 
I think your solution is what I'm looking for, I don't want to use a 
service account ( for tracing and maintainability reason) since the phase 2 
that add editing capabilities will provide mostly for admin tasks and we 
want to have a trace that let us identify the user that did this 
modifications
Thanks Richard, I mainly wanted to know how to access those values from 
outside the auth module itself.
Thanks Niphlod for your time. I read the auth ldap module and I knew it was 
using python-ldap, I'm not familiar with web2py and I couldn't identify the 
recommend way to access either user information provided during login or 
the connection created while trying to authenticate the user. I never tried 
to extract those directly from ldap.
I'll mark this post as complete on Anthony's answer, thanks for your help.

-- 
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 get user to make boolean = False?

2015-10-30 Thread Alex Glaros
Users approve or disapprove items in selection of records where 
boolean_field == None.  "None" is how I know record needs user's attention.

If they click checkbox, boolean field value correctly becomes True

but how do you get users to click twice, once to get rid of None, the 
second time to get rid of True, so the resulting value is False?

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.


[web2py] Re: how to get user to make boolean = False?

2015-10-30 Thread Alex Glaros
but what about moderator just looks in editor mode but doesn't change 
anything. The default will remain False and moderator ID will appear in 
moderator field leaving incorrect impression that decision was made.

seems like only way to handle this is to have boolean default as None and 
have two virtual buttons alter value to True or False

-- 
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] Using web2py's template parser in an interesting way.

2015-10-30 Thread Encompass solutions

I have been trying to understand web2py's builtins for some fun features I 
am working on.
Basically I am trying to make a renderer for svg files and want to convert 
escaped charactors like quot; back to there actual charactors.
This would encable me to create SVG's that can use the templating that is 
found in web2py.
Think of the following:
1: Designer uploads svg to site with python controller file to web2py site 
I have made.
2: Call is made to render the SVG as a PNG
3: SVG is checked for the delimiter tags
4: we convert the quot; tags back to originals
5: we then send the newly created content to the parse and use the 
designers controller as the controller for that view.
6: Send the newly rendered template content to a headless inskape 
application to render it as a png
7: Stream it to the view.

3 and 4 are the parts I need the help on.  All other parts work.
Now the cheep way is to go in and try to make my own tag finder for {{}} 
tags and then find the escaped characters from there, but I wonder if I 
could use web2py's built in functionality in gluon/template.py
Any thought here?

I hacked to gether some code here:
def render_app(context, template_file):
"""
Backend feature that renders the view and save it to a location.
The location is returned
"""
from subprocess import call
import os
template_file = os.path.join(request.folder, 'uploads', template_file)
#Need to process the svg and remove any charactor encoding and put it 
back to normal for the final rendering.

prepared_template = prepare_template(template_file)
rendered_svg = os.path.join(request.folder, 'private', 'temp_svg.svg')
temp_image = os.path.join(request.folder, 'static', 'temp_image.png')

final_svg = response.render(template_file, context)

svg_file = open(rendered_svg, "w")
svg_file.write(final_svg)
svg_file.close()

call(['inkscape', '--export-png='+temp_image, rendered_svg])  

return temp_image


-- 
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 redirect to a incorrect page

2015-10-30 Thread Yibing Liu
I am learning web2py. I found a redirect error between 2 very simple 
actions. This application which I simple modify from the web2py manual is 
just used to help me to understand the controlflow,request.args and 
request.vars of web2py. Here is the code in my default controller.

def index():
redirect(URL("first",args=1))
def first():
return dict()
def second():
return dict()

Then I create the first.html and second.html

first.html is

What is your name?
 
 

second.html is

Hello {{=request.vars.visitor_name}}

I input something to the form in the first.html,but when I press the submit 
button it doesn't redirect to the "second" action. And I found something 
wrong in the url of the browser
http://127.0.0.1:8000/welcome/default/first/second?visitor_name=zhangsan

I am very confused and do many test. I change the code in the index

from

def index():
redirect(URL("first",args=1))


to

def index():
redirect(URL("first"))

And the redirect make sense. I am vary confused about this. Is this a bug 
in web2py or I misunderstand the controlflow of web2py?


-- 
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] sqlfor grid uneditable lets edit once in form view

2015-10-30 Thread Yebach
Hello

I have a view that shows two grids. One is editable one not. Everything ok.
The uneditable has an option view, so user can see all the parameters. Once 
in form view there is an edit button and he can edit the values. I want to 
prevent that from happening. How can I do that.


This is my code

grid_config200  is the grid that should not be editable in view form


@auth.requires_login()
def config():
user = auth.user_id
org = db(db.auth_user.id == 
user).select(db.auth_user.organization)[0]["organization"]
configSetting200 = ((db.config.co_organisation == org) & 
(db.config.co_access_level < 200) )
configSetting200Plus = ((db.config.co_organisation == org) & 
(db.config.co_access_level >= 200))
fields_config =(
db.config.co_code,
db.config.co_value,
db.config.co_note
)
db.config.co_organisation.readable = db.config.co_organisation.writable = 
False
db.config.co_access_level.readable = db.config.co_access_level.writable = 
False
db.config.co_area.writable = False
db.config.co_code.writable = False
# db.config.co_area.readable = db.config.co_area.writable = False
db.config.co_value.widget = SQLFORM.widgets.string.widget
db.config.co_area.widget = SQLFORM.widgets.string.widget
db.config.co_note.widget = SQLFORM.widgets.string.widget
#UNEDITABLE form and data
grid_config200 = SQLFORM.grid(query=configSetting200, 
fields=fields_config ,  searchable=False,create=False,
deletable=False, editable=False, paginate=25, buttons_placement = 'right',
user_signature=False,
maxtextlengths = {'config.co_note' : 256}, 
showbuttontext = False,formname = 'config200Table',
formargs=dict(message_onsuccess=T('Record updated'),
message_onfailure=T('Form has errors')),
#oncreate=myfunction,
ui = dict(widget='',
 header='',
 content='',
 default='',
 cornerall='',
 cornertop='',
 cornerbottom='',
 button='button btn btn-default',
 buttontext='buttontext button',
 buttonadd='icon plus icon-plus glyphicon glyphicon-plus',
 buttonback='icon leftarrow icon-arrow-left glyphicon 
glyphicon-arrow-left',
 buttonexport='icon downarrow icon-download glyphicon 
glyphicon-download',
 buttondelete='icon trash icon-trash glyphicon glyphicon-trash',
 buttonedit='icon pen icon-pencil glyphicon glyphicon-pencil',
 buttontable='icon rightarrow icon-arrow-right glyphicon 
glyphicon-arrow-right',
 buttonview='icon magnifier icon-zoom-in glyphicon 
glyphicon-eye-open',
 buttonvidov = 'icon glyphicon glyphicon-euro' 
 ),
exportclasses  = dict(csv_with_hidden_cols=False, html = False, tsv = 
False, tsv_with_hidden_cols=False, json = False))
grid_config200Plus = SQLFORM.grid(query=configSetting200Plus, 
fields=fields_config ,  searchable=False,create=False,
deletable=False, editable=True, paginate=25, buttons_placement = 'right',
user_signature=False,
maxtextlengths = {'config.co_note' : 256}, 
showbuttontext = False,formname = 'config200PlusTable',
formargs=dict(message_onsuccess=T('Record updated'),
message_onfailure=T('Form has errors')),
#oncreate=myfunction,
ui = dict(widget='',
 header='',
 content='',
 default='',
 cornerall='',
 cornertop='',
 cornerbottom='',
 button='button btn btn-default',
 buttontext='buttontext button',
 buttonadd='icon plus icon-plus glyphicon glyphicon-plus',
 buttonback='icon leftarrow icon-arrow-left glyphicon 
glyphicon-arrow-left',
 buttonexport='icon downarrow icon-download glyphicon 
glyphicon-download',
 buttondelete='icon trash icon-trash glyphicon glyphicon-trash',
 buttonedit='icon pen icon-pencil glyphicon glyphicon-pencil',
 buttontable='icon rightarrow icon-arrow-right glyphicon 
glyphicon-arrow-right',
 buttonview='icon magnifier icon-zoom-in glyphicon 
glyphicon-eye-open',
 buttonvidov = 'icon glyphicon glyphicon-euro' 
 ),
exportclasses  = dict(csv_with_hidden_cols=False, html = False, tsv = 
False, tsv_with_hidden_cols=False, json = False))

return dict(grid_config200 = grid_config200, grid_config200Plus = 
grid_config200Plus)

-- 
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 get user to make boolean = False?

2015-10-30 Thread Alex Glaros
an commentAuthorizedBy field is needed anyway, so I'll use an empty value 
for that to be the indicator of whether it get to moderator's attention, 
then all I need to do is make False the default value of  the boolean

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


[web2py] Re: Problem with combination of SQLForm.grid + LEFT JOIN + Computed Fields

2015-10-30 Thread Yebach
I have quite similar problem, except when I use row.table_name.field_name, 
then my edit view stops working

Any suggestions??

here is my code



@auth.requires_login() 
def workers_skills():
user = auth.user_id
org = db(db.auth_user.id == 
user).select(db.auth_user.organization)[0]["organization"]
db.workers_skills.ws_organisation.default = org
query=((db.workers_skills.ws_organisation == org) & 
(db.workers_skills.ws_status == 1))
# select(db.workers_skills.ws_priority,
# db.workers_skills.ws_worker,
# db.workers.w_first_name,
# db.workers.w_last_name,
# db.skills.sk_name,
query_inactive = db((db.workers_skills.ws_organisation == org) & 
(db.workers_skills.ws_status == 100))\
.select(
db.workers_skills.id, db.workers.w_nick_name, db.skills.sk_name, 
db.workers_skills.ws_status, db.workers_skills.ws_priority,
join=[db.workers.on(db.workers.id==db.workers_skills.ws_skill),
db.skills.on(db.skills.id==db.workers_skills.ws_skill)],
orderby=db.workers_skills.ws_worker).as_list()
fields = (db.workers_skills.id,
db.workers.w_first_name,
db.workers.w_last_name,
db.skills.sk_name,
db.workers_skills.ws_priority
)
#Let's specify a default sort order on date_of_birth column in grid
default_sort_order=[db.workers.w_last_name]
db.workers_skills.ws_organisation.readable = 
db.workers_skills.ws_organisation.writable = False
db.workers_skills.ws_worker.requires= IS_IN_DB(db(db.workers.w_organisation 
== org),db.workers.id,'%(w_last_name)s %(w_first_name)s',zero=T('Select 
worker'))
db.workers_skills.ws_skill.requires= IS_IN_DB(db(db.skills.sk_organisation 
== org),db.skills.id,'%(sk_name)s',zero=T('Select skill'))


#Nardiš polje bl text like :) WIU WIU
db.workers_skills.ws_priority.widget = SQLFORM.widgets.integer.widget
#VAlidatorji
#db.workers.w_status.requires = IS_IN_DB(db,db.status.s_code) #tega sm rešu 
v db.py
# db.workers_skills.ws_worker.requires = 
[IS_NOT_EMPTY(error_message=T('Missing worker name'))]
# db.workers_skills.ws_skill.requires = 
[IS_NOT_EMPTY(error_message=T('Missing skill name'))]
db.workers_skills.ws_priority.requires = 
[IS_NOT_EMPTY(error_message=T('Missing priority level'))]
links = [lambda row: A('',_class='glyphicon glyphicon 
glyphicon-remove-sign',
callback=URL('settings','deactivate',vars=dict(table='workers_skills',field 
= 'ws_status'
,value = row.workers_skills.id )))]
grid_workersskills= 
SQLFORM.grid(query=query,left=[db.workers.on(db.workers_skills.ws_worker==db.workers.id),
  db.skills.on(db.workers_skills.ws_skill==db.skills.id)], 
fields=fields,  searchable=False, 
orderby=[db.workers.w_nick_name],create=True,
deletable=False, editable=True, paginate=50, buttons_placement = 'right',
showbuttontext = False,
links = links, 
#oncreate=myfunction,
ui = dict(widget='',
 header='',
 content='',
 default='',
 cornerall='',
 cornertop='',
 cornerbottom='',
 button='button btn btn-default',
 buttontext='buttontext button',
 buttonadd='icon plus icon-plus glyphicon glyphicon-plus',
 buttonback='icon leftarrow icon-arrow-left glyphicon 
glyphicon-arrow-left',
 buttonexport='icon downarrow icon-download glyphicon 
glyphicon-download',
 buttondelete='icon trash icon-trash glyphicon glyphicon-trash',
 buttonedit='icon pen icon-pencil glyphicon glyphicon-pencil',
 buttontable='icon rightarrow icon-arrow-right glyphicon 
glyphicon-arrow-right',
 buttonview='icon magnifier icon-zoom-in glyphicon 
glyphicon-eye-open',
 ),
exportclasses  = dict(csv_with_hidden_cols=False, html = False, tsv = 
False, tsv_with_hidden_cols=False, json = False))
return dict(grid_workersskills=grid_workersskills, 
query_inactive=query_inactive)


On Tuesday, October 29, 2013 at 4:43:43 PM UTC+8, hiro wrote:
>
> Having the same problem, thank you for the info. The problem for me is 
> that I can get either the left join to work using 
> row.table_name.field_name, or the simple view to work by using 
> row.field_name. Is there anyway to define a represent-function to work 
> with both.
>>
>>

-- 
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 get user to make boolean = False?

2015-10-30 Thread Alex Glaros
or maybe assign it as False on record creation, then function knows that 
record hasn't been reviewed by using empty "modified_by" field as indicator

-- 
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: SQLform grid custom function for delete

2015-10-30 Thread Vid Ogris
My whole function


@auth.requires_login()
def workers_skills():
user = auth.user_id
org = db(db.auth_user.id ==
user).select(db.auth_user.organization)[0]["organization"]
db.workers_skills.ws_organisation.default = org
query=((db.workers_skills.ws_organisation == org) &
(db.workers_skills.ws_status == 1))
# select(db.workers_skills.ws_priority,
# db.workers_skills.ws_worker,
# db.workers.w_first_name,
# db.workers.w_last_name,
# db.skills.sk_name,
query_inactive = db((db.workers_skills.ws_organisation == org) &
(db.workers_skills.ws_status == 100))\
.select(
db.workers_skills.id, db.workers.w_nick_name, db.skills.sk_name,
db.workers_skills.ws_status, db.workers_skills.ws_priority,
join=[db.workers.on(db.workers.id==db.workers_skills.ws_skill),
db.skills.on(db.skills.id==db.workers_skills.ws_skill)],
orderby=db.workers_skills.ws_worker).as_list()
fields = (db.workers_skills.id,
db.workers.w_first_name,
db.workers.w_last_name,
db.skills.sk_name,
db.workers_skills.ws_priority
)
#Let's specify a default sort order on date_of_birth column in grid
default_sort_order=[db.workers.w_last_name]
db.workers_skills.ws_organisation.readable =
db.workers_skills.ws_organisation.writable = False
db.workers_skills.ws_worker.requires= IS_IN_DB(db(db.workers.w_organisation
== org),db.workers.id,'%(w_last_name)s %(w_first_name)s',zero=T('Select
worker'))
db.workers_skills.ws_skill.requires= IS_IN_DB(db(db.skills.sk_organisation
== org),db.skills.id,'%(sk_name)s',zero=T('Select skill'))


#Nardiš polje bl text like :) WIU WIU
db.workers_skills.ws_priority.widget = SQLFORM.widgets.integer.widget
#VAlidatorji
#db.workers.w_status.requires = IS_IN_DB(db,db.status.s_code) #tega sm rešu
v db.py
# db.workers_skills.ws_worker.requires =
[IS_NOT_EMPTY(error_message=T('Missing worker name'))]
# db.workers_skills.ws_skill.requires =
[IS_NOT_EMPTY(error_message=T('Missing skill name'))]
db.workers_skills.ws_priority.requires =
[IS_NOT_EMPTY(error_message=T('Missing priority level'))]
links = [lambda row: A('',_class='glyphicon glyphicon
glyphicon-remove-sign',
callback=URL('settings','deactivate',vars=dict(table='workers_skills',field
= 'ws_status'
,value = row.workers_skills.id )))]
grid_workersskills=
SQLFORM.grid(query=query,left=[db.workers.on(db.workers_skills.ws_worker==
db.workers.id),
  db.skills.on(db.workers_skills.ws_skill==db.skills.id)],
fields=fields,  searchable=False,
orderby=[db.workers.w_nick_name],create=True,
deletable=False, editable=True, paginate=50, buttons_placement = 'right',
showbuttontext = False,
links = links,
#oncreate=myfunction,
ui = dict(widget='',
 header='',
 content='',
 default='',
 cornerall='',
 cornertop='',
 cornerbottom='',
 button='button btn btn-default',
 buttontext='buttontext button',
 buttonadd='icon plus icon-plus glyphicon glyphicon-plus',
 buttonback='icon leftarrow icon-arrow-left glyphicon
glyphicon-arrow-left',
 buttonexport='icon downarrow icon-download glyphicon
glyphicon-download',
 buttondelete='icon trash icon-trash glyphicon glyphicon-trash',
 buttonedit='icon pen icon-pencil glyphicon glyphicon-pencil',
 buttontable='icon rightarrow icon-arrow-right glyphicon
glyphicon-arrow-right',
 buttonview='icon magnifier icon-zoom-in glyphicon
glyphicon-eye-open',
 ),
exportclasses  = dict(csv_with_hidden_cols=False, html = False, tsv =
False, tsv_with_hidden_cols=False, json = False))
return dict(grid_workersskills=grid_workersskills,
query_inactive=query_inactive)

2015-10-31 11:03 GMT+08:00 Vid Ogris :

> The thing is IF I put links = [lambda row: A('',_class='glyphicon
> glyphicon glyphicon-remove-sign',
> callback=URL('settings','deactivate',vars=dict(table='workers_skills',field
> = 'ws_status'
> ,value = row.workers_skills.id )))]
>
> Then my function for "deleting" record works but when I want to go to edit
> I get an error. If I put row.id then the oposite
>
> 2015-10-30 21:10 GMT+08:00 Niphlod :
>
>> is your "id" in the grid ? id it's not in the fields then it's not
>> accessible
>>
>> On Friday, October 30, 2015 at 2:41:41 AM UTC+1, Yebach wrote:
>>>
>>> why am I  getting an  error AttributeError: 'Row' object has no
>>> attribute 'id'
>>>
>>> when I try to set links = [lambda row: A('',_class='glyphicon glyphicon
>>> glyphicon-remove-sign',
>>> callback=URL('settings','deactivate',vars=dict(table='workers_skills',field
>>> = 'ws_status'
>>> ,value = row.id )))],
>>>
>>>
>>>
>>>
>>>
>>>
>>> 2015-09-23 22:44 GMT+08:00 A3 :
>>>
 explained here:

 https://groups.google.com/d/msg/web2py/asCPsD9UGb8/ksmYX0UjBx0J

 Op dinsdag 22 september 2015 04:22:39 UTC+2 schreef Yebach:
>
> Ok thanx. This worked.
>
> One more question. My SQLFORM.grid is not refreshed after callback. So
> record stays there. HOw to do a grid refresh?
>
> 2015-09-19 20:32 

Re: [web2py] Re: SQLform grid custom function for delete

2015-10-30 Thread Vid Ogris
The thing is IF I put links = [lambda row: A('',_class='glyphicon glyphicon
glyphicon-remove-sign',
callback=URL('settings','deactivate',vars=dict(table='workers_skills',field
= 'ws_status'
,value = row.workers_skills.id )))]

Then my function for "deleting" record works but when I want to go to edit
I get an error. If I put row.id then the oposite

2015-10-30 21:10 GMT+08:00 Niphlod :

> is your "id" in the grid ? id it's not in the fields then it's not
> accessible
>
> On Friday, October 30, 2015 at 2:41:41 AM UTC+1, Yebach wrote:
>>
>> why am I  getting an  error AttributeError: 'Row' object has no
>> attribute 'id'
>>
>> when I try to set links = [lambda row: A('',_class='glyphicon glyphicon
>> glyphicon-remove-sign',
>> callback=URL('settings','deactivate',vars=dict(table='workers_skills',field
>> = 'ws_status'
>> ,value = row.id )))],
>>
>>
>>
>>
>>
>>
>> 2015-09-23 22:44 GMT+08:00 A3 :
>>
>>> explained here:
>>>
>>> https://groups.google.com/d/msg/web2py/asCPsD9UGb8/ksmYX0UjBx0J
>>>
>>> Op dinsdag 22 september 2015 04:22:39 UTC+2 schreef Yebach:

 Ok thanx. This worked.

 One more question. My SQLFORM.grid is not refreshed after callback. So
 record stays there. HOw to do a grid refresh?

 2015-09-19 20:32 GMT+08:00 Anthony :

> On Saturday, September 19, 2015 at 4:18:49 AM UTC-4, Yebach wrote:
>>
>> Hello
>>
>> So I managed to put link and create it but now I have a probelm
>> getting the id of the record I want to deal with
>>
>> links = [lambda row: A('',_class='glyphicon glyphicon
>> glyphicon-remove-sign',
>> callback=URL('settings','deactivate',vars=dict(table='skills',field =
>> 'sk_status', value = form.vars.id )))]
>>
>
> If you want the id of the record in a given row of the table, then
> instead of value=form.vars.id, it should be value=row.id.
>
>
>> @auth.requires_login() def deactivate(): ##Aktiviramo delavca ko user
>> klikne na activate user = auth.user_id org = db(db.auth_user.id ==
>> user).select(db.auth_user.organization)[0]["organization"] #Worker je id
>> zaposlenenga ki ga damo v aktiven id = request.vars["id"]
>>
>
> In the URLs generated in the grid, you used the variable name "value",
> yet here you are looking for the variable name "id". The above line should
> be:
>
> id = request.vars.value
>
> Or you can change the URLs to use "id" as the variable name.
>
> Anthony
>
>> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/3T1Qaf39wJg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



 --
 Lep pozdrav

 Vid Ogris


 --
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/web2py/3T1Qaf39wJg/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Lep pozdrav
>>
>> Vid Ogris
>>
>>
>> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/3T1Qaf39wJg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Lep pozdrav

Vid Ogris

-- 
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] Re: how to get user to make boolean = False?

2015-10-30 Thread Alex Glaros
I guess just need 2 virtual field buttons: "Approve" "Reject", and let them 
assign "True" or "False" ...  then don't need the grid "edit" button at 
all...

-- 
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] sqlfor grid uneditable lets edit once in form view

2015-10-30 Thread Vid Ogris
Solved the problem using LOAD

created two new functions for eacg SQLFROM.grid, added two *. load files
for each file and in my view used LOAD

my view setting.html


{{ =response.title + " - " +T('Config')}} 

{{=session.flash or ''}}

   
{{=T('Edit system settings')}}

   



   





{{=T('Changeable settings')}}

{{=LOAD(f="configEditable.load", ajax=True, ajax_trap=True)}}

   








{{=T('Fixed settings')}}

{{=LOAD(f="configUneditable.load", ajax=True, ajax_trap=True)}}

   








2015-10-31 10:12 GMT+08:00 Yebach :

> Hello
>
> I have a view that shows two grids. One is editable one not. Everything ok.
> The uneditable has an option view, so user can see all the parameters.
> Once in form view there is an edit button and he can edit the values. I
> want to prevent that from happening. How can I do that.
>
>
> This is my code
>
> grid_config200  is the grid that should not be editable in view form
>
>
> @auth.requires_login()
> def config():
> user = auth.user_id
> org = db(db.auth_user.id ==
> user).select(db.auth_user.organization)[0]["organization"]
> configSetting200 = ((db.config.co_organisation == org) &
> (db.config.co_access_level < 200) )
> configSetting200Plus = ((db.config.co_organisation == org) &
> (db.config.co_access_level >= 200))
> fields_config =(
> db.config.co_code,
> db.config.co_value,
> db.config.co_note
> )
> db.config.co_organisation.readable = db.config.co_organisation.writable =
> False
> db.config.co_access_level.readable = db.config.co_access_level.writable =
> False
> db.config.co_area.writable = False
> db.config.co_code.writable = False
> # db.config.co_area.readable = db.config.co_area.writable = False
> db.config.co_value.widget = SQLFORM.widgets.string.widget
> db.config.co_area.widget = SQLFORM.widgets.string.widget
> db.config.co_note.widget = SQLFORM.widgets.string.widget
> #UNEDITABLE form and data
> grid_config200 = SQLFORM.grid(query=configSetting200,
> fields=fields_config ,  searchable=False,create=False,
> deletable=False, editable=False, paginate=25, buttons_placement = 'right',
> user_signature=False,
> maxtextlengths = {'config.co_note' : 256},
> showbuttontext = False,formname = 'config200Table',
> formargs=dict(message_onsuccess=T('Record updated'),
> message_onfailure=T('Form has errors')),
> #oncreate=myfunction,
> ui = dict(widget='',
>  header='',
>  content='',
>  default='',
>  cornerall='',
>  cornertop='',
>  cornerbottom='',
>  button='button btn btn-default',
>  buttontext='buttontext button',
>  buttonadd='icon plus icon-plus glyphicon glyphicon-plus',
>  buttonback='icon leftarrow icon-arrow-left glyphicon
> glyphicon-arrow-left',
>  buttonexport='icon downarrow icon-download glyphicon
> glyphicon-download',
>  buttondelete='icon trash icon-trash glyphicon glyphicon-trash',
>  buttonedit='icon pen icon-pencil glyphicon glyphicon-pencil',
>  buttontable='icon rightarrow icon-arrow-right glyphicon
> glyphicon-arrow-right',
>  buttonview='icon magnifier icon-zoom-in glyphicon
> glyphicon-eye-open',
>  buttonvidov = 'icon glyphicon glyphicon-euro'
>  ),
> exportclasses  = dict(csv_with_hidden_cols=False, html = False, tsv =
> False, tsv_with_hidden_cols=False, json = False))
> grid_config200Plus = SQLFORM.grid(query=configSetting200Plus,
> fields=fields_config ,  searchable=False,create=False,
> deletable=False, editable=True, paginate=25, buttons_placement = 'right',
> user_signature=False,
> maxtextlengths = {'config.co_note' : 256},
> showbuttontext = False,formname = 'config200PlusTable',
> formargs=dict(message_onsuccess=T('Record updated'),
> message_onfailure=T('Form has errors')),
> #oncreate=myfunction,
> ui = dict(widget='',
>  header='',
>  content='',
>  default='',
>  cornerall='',
>  cornertop='',
>  cornerbottom='',
>  button='button btn btn-default',
>  buttontext='buttontext button',
>  buttonadd='icon plus icon-plus glyphicon glyphicon-plus',
>  buttonback='icon leftarrow icon-arrow-left glyphicon
> glyphicon-arrow-left',
>  buttonexport='icon downarrow icon-download glyphicon
> glyphicon-download',
>  buttondelete='icon trash icon-trash glyphicon glyphicon-trash',
>  buttonedit='icon pen icon-pencil glyphicon glyphicon-pencil',
>  buttontable='icon rightarrow icon-arrow-right glyphicon
> glyphicon-arrow-right',
>  buttonview='icon magnifier icon-zoom-in glyphicon
> glyphicon-eye-open',
>  buttonvidov = 'icon glyphicon glyphicon-euro'
>  ),
> exportclasses  = dict(csv_with_hidden_cols=False, html = False, tsv =
> False, tsv_with_hidden_cols=False, json = False))
>
> return dict(grid_config200 = grid_config200, 

Re: [web2py] Re: How to make a copy of db for unittest

2015-10-30 Thread Richard Vézina
You can have a look at these two examples of test stack for web2py :

https://github.com/viniciusban/web2py.test
https://github.com/niphlod/welcome_augmented (from Niphold :)

The web2py.test connection to regular or test database is supported,
welcome_augmented manage connection and have function for setup and
teardown if I remember.

Richard

On Fri, Oct 30, 2015 at 9:19 AM, Niphlod  wrote:

> do a backup of your one, then restore it with a different name (e.g.,
> "test_database"), then BEFORE running the unittest check that your DAL
> connection string points to "test_database".
>
>
> On Friday, October 30, 2015 at 12:51:26 AM UTC+1, Maelle Taurand wrote:
>>
>> Hi,
>> thanks for response.
>>
>> I am using MySQL.
>>
>>
>> Le vendredi 2 octobre 2015 23:06:29 UTC+2, Maelle Taurand a écrit :
>>>
>>>
>>> Hello
>>> I'm trying unittest with web2py. I found this article :
>>> http://www.web2py.com/AlterEgo/default/show/260
>>>
>>> It works only when the db is the current database (db object).
>>>
>>> I need help to make a copy of database in order to not run unittest on
>>> the real database ?
>>>
>>> Thanks for answers
>>>
>> --
> 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: Re-use user's login and password to bind with LDAP server

2015-10-30 Thread Niphlod


On Friday, October 30, 2015 at 12:51:22 AM UTC+1, Jonathan Renon wrote:
>
>
> It seems like the db_user table only stores the login but not the 
> password, How can I access those credentials ?
>
> uhm, let me think.. it's probably because you can't get the 
password out of LDAP  :-P There's no API to do that (fortunately).

(and incidentally beacuse it's not needed by web2py since you are using 
LDAP as the authentication mechanism for any given user)
 

> p.s: Is LDAP auth using a secure protocol to forward credentials to the 
> ldap server (TLS, STARTTLS, ...) by default ?
>

If you set it to do so, yes, it is.
 

-- 
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: SQLform grid custom function for delete

2015-10-30 Thread Niphlod
is your "id" in the grid ? id it's not in the fields then it's not 
accessible

On Friday, October 30, 2015 at 2:41:41 AM UTC+1, Yebach wrote:
>
> why am I  getting an  error AttributeError: 'Row' object has no attribute 
> 'id'
>
> when I try to set links = [lambda row: A('',_class='glyphicon glyphicon 
> glyphicon-remove-sign',
> callback=URL('settings','deactivate',vars=dict(table='workers_skills',field 
> = 'ws_status'
> ,value = row.id )))], 
>
>  
>
>
>
>
> 2015-09-23 22:44 GMT+08:00 A3 :
>
>> explained here: 
>>
>> https://groups.google.com/d/msg/web2py/asCPsD9UGb8/ksmYX0UjBx0J
>>
>> Op dinsdag 22 september 2015 04:22:39 UTC+2 schreef Yebach:
>>>
>>> Ok thanx. This worked.
>>>
>>> One more question. My SQLFORM.grid is not refreshed after callback. So 
>>> record stays there. HOw to do a grid refresh?
>>>
>>> 2015-09-19 20:32 GMT+08:00 Anthony :
>>>
 On Saturday, September 19, 2015 at 4:18:49 AM UTC-4, Yebach wrote:
>
> Hello
>
> So I managed to put link and create it but now I have a probelm 
> getting the id of the record I want to deal with
>
> links = [lambda row: A('',_class='glyphicon glyphicon 
> glyphicon-remove-sign',
> callback=URL('settings','deactivate',vars=dict(table='skills',field = 
> 'sk_status', value = form.vars.id )))]
>

 If you want the id of the record in a given row of the table, then 
 instead of value=form.vars.id, it should be value=row.id.
  

> @auth.requires_login() def deactivate(): ##Aktiviramo delavca ko user 
> klikne na activate user = auth.user_id org = db(db.auth_user.id == 
> user).select(db.auth_user.organization)[0]["organization"] #Worker je id 
> zaposlenenga ki ga damo v aktiven id = request.vars["id"]
>

 In the URLs generated in the grid, you used the variable name "value", 
 yet here you are looking for the variable name "id". The above line should 
 be:

 id = request.vars.value

 Or you can change the URLs to use "id" as the variable name.

 Anthony

> -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "web2py-users" group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/web2py/3T1Qaf39wJg/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> -- 
>>> Lep pozdrav 
>>>
>>> Vid Ogris
>>>
>>>
>>> -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/3T1Qaf39wJg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Lep pozdrav 
>
> Vid Ogris
>
>
>

-- 
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 make a copy of db for unittest

2015-10-30 Thread Niphlod
do a backup of your one, then restore it with a different name (e.g., 
"test_database"), then BEFORE running the unittest check that your DAL 
connection string points to "test_database".

On Friday, October 30, 2015 at 12:51:26 AM UTC+1, Maelle Taurand wrote:
>
> Hi, 
> thanks for response.
>
> I am using MySQL.
>
>
> Le vendredi 2 octobre 2015 23:06:29 UTC+2, Maelle Taurand a écrit :
>>
>>
>> Hello
>> I'm trying unittest with web2py. I found this article : 
>> http://www.web2py.com/AlterEgo/default/show/260
>>
>> It works only when the db is the current database (db object).
>>
>> I need help to make a copy of database in order to not run unittest on 
>> the real database ?
>>
>> Thanks for answers
>>
>

-- 
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 : Attribute Error with MySQL

2015-10-30 Thread Niphlod
setting migrate=False DISABLES all migration logic. It's working exactly as 
expected!

On Friday, October 30, 2015 at 12:51:26 AM UTC+1, Maelle Taurand wrote:
>
>
> Hi,
>
> I'm creating an application with web2py. The data storage is MySQL.
>
> In the db.py, I define a table :
>
> db.define_table('ligue',
>  Field('nom','string',requires=IS_NOT_EMPTY()),
>  Field('adresse','string',requires=IS_NOT_EMPTY()),
>  Field('ville','string',requires=IS_NOT_EMPTY()),
>  Field('cp','string',requires=IS_NOT_EMPTY()),
>  Field('tel','string',requires=IS_NOT_EMPTY()),
>  Field('URLSiteWeb','string'),
>  Field('emailContact','string')  
>  )
>
> The table is creating in the Mysql database : no problem.
>
>
> But when I add a new field in the definition of the table (db.py) *the 
> SQL order to alter the mysql table is not generated*. An *Attribute error* 
> appends.
>
>
> I have set the argument migrate to False in the define_table but it didn't 
> resolved the problem.
>
> Can you help me ?
>
> Thanks,
> Maelle Taurand
>

-- 
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] UWSGI - nginx and web2py - special chars bugged, not showing any data on requests.vars/post_vars

2015-10-30 Thread Niphlod
I seem to recall the exact same "problem" with a different title  the 
question stays the same, though: you need to pack a minimal app PLUS a 
client to reproduce the issue 

-- 
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] DAL alternatives

2015-10-30 Thread Anthony


> Well, the only thing that I really want right now, is a layer for object 
> oriented use, something like the weppy pyDAL layer should be enough, it 
> will be a impressive improvement to pydal (will convince to many users to 
> use pydal and web2py)
>

What are some examples of things you would envision doing with a "layer for 
object oriented use" that are more difficult with the pyDAL as is?

-- 
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] Scheduler Tasks show TICKER: error assigningt task (0) and task never start

2015-10-30 Thread Boris Aramis Aguilar Rodríguez
Hi

I've just re-started my scheduler and suddenly it didn't worked, so i ran 
it on a shell with debug and the following errors appeared:

http://pastebin.com/M7sQE3sR

Im unsure of this errors, i've checked that the scheduler databases are 
actually defined (I can access them from appadmin) but still when I restart 
the scheduler the same set of errors come up and no task is set to ASSIGNED 
or RUNNING state.

DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:Assigning tasks...
ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
tasks (0)
DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:recording heartbeat 
(ACTIVE)
ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
tasks (1)
ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
tasks (2)
ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
tasks (3)
ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
tasks (4)
ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
tasks (5)
ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
tasks (6)


Any help i would be very thankfull.

-- 
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: starting a live video streamin

2015-10-30 Thread Leonel Câmara
You don't need any module you can just use response.stream

-- 
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: Scheduler Tasks show TICKER: error assigningt task (0) and task never start

2015-10-30 Thread Boris Aramis Aguilar Rodríguez
Since like two months ago Oracle.

El viernes, 30 de octubre de 2015, 10:27:58 (UTC-6), Niphlod escribió:
>
> what backend are you using ?
>
> On Friday, October 30, 2015 at 4:36:09 PM UTC+1, Boris Aramis Aguilar 
> Rodríguez wrote:
>>
>> Hi
>>
>> I've just re-started my scheduler and suddenly it didn't worked, so i ran 
>> it on a shell with debug and the following errors appeared:
>>
>> http://pastebin.com/M7sQE3sR
>>
>> Im unsure of this errors, i've checked that the scheduler databases are 
>> actually defined (I can access them from appadmin) but still when I restart 
>> the scheduler the same set of errors come up and no task is set to ASSIGNED 
>> or RUNNING state.
>>
>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:Assigning tasks...
>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>> tasks (0)
>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:recording 
>> heartbeat (ACTIVE)
>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>> tasks (1)
>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>> tasks (2)
>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>> tasks (3)
>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>> tasks (4)
>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>> tasks (5)
>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>> tasks (6)
>>
>>
>> Any help i would be very thankfull.
>>
>

-- 
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: Scheduler Tasks show TICKER: error assigningt task (0) and task never start

2015-10-30 Thread Niphlod
what backend are you using ?

On Friday, October 30, 2015 at 4:36:09 PM UTC+1, Boris Aramis Aguilar 
Rodríguez wrote:
>
> Hi
>
> I've just re-started my scheduler and suddenly it didn't worked, so i ran 
> it on a shell with debug and the following errors appeared:
>
> http://pastebin.com/M7sQE3sR
>
> Im unsure of this errors, i've checked that the scheduler databases are 
> actually defined (I can access them from appadmin) but still when I restart 
> the scheduler the same set of errors come up and no task is set to ASSIGNED 
> or RUNNING state.
>
> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:Assigning tasks...
> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
> tasks (0)
> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:recording 
> heartbeat (ACTIVE)
> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
> tasks (1)
> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
> tasks (2)
> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
> tasks (3)
> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
> tasks (4)
> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
> tasks (5)
> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
> tasks (6)
>
>
> Any help i would be very thankfull.
>

-- 
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: Re-use user's login and password to bind with LDAP server

2015-10-30 Thread Richard Vézina
How do you bind to ldap in the first place, I mean when using ldap_auth.py?

Answer : your credentials...

So, I guess you just use the credentials of the user that is used to
authenticate users of web2py with ldap_auth.py

In my case, I ask for the creation of user in Active Directory different
then my personal user in order to bind and search AD and authenticate
user...

Hope it helps

Richard

On Fri, Oct 30, 2015 at 2:33 PM, Jonathan Renon  wrote:

>
>
> On Friday, October 30, 2015 at 2:12:54 PM UTC-4, Richard wrote:
>>
>> Hello Jonathan,
>>
>> I think if you want to manage LDAP from web2py as you were requesting you
>> will need much more then ldap_auth.py contrib which as it says it mains
>> purpose is to authenticate user of web2py against LDAP instance...
>>
>> I guess you better look on the side of python-ldap (
>> http://www.python-ldap.org/index.html)
>>
>> Richard
>>
>> Hi Richard,
> I was already planning to use python-ldap to manage the different
> searches, the thing I can't figure out (and don't know if it is possible
> actually) is how to use the same credentials to log in (in web2py) and
> serve as a bind account (when using python-ldap inside the app to gather
> info and make it displayed by web2py).
> From the different answer to my post it seems like i can't get the
> password saved in the db, and the connection used to authenticate the user
> is closed after successful authentication. The only solution I can think of
> then is to prompt again the username and password of the user to use it as
> binding account, this imply that I have to securely store this data and it
> makes ldap authentication "useless" for me (since the point of this
> authentication was to gather those information).
>
> Is there a solution I'm missing for my problem ?
>
> --
> 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] DAL alternatives

2015-10-30 Thread Carlos Cesar Caballero Díaz
We could use object oriented modeling, we could save our objects 
directly to the database, we could declare non persistent variables in 
objects, we could have a better code structure in our apps, we could 
maintain large models easily, we could reuse or extend model classes 
easily, we don't will need to worry about the class models files order, 
we could even load only the models that we need in controllers without 
write modules...


Object oriented programming is not just use an object oriented 
programming language, and sadly, with web2py is difficult follow the 
object oriented paradigm when we develop applications, I like web2py, 
that's why I am here, but in my personal (and other colleges) opinion, 
the framework will be better if we could use pydal in an object oriented 
way.


Greetings.


El 30/10/15 a las 10:49, Anthony escribió:


Well, the only thing that I really want right now, is a layer for
object oriented use, something like the weppy pyDAL layer should
be enough, it will be a impressive improvement to pydal (will
convince to many users to use pydal and web2py)


What are some examples of things you would envision doing with a 
"layer for object oriented use" that are more difficult with the pyDAL 
as is?

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




--
Este mensaje le ha llegado mediante el servicio de correo electronico que 
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema 
Nacional de Salud. La persona que envia este correo asume el compromiso de usar 
el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/

--
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: Re-use user's login and password to bind with LDAP server

2015-10-30 Thread Anthony
Although the password isn't stored in the database (which you wouldn't want 
anyway), you do receive the plain text password when the user logs in, so 
you can grab it then and use it to establish your own connection. In the 
model file where Auth is configured:

def ldap_connect(form):
password = request.vars.password
[connect to LDAP and retrieve the data you need]

auth.settings.login_onaccept.append(ldap_connect)

Of course, there are other approaches. The point is, upon login, you can 
retrieve the password submitted via request.vars.password.

Anthony


On Friday, October 30, 2015 at 2:33:07 PM UTC-4, Jonathan Renon wrote:
>
>
>
> On Friday, October 30, 2015 at 2:12:54 PM UTC-4, Richard wrote:
>>
>> Hello Jonathan,
>>
>> I think if you want to manage LDAP from web2py as you were requesting you 
>> will need much more then ldap_auth.py contrib which as it says it mains 
>> purpose is to authenticate user of web2py against LDAP instance...
>>
>> I guess you better look on the side of python-ldap (
>> http://www.python-ldap.org/index.html)
>>
>> Richard
>>
>> Hi Richard,
> I was already planning to use python-ldap to manage the different 
> searches, the thing I can't figure out (and don't know if it is possible 
> actually) is how to use the same credentials to log in (in web2py) and 
> serve as a bind account (when using python-ldap inside the app to gather 
> info and make it displayed by web2py).
> From the different answer to my post it seems like i can't get the 
> password saved in the db, and the connection used to authenticate the user 
> is closed after successful authentication. The only solution I can think of 
> then is to prompt again the username and password of the user to use it as 
> binding account, this imply that I have to securely store this data and it 
> makes ldap authentication "useless" for me (since the point of this 
> authentication was to gather those information).
>
> Is there a solution I'm missing for my problem ?  
>

-- 
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: 'ascii' codec can't encode character u'\xce' in position 0: o

2015-10-30 Thread Dave S


On Friday, October 30, 2015 at 11:25:42 AM UTC-7, Alex Glaros wrote:
>
> thanks Dave and other folks, please wait till I reformulate the question 
> from home after I get off work.  I think function correctly displays values 
> on the data capture page but only copies it wrong when transmits to next 
> function.  Alex
>


You might want to post more of the stack trace part of the ticket, if 
there's a question about where the ASCII constraint is being set up.

/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] DAL alternatives

2015-10-30 Thread Anthony
On Friday, October 30, 2015 at 3:10:29 PM UTC-4, Carlos Cesar Caballero 
wrote:
>
> We could use object oriented modeling,
>

Yes, but the question is, what exactly does that mean to you, and how would 
it improve things over the current DAL? Can you share a specific example, 
possibly including pseudo-code?

Also, are you saying you want an ORM, or are you using "object oriented" 
more generically. If the latter, of course the DAL is already "object 
oriented" in that most of the API involves instantiating objects and 
calling methods on them.
 

> we could save our objects directly to the database
>

What do you mean by "objects" here? Are you saying you want to save native 
Python objects to the database? If so, that would be a feature of the 
database rather than the abstraction layer interacting with it. Of course, 
web2py does allow you to store arbitrary objects to any database if they 
can be pickled or otherwise serialized and deserialized. Can you give an 
example, and maybe point to how some other favored abstraction layer 
handles it (e.g., SQLAlchemy)?
 

> , we could declare non persistent variables in objects
>

Not sure what you mean by this. Is this something that can be handled via 
virtual fields or method fields?
 

> , we could have a better code structure in our apps, we could maintain 
> large models easily
>

Can you be more specific? In web2py, nothing stops you from breaking up 
model code into multiple modules.
 

> , we could reuse or extend model classes easily
>

This would be one benefit of an ORM approach, though you can already use table 
inheritance 

 
with the DAL, and there are other methods of re-using code (e.g., table 
methods).
 

> , we don't will need to worry about the class models files order
>

That has nothing to do with the DAL or "object oriented" programming -- 
that is related to the way web2py executes model files prior to the 
controller and would affect any type of data model definitions. If you 
don't want to worry about that, you can move table definitions to modules 
or use models sub-folders along with response.models_to_run.
 

> , we could even load only the models that we need in controllers without 
> write modules...
>

How so? If using classes, the class declarations would still be executed if 
they were in a model file. Do you think this would be much more efficient 
than DAL lazy table declarations? 

Object oriented programming is not just use an object oriented programming 
> language, and sadly, with web2py is difficult follow the object oriented 
> paradigm when we develop applications


Are you speaking generally, or just with regard to the DAL? Is it really 
that you want an ORM and to define database models as classes? If so, 
again, it would be helpful to understand specific examples of where you 
find that superior in some way to the DAL.

Anthony

-- 
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: Do I need to Install a Date base program

2015-10-30 Thread Dave S


On Thursday, October 29, 2015 at 8:58:19 PM UTC-7, Simon Ashley wrote:
>
> No, just use sqlite. Already configured for it.
>
> On Friday, 30 October 2015 09:51:26 UTC+10, Glenn Plummer wrote:
>>
>> Since I am very new to web2py software am I correct in saying it does not 
>> contain an actual database and you need to install one if you wish to use 
>> the relational database to store data for availability web2py web page?
>>
>
It might be helpful to say that "sqlite is a separate package provided in 
the same box with web2py", the analogy being the spice packet that comes 
with your microwave-able rice dish; you can discard the spice packet and 
use your own preferred mix.  The Rocket server is a similar package.

Fine print applies to how the bundling is done for Windows, I suppose.

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


[web2py] Re: Re-use user's login and password to bind with LDAP server

2015-10-30 Thread Jonathan Renon

>
>  it's not needed by web2py since you are using LDAP as the authentication 
> mechanism for any given user

If I understand well, the authentication bind the user to my ldap server ?
How can I access this established connection in my app ? how can I make a 
search request like 
*con*.search(basedn, searchScope, searchFilter, searchAttribute) 

-- 
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: Scheduler Tasks show TICKER: error assigningt task (0) and task never start

2015-10-30 Thread Boris Aramis Aguilar Rodríguez
Sorry, this is FIXED; it was a self-introduced bug by overriding insert 
code within DAL's broken Oracle implementation.
Thanks for your time!

El viernes, 30 de octubre de 2015, 10:45:02 (UTC-6), Boris Aramis Aguilar 
Rodríguez escribió:
>
> Since like two months ago Oracle.
>
> El viernes, 30 de octubre de 2015, 10:27:58 (UTC-6), Niphlod escribió:
>>
>> what backend are you using ?
>>
>> On Friday, October 30, 2015 at 4:36:09 PM UTC+1, Boris Aramis Aguilar 
>> Rodríguez wrote:
>>>
>>> Hi
>>>
>>> I've just re-started my scheduler and suddenly it didn't worked, so i 
>>> ran it on a shell with debug and the following errors appeared:
>>>
>>> http://pastebin.com/M7sQE3sR
>>>
>>> Im unsure of this errors, i've checked that the scheduler databases are 
>>> actually defined (I can access them from appadmin) but still when I restart 
>>> the scheduler the same set of errors come up and no task is set to ASSIGNED 
>>> or RUNNING state.
>>>
>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:Assigning tasks...
>>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>>> tasks (0)
>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:recording 
>>> heartbeat (ACTIVE)
>>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>>> tasks (1)
>>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>>> tasks (2)
>>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>>> tasks (3)
>>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>>> tasks (4)
>>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>>> tasks (5)
>>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning 
>>> tasks (6)
>>>
>>>
>>> Any help i would be very thankfull.
>>>
>>

-- 
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: Re-use user's login and password to bind with LDAP server

2015-10-30 Thread Niphlod
I'll try to explain in layman words

web2py configured to use ldap authentication does a search (or multiple 
searches, but only for group-related things that can be disabled) and it 
uses python-ldap under the hood.
You can pretty much copy the code from contrib to code your own search.

The thing to be aware of (and the one I'm stressing about) is that ldap 
itself doesn't provide a method to return a password for a given user
It instead uses a username-password combo to connect to the LDAP server 
(there is a few percentage of LDAP servers out there that let you connect 
to it anonimously) exactly as it was a database.

The only API LDAP exposes is "if I give you this username and this 
password, would it be authenticated ?" .
That's what .simple_bind_s(username, password) does.
simple_bind_s() for LDAP closely resembles .get_or_create() for auth. 
You give the password to it, but you can't fetch it back, in ANY way.

Therefore, if you want to fetch some special attributes for a given user, 
or if you want to code your own searches, you'd be better off asking LDAP 
administrators for a service account just to connect to the LDAP server and 
do searches (if it requires authentication). 
Be aware that some properties may very well be unreachable with "normal" 
user login credentials (i.e. doing searches with credentials provided by a 
normal user).




-- 
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: 'ascii' codec can't encode character u'\xce' in position 0: o

2015-10-30 Thread Dave S


On Thursday, October 29, 2015 at 11:49:24 AM UTC-7, Alex Glaros wrote:
>
> okay, I see from geoNames site that it's a special (Île-de-France) character: 
>  http://www.geonames.org/search.html?q=94949+France=
>
> geoNames' native data looks like this: Île-de-France, and it sends me the 
> data in a dictionary that looks like: u'\xcele-de-France'
>
> is there a method for handling those characters?
>

Well, you're basically stuck if you're trying to run it through an 
ASCII-only (7-bit codes) routine.   If you can go through a UTF-8--aware 
routine, then you just have to make sure you've got the right routine.  I 
don't know enough about how code pages work to give a useable answer, but 
sometimes you can use code pages to go from UTF-8 to 8-bit extended ASCII, 
and your current routine might be okay with that.

Others on the group have more experience in code conversions, so you might 
watch for their posts.

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


[web2py] Re: 'ascii' codec can't encode character u'\xce' in position 0: o

2015-10-30 Thread Dave S


On Friday, October 30, 2015 at 11:02:04 AM UTC-7, Dave S wrote:
>
> I don't know enough about how code pages work to give a useable answer, 
> but sometimes you can use code pages to go from UTF-8 to 8-bit extended 
> ASCII, and your current routine might be okay with that.
>


I remember (barely) when you had to distinguish 5-bit, 6-bit, and 7-bit 
ASCII.  Doesn't help with today's problem, though.

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


[web2py] Re: 'ascii' codec can't encode character u'\xce' in position 0: o

2015-10-30 Thread Alex Glaros
thanks Dave and other folks, please wait till I reformulate the question 
from home after I get off work.  I think function correctly displays values 
on the data capture page but only copies it wrong when transmits to next 
function.  Alex

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


[web2py] Re: Re-use user's login and password to bind with LDAP server

2015-10-30 Thread Anthony
On Friday, October 30, 2015 at 1:47:05 PM UTC-4, Jonathan Renon wrote:
>
>  it's not needed by web2py since you are using LDAP as the authentication 
>> mechanism for any given user
>
> If I understand well, the authentication bind the user to my ldap server ?
> How can I access this established connection in my app ? how can I make a 
> search request like 
> *con*.search(basedn, searchScope, searchFilter, searchAttribute) 
>

The ldap_auth.py module includes a single function, which itself returns a 
function. Internally, it does establish a connection, but it does not 
appear to expose the connection object for external use (it closes the 
connection after doing the authentication).

Anthony
 

-- 
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: Re-use user's login and password to bind with LDAP server

2015-10-30 Thread Richard Vézina
Hello Jonathan,

I think if you want to manage LDAP from web2py as you were requesting you
will need much more then ldap_auth.py contrib which as it says it mains
purpose is to authenticate user of web2py against LDAP instance...

I guess you better look on the side of python-ldap (
http://www.python-ldap.org/index.html)

Richard

On Fri, Oct 30, 2015 at 2:06 PM, Anthony  wrote:

> On Friday, October 30, 2015 at 1:47:05 PM UTC-4, Jonathan Renon wrote:
>>
>>  it's not needed by web2py since you are using LDAP as the authentication
>>> mechanism for any given user
>>
>> If I understand well, the authentication bind the user to my ldap server ?
>> How can I access this established connection in my app ? how can I make a
>> search request like
>> *con*.search(basedn, searchScope, searchFilter, searchAttribute)
>>
>
> The ldap_auth.py module includes a single function, which itself returns a
> function. Internally, it does establish a connection, but it does not
> appear to expose the connection object for external use (it closes the
> connection after doing the authentication).
>
> Anthony
>
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [web2py] Re: Re-use user's login and password to bind with LDAP server

2015-10-30 Thread Jonathan Renon


On Friday, October 30, 2015 at 2:12:54 PM UTC-4, Richard wrote:
>
> Hello Jonathan,
>
> I think if you want to manage LDAP from web2py as you were requesting you 
> will need much more then ldap_auth.py contrib which as it says it mains 
> purpose is to authenticate user of web2py against LDAP instance...
>
> I guess you better look on the side of python-ldap (
> http://www.python-ldap.org/index.html)
>
> Richard
>
> Hi Richard,
I was already planning to use python-ldap to manage the different searches, 
the thing I can't figure out (and don't know if it is possible actually) is 
how to use the same credentials to log in (in web2py) and serve as a bind 
account (when using python-ldap inside the app to gather info and make it 
displayed by web2py).
>From the different answer to my post it seems like i can't get the password 
saved in the db, and the connection used to authenticate the user is closed 
after successful authentication. The only solution I can think of then is 
to prompt again the username and password of the user to use it as binding 
account, this imply that I have to securely store this data and it makes 
ldap authentication "useless" for me (since the point of this 
authentication was to gather those information).

Is there a solution I'm missing for my problem ?  

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