[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 u

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 (Sourc

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

[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(

[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

[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 Ther

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

[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 subsc

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

[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 s

[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

[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 d

[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

[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(bas

[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&country= > > geoNames' native data looks like this: Île-de-France, and it sends me the >

[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

[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 co

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

[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/bo

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 in

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 th

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

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): passwor

[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 n

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 ps

[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 dat

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 t

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 di

[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

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

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

[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) - h

[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 v

[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 co

[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 th

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')}}

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 ed

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_statu

[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"

[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():

[web2py] Re: Should this work in Web2py

2015-10-30 Thread Anthony Smith
Thanks for the input everyone , I did get it to successfully update using the following def create_stock_task(): form = SQLFORM (db.stock_task).process() if form.accepted: task = db(db.stock_task.id).select().last() pdays_row = db(db.product.withholding_period>0).select()