[web2py] simple update of an cache.ram python dict

2015-12-21 Thread Richard
Hello,

I am still under 2.9.5, I have a simple dict cached in ram which never 
expire that I update when new key value are added to the system... Mainly 
the dict contain id and their representation...

It works flawlessly in dev, but once I pushed in prod, it seems that the 
cached dict takes time to really update... Here how I manage the creation 
an update of this dict :

def set_id_represent(update_id_represent_if_elapsed_time=None, id=None):
"""
Calling this function will create in globals the "id_represent" 
variable if the call is made without
id. If id is passed, it will update the id_represent dictionary with new
id and it representation.
:param id:
:param update_id_represent_if_elapsed_time:
"""
if 'id_represent' not in globals():
global id_represent
id_represent = \
cache.ram('id_represent',
  lambda: {r.id: r.represent_field
   for r in db().select(db.table_name.id,
db.table_name.
represent_field,
orderby=db.table_name.
represent_field)
   },
  time_expire=update_id_represent_if_elapsed_time)
elif isinstance(id, int) or isinstance(id, long):
id_represent_query = \
db(db.table_name.id == id
   ).select(db.table_name.id,
db.table_name.represent_field,
orderby=db.table_name.represent_field)
id_represent.update({r.id: r.represent_field for r in 
id_represent_query})
if id:
return id_represent[id]

set_id_represent(update_id_represent_if_elapsed_time=None)

Then when I want to update the cached dict with new k, v :

set_id_represent(id=my_id)

I have made some test and print after the id_represent.update(...) above 
from the function call and the dict seems to be updated... The function 
that call set_in_represent(id=id) doesn't failed, but when we want to 
access page which user id_represent[some_id], they all failed for a couples 
of minutes... Like if the cached dict not get update immediately...

Thanks for any pointer...

Richard





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


Re: [web2py] Re: multiple auth instances for one app

2015-12-21 Thread Mark Graves
I never said I was reasonable =)

I'll come up with a description this evening.

-Mark

On Mon, Dec 21, 2015 at 12:11 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> I cannot think of a reasonable use case for this. Tell us more.
>
>
> On Saturday, 19 December 2015 03:03:45 UTC-6, Mark Graves wrote:
>>
>> Hey everyone.
>>
>> Interesting question here.
>>
>> Has anyone ever used two instances of auth in the same app, on two
>> separate databases:
>>
>> eg.
>>
>> db1 = DAL()
>> db2 = DAL()
>>
>> auth1 = Auth(db1)
>> auth2 = Auth(db2)
>>
>> Would that run into any thread safety issues?
>>
>> -Mark
>>
> --
> 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/rXjJZZ4ZKDw/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.
>

-- 
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: 'Table' object has no attribute '_notnulls'

2015-12-21 Thread Niphlod
guess it's experimental for a reason and funny, too :D

raise an issue on pydal, so it gets tracked.

On Monday, December 21, 2015 at 9:48:52 PM UTC+1, Francisco Costa wrote:
>
>
> After upgrading to web2py 2.13.2 (previously on 2.12.3) I got the 
> following error:
>
> Traceback (most recent call last):
>   File "/home/franciscocosta/www/web2py/gluon/restricted.py", line 227, in 
> restricted
> exec ccode in environment
>   File 
> "/home/franciscocosta/www/web2py/applications/emprego/views/backoffice/form_ofertas.html",
>  line 621, in 
>   File "/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/objects.py", 
> line 2022, in select
> return adapter.select(self.query,fields,attributes)
>   File 
> "/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
> line 829, in select
> groupby=groupby, distinct=distinct, having=having)
>   File 
> "/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
> line 356, in __init__
> self.query_dict = adapter.expand(self.query)
>   File 
> "/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
> line 704, in expand
> result = op(first, second, **optional_args)
>   File 
> "/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
> line 1151, in check_fields
> return f(self, first, second, *args, pipeline=pipeline, **kwargs)
>   File 
> "/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
> line 1165, in EQ
> return {self.expand(first): self.expand(second, first.type)}
>   File 
> "/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
> line 717, in expand
> raise NotImplementedError("How did you reach this line of code???")
> NotImplementedError: How did you reach this line of code???
>
> shows up when I have this code:
>
> if db(db.industries.parent == []).select():
>
> and this is the industries table:
>
> db.define_table(
> 'industries',
> Field('id', required=True, unique=True),
> Field('name', 'string', label=T('Nome'), length=128, required=True),
> Field('slug', 'string', compute=lambda row: slugify(row.name) if row.name 
> else None, length=128, required=True, unique=True, writable=False, 
> readable=False),
> Field('parent', 'list:reference industries', label=T('Principal'), 
> required=False, default=None, writable=False, readable=True),
> format='%(name)s'
> )
>
>
>
>

-- 
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] 'Table' object has no attribute '_notnulls'

2015-12-21 Thread Francisco Costa



After upgrading to web2py 2.13.2 (previously on 2.12.3) I got the following 
error:

Traceback (most recent call last):
  File "/home/franciscocosta/www/web2py/gluon/restricted.py", line 227, in 
restricted
exec ccode in environment
  File 
"/home/franciscocosta/www/web2py/applications/emprego/views/backoffice/form_ofertas.html",
 line 621, in 
  File "/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/objects.py", 
line 2022, in select
return adapter.select(self.query,fields,attributes)
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 829, in select
groupby=groupby, distinct=distinct, having=having)
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 356, in __init__
self.query_dict = adapter.expand(self.query)
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 704, in expand
result = op(first, second, **optional_args)
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 1151, in check_fields
return f(self, first, second, *args, pipeline=pipeline, **kwargs)
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 1165, in EQ
return {self.expand(first): self.expand(second, first.type)}
  File 
"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/adapters/mongo.py", 
line 717, in expand
raise NotImplementedError("How did you reach this line of code???")
NotImplementedError: How did you reach this line of code???

shows up when I have this code:

if db(db.industries.parent == []).select():

and this is the industries table:

db.define_table(
'industries',
Field('id', required=True, unique=True),
Field('name', 'string', label=T('Nome'), length=128, required=True),
Field('slug', 'string', compute=lambda row: slugify(row.name) if row.name 
else None, length=128, required=True, unique=True, writable=False, 
readable=False),
Field('parent', 'list:reference industries', label=T('Principal'), 
required=False, default=None, writable=False, readable=True),
format='%(name)s'
)



-- 
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 worker name

2015-12-21 Thread Niphlod
glad you worked it out but IMHO a request in appadmin should have created 
.table AND the underlying structure on the db (in other words, there 
shouldn't be a place on the universe where .table files are created but the 
underlying tables on the backend are not created.)

On Monday, December 21, 2015 at 2:54:11 PM UTC+1, Gael Princivalle wrote:
>
> Done!
>
> Here is the solution (part is from another post from Leonel):
> Set db string conection with migrate=False and fake_migrate_all=False
> Delete scheduler.py file
> Delete scheduler table files
> Delete scheduler tables in db
> Set db string conection with fake_migrate_false=True
> Run admin (create table files)
> Remove fake_migrate_all and set migrate=True
> Create again the scheduler
> Run admin, tables are created in the db
>
> AND! Now scheduler works.
>
> Il giorno lunedì 21 dicembre 2015 09:35:20 UTC+1, Niphlod ha scritto:
>>
>> there's no way .table files are created but tables aren't ... please 
>> triple check your settings 
>>
>> On Sunday, December 20, 2015 at 9:28:39 PM UTC+1, Gael Princivalle wrote:
>>>
>>> Now tables files are created in the database folder, but tables are not 
>>> created in the postgress DB.
>>> Error in always the same when I try to open a table from the 
>>> administration interface.
>>>
>>> ProgrammingError: relation "scheduler_worker" does not exist
>>> LINE 1: SELECT count(*) FROM "scheduler_worker" WHERE ("scheduler_wo...
>>>
>>>
>>> About migrations my db is like that:
>>> db = DAL('postgres://user:pass@localhost:5432/postg_db', 
>>> check_reserved=['all'], pool_size=1, entity_quoting=True, bigint_id=True, 
>>> migrate=True, fake_migrate_all=True)
>>>
>>> And I've saw also that in the complete scheduler signature you can set 
>>> migrate to True so in scheduler.py I have:
>>> Scheduler(db, dict(e_db=e_db, update_products_auto=update_products_auto, 
>>> sitemap_txt_auto=sitemap_txt_auto), migrate=True)
>>>
>>> PostgreSQL tables are not created.
>>> So this is a desperate attempt, deleting all scheduler and create it 
>>> again. I've done it for resolving this scheduler problem, it don't runs for 
>>> all my old four applications that I've moved with "pack all" from 2.9.12. 
>>> version to this 2.12.3 version. DB's are new. I've moved data with 
>>> export/import linux commands, pg_dump, psql.
>>>
>>> And for new applications scheduler runs.
>>>
>>> How can I make the debug of it?
>>>
>>> Thanks.
>>>
>>>
>>> Il giorno domenica 20 dicembre 2015 13:51:45 UTC+1, Niphlod ha scritto:

 you just had to delete corresponding .table files. scheduler tables are 
 created as soon as the scheduler is istantiated, unless migrations are 
 turned off.

 On Friday, December 18, 2015 at 4:17:48 PM UTC+1, Gael Princivalle 
 wrote:
>
> No I don't.
>
> But now I have:
> Dropped all tables in the database folder
> Delete all scheduler tables in the postgress database.
> Delete the scheduler
> Create the scheduler.
> I still have the same db error, for example for workers:
>
> SELECT count(*) FROM "scheduler_worker" WHERE ("scheduler_wo...
>
> table files are created but not for scheduler tables
> scheduler tables in postgress db are not created.
>
> Do you know why?
>
> Il giorno venerdì 18 dicembre 2015 15:48:06 UTC+1, Niphlod ha scritto:
>>
>> when you dropped tables, did you remember to delete the corresponding 
>> *.table files from the databases/ folder ?
>>
>> On Friday, December 18, 2015 at 12:47:38 PM UTC+1, Gael Princivalle 
>> wrote:
>>>
>>> >scheduler tables can be dropped manually
>>> Done
>>>
>>> >deleting scheduler.py also.
>>> Done
>>>
>>> >But I still don't think that it's the way to fix the issue you're 
>>> facing.
>>> Well I'm not able to understand which is this problem, as when I 
>>> create a scheduler in a new app tasks are running.
>>> For the moment creating a new scheduler is my better idea, if you 
>>> have a better one thanks.
>>>
>>> Anyway now I've got this error when I try to open the scheduler 
>>> table, for example scheduler_task.
>>> My db string have now migrate=True, fake_migrate_all=True.
>>> My only other idea is rebuild all the app starting from a new one, 
>>> but if I can resolve it in a shorter way I prefer.
>>>
>>> Traceback (most recent call last):
>>>   File 
>>> "/home/tasko/webapps/w2p_2_12_3/web2py/applications/hydrover_oleodinamica/controllers/appadmin.py",
>>>  line 238, in select
>>> nrows = db(query).count()
>>>   File 
>>> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/objects.py",
>>>  line 1992, in count
>>> return db._adapter.count(self.query,distinct)
>>>   File 
>>> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/adapters/base.py",
>>>  line 1311, in count
>>> self.execute(s

[web2py] Re: SSL error with CAS after upgrade to 32 bit python 2.7.10 on Windows (ActiveState python)

2015-12-21 Thread Niphlod
this though poses a problem in the case someone wants to skip certificate 
validation. python in this case enforces a "sane default" but I wonder 
if we should revisit all the code to look for places where cert validation 
**could** be a problem 

On Monday, December 21, 2015 at 8:39:58 PM UTC+1, Tim Richardson wrote:
>
>
>
> On Tuesday, 22 December 2015 00:19:34 UTC+11, Niphlod wrote:
>>
>> this is more of a python installation issue rather than a web2py one 
>>
>
> yes, but here be very helpful people. Which you have just proved again :) 
>

-- 
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: SSL error with CAS after upgrade to 32 bit python 2.7.10 on Windows (ActiveState python)

2015-12-21 Thread Tim Richardson


On Tuesday, 22 December 2015 00:19:34 UTC+11, Niphlod wrote:
>
> this is more of a python installation issue rather than a web2py one 
>

yes, but here be very helpful people. Which you have just proved again :) 

-- 
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: SSL error with CAS after upgrade to 32 bit python 2.7.10 on Windows (ActiveState python)

2015-12-21 Thread Tim Richardson


On Tuesday, 22 December 2015 00:22:26 UTC+11, Niphlod wrote:
>
> and probably due to https cert verification turned on 
> https://www.python.org/dev/peps/pep-0476/ . Are you using a valid cert ?
>
>
> Your guess was remarkably precise. I just came back to report that 
replacing it with a renewed certificate fixed the problem. I didn't 
honestly expect that but thought I'd give it a shot (it's an intranet 
site). 
The expired cert didn't give the previous installation any problems, but 
there you are. 
  

-- 
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: Payment gateway

2015-12-21 Thread Ron Chatterjee
Was looking for something similar to this as an example (model, view, 
controller)

http://www.micahcarrick.com/django-authorize-net-payments.html



On Monday, December 21, 2015 at 2:58:35 AM UTC-5, Mathieu Clabaut wrote:
>
> I have,'t seen anything up to date for paypal…
> But there is a working base for stripe on gluon/contrib/stripe.py
>
>
> On Sun, Dec 20, 2015 at 8:55 PM Ron Chatterjee  > wrote:
>
>> Is there a .w2p example with forms and payment processing to look at? Not 
>> sure if slice is updated for paypal etc.
>>
>>
>> On Saturday, December 19, 2015 at 10:34:33 PM UTC-5, Anthony wrote:
>>>
>>> Have you looked at this yet: 
>>> http://web2py.com/books/default/chapter/29/14/other-recipes#Accepting-credit-card-payments
>>>
>>> There is also 
>>> https://github.com/web2py/web2py/blob/master/gluon/contrib/paymentech.py
>>> .
>>>
>>> On Saturday, December 19, 2015 at 9:32:41 PM UTC-5, Ron Chatterjee wrote:

 Any good material on payment gateway someone can be point me to?

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

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


[web2py] Re: multiple auth instances for one app

2015-12-21 Thread Massimo Di Pierro
I cannot think of a reasonable use case for this. Tell us more.

On Saturday, 19 December 2015 03:03:45 UTC-6, Mark Graves wrote:
>
> Hey everyone.
>
> Interesting question here.
>
> Has anyone ever used two instances of auth in the same app, on two 
> separate databases:
>
> eg.
>
> db1 = DAL()
> db2 = DAL()
>
> auth1 = Auth(db1)
> auth2 = Auth(db2)
>
> Would that run into any thread safety issues?
>
> -Mark
>

-- 
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: 2016 PyCon Portland

2015-12-21 Thread Massimo Di Pierro
PyCon is very much Django biased. My talks have been consistently rejected 
except once years ago. 
I may apply again but frankly I do not have much of an incentive. 
PyCon is a great conference but I host DePy 2016 a few weeks before in 
Chicago and we got 150 people last year.

Massimo


On Friday, 18 December 2015 20:30:47 UTC-6, Julio F. Schwarzbeck wrote:
>
> Winter is coming, and after that, PyCon in May 2016..
>
> We need a web2py presence there! - What are the steps to make Massimo a 
> figure in the event?? - Suggestions?
>

-- 
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: Form processing: multiple forms

2015-12-21 Thread Martin
Thx !


mandag 21. desember 2015 16.55.57 UTC+1 skrev Anthony følgende:
>
> if not session.form1_data:
> form1 code
> if form1.accepted:
> session.form1_data = ...
> if session.form1_data:
> form2 code
> if form2.accepted:
> del session.form1_data
>
> Anthony
>
> On Monday, December 21, 2015 at 10:23:15 AM UTC-5, Martin wrote:
>>
>>
>>
>>
>>
>> mandag 21. desember 2015 16.12.14 UTC+1 skrev Anthony følgende:
>>>
>>> I was hoping I could avoid redirect. Have to redirect to self then, and 
 then keep output from form1 in session, so than could be used as input in 
 form2.

>>>
>>> There's no reason to redirect to self. Just store what is needed from 
>>> form1 in the session and proceed with the code for form2. You only need a 
>>> redirect if the forms will be handled via different actions.
>>>
>>> Anthony
>>>
>>
>>
>> That is what I was trying to do.
>> From the query of form1 I use the result to create a list form as form 2. 
>> (all good until now)
>> the problem start when I am executing form 2. I am not able to  read / 
>> request the vars from form 2.  
>> When building form 2 it's just the result from form1. No need to store 
>> anyting initially - it's just a list with a bolean field 
>> so I can choose record to insert into db. 
>>
>> but when form 2 execute it is not getting vars and just jump to "start" 
>> of function and giving me form 1 again. 
>>
>> Martin
>>
>>
>>
>>
>>
>>  
>>
>

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


[web2py] Re: Form processing: multiple forms

2015-12-21 Thread Anthony
if not session.form1_data:
form1 code
if form1.accepted:
session.form1_data = ...
if session.form1_data:
form2 code
if form2.accepted:
del session.form1_data

Anthony

On Monday, December 21, 2015 at 10:23:15 AM UTC-5, Martin wrote:
>
>
>
>
>
> mandag 21. desember 2015 16.12.14 UTC+1 skrev Anthony følgende:
>>
>> I was hoping I could avoid redirect. Have to redirect to self then, and 
>>> then keep output from form1 in session, so than could be used as input in 
>>> form2.
>>>
>>
>> There's no reason to redirect to self. Just store what is needed from 
>> form1 in the session and proceed with the code for form2. You only need a 
>> redirect if the forms will be handled via different actions.
>>
>> Anthony
>>
>
>
> That is what I was trying to do.
> From the query of form1 I use the result to create a list form as form 2. 
> (all good until now)
> the problem start when I am executing form 2. I am not able to  read / 
> request the vars from form 2.  
> When building form 2 it's just the result from form1. No need to store 
> anyting initially - it's just a list with a bolean field 
> so I can choose record to insert into db. 
>
> but when form 2 execute it is not getting vars and just jump to "start" of 
> function and giving me form 1 again. 
>
> Martin
>
>
>
>
>
>  
>

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


[web2py] Re: Form processing: multiple forms

2015-12-21 Thread Martin


mandag 21. desember 2015 16.12.14 UTC+1 skrev Anthony følgende:
>
> I was hoping I could avoid redirect. Have to redirect to self then, and 
>> then keep output from form1 in session, so than could be used as input in 
>> form2.
>>
>
> There's no reason to redirect to self. Just store what is needed from 
> form1 in the session and proceed with the code for form2. You only need a 
> redirect if the forms will be handled via different actions.
>
> Anthony
>

Hi, 

did not think at first.. 

but, after a bit thoght of what you wrote - it'sworking.

Code:

def test():
form1 = FORM(
INPUT(_id = 'foo', _name = 'foo'),
INPUT(_type='submit', _value="submit")
)

form1_vars = False
form2_vars = False
form2 = False
e = {}
if form1.process(formname="form_one").accepted:
session.form2 = FORM(INPUT(_id = '0', _name = '0'),
INPUT(_id = '1', _name = '1'),
INPUT(_id = '2', _name = '2'),
INPUT(_type='submit', _value="submit"))
if session.form2:
form2 = session.form2
if form2.process(formname = "form_two").accepted:
form2_vars = form2.vars
return locals() 

Thx 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] Re: Form processing: multiple forms

2015-12-21 Thread Martin




mandag 21. desember 2015 16.12.14 UTC+1 skrev Anthony følgende:
>
> I was hoping I could avoid redirect. Have to redirect to self then, and 
>> then keep output from form1 in session, so than could be used as input in 
>> form2.
>>
>
> There's no reason to redirect to self. Just store what is needed from 
> form1 in the session and proceed with the code for form2. You only need a 
> redirect if the forms will be handled via different actions.
>
> Anthony
>


That is what I was trying to do.
>From the query of form1 I use the result to create a list form as form 2. 
(all good until now)
the problem start when I am executing form 2. I am not able to  read / 
request the vars from form 2.  
When building form 2 it's just the result from form1. No need to store 
anyting initially - it's just a list with a bolean field 
so I can choose record to insert into db. 

but when form 2 execute it is not getting vars and just jump to "start" of 
function and giving me form 1 again. 

Martin





 

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


[web2py] Re: Form processing: multiple forms

2015-12-21 Thread Anthony

>
> I was hoping I could avoid redirect. Have to redirect to self then, and 
> then keep output from form1 in session, so than could be used as input in 
> form2.
>

There's no reason to redirect to self. Just store what is needed from form1 
in the session and proceed with the code for form2. You only need a 
redirect if the forms will be handled via different actions.

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: Form processing: multiple forms

2015-12-21 Thread Martin


mandag 21. desember 2015 14.11.11 UTC+1 skrev Anthony følgende:
>
> if form1.process(formname="form_one").accepted:
>> form2 = FORM(INPUT(_id = '0', _name = '0'),
>> INPUT(_id = '1', _name = '1'),
>> INPUT(_id = '2', _name = '2'),
>> INPUT(_type='submit', _value="submit"))
>> 
>> if form2.process(formname="form_two"):
>> e = {'p':'process ok'}
>> elif form2.accepted:
>> e =  form2.vars
>> else:
>> e = {'s':'something else'}
>> return {'form2':form2, 'e':e}   
>>
>
> form2 is only processed when form1 is submitted and accepted, so when you 
> submit form2, the if form1.process(formname="form_
> one").accepted condition will be false, and none of the remaining code 
> will be executed.
>
> After form1, you might instead want to redirect to another action to 
> handle form2. If you want to handle two forms in the same action, and the 
> second depends on the first having been submitted, may store a flag in the 
> session indicating that, and serve/process form2 contingent on that flag 
> being there (reset the flag after form2 has been submitted).
>
> Anthony
>


Thx.

I was hoping I could avoid redirect. Have to redirect to self then, and 
then keep output from form1 in session, so than could be used as input in 
form2.
 

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


Re: [web2py] Re: web2py 2.13.1 is OUT

2015-12-21 Thread K.H.Florian

Hi Anthony,
yes the records are being inserted/updated without the template values!

You could try my app online:

The old web2py version: www.freightlabel.com/demo
The new web2py version: www.freight-sw.com/demo
user: d...@demo.com
passw.: demo
Menu: Assignments/Text-Label
You can blank out the Title Field or change the Text-MC.

I'll see if i can make a minimal app.

Mit freundlichen Grüßen

C.H.Florian

Florian Software
Ferdinand-Abt-Str. 3A
65510 Idstein
Germany
Tel.: 06126/5097041
Internet: www.florian-sw.de

Am 21.12.2015 um 14:25 schrieb Anthony:
Do you mean the records are being inserted/updated without those 
template values?


Can you attach a minimal app that reproduces the problem?

Anthony

On Monday, December 21, 2015 at 7:24:04 AM UTC-5, Karl Florian wrote:

*/Hi,/*
*/I too upgraded to this Version./*
*/
/*
*/My issue is the following controller function worked in the
previous versions but not in this one./*
*/
/*
*/The onvalidation def txtlabel_valupd(form): is not filling my
form.vars.titel and form.vars.posting /*
*/as it did in previous versions!?/*
*/
/*
*/If form.vars.title is empty the function should get the title
and posting out of the text-template db/*
*/and fill them into the form fields. But it doesn't./*
*/Is there anything wrong with the coding?/*
*/Or is there a better way of moving the field values out of the
texttemplate (alltext) table/*
*/into the textlabel (/altxtlbl/) table ?/*


*This is my code and table definitions:*
*
*
_def txtlabel_edit():_
def txtlabel_valupd(form):
if len(form.vars.text_mc) >0 and len(form.vars.titel)<=0:
   
alltxtrec=db(db.alltext.text_mc==form.vars.text_mc).select().first()

if alltxtrec:
form.vars.titel=alltxtrec.titel
form.vars.posting=alltxtrec.posting

def txtlabel_valnew(form):
if len(form.vars.text_mc) >0 and len(form.vars.titel)<=0:
   
alltxtrecs=db(db.alltext.text_mc==form.vars.text_mc).select()

if alltxtrecs[0]:
form.vars.titel=alltxtrecs[0].titel
form.vars.posting=alltxtrecs[0].posting

db.altxtlbl.text_mc.requires =
IS_EMPTY_OR(IS_IN_DB(db,db.alltext.text_mc,'alltext.description'))
if len(request.args):
session.recstat = 'upd'
req_id=request.args(0)
record = db.altxtlbl(request.args(0))
btn_list = [TAG.button(SPAN(_class="icon-arrow-left
glyphicon glyphicon-arrow-left"),' Back',_type='button', _onClick
= "parent.location='%s' " %
URL('txtlabel_grid')),TAG.button(SPAN(_class="icon-ok glyphicon
glyphicon-ok"),' Submit', _type='submit', _id='submit_btn'),
TAG.button(SPAN(_class="icon-refresh glyphicon
glyphicon-refresh"),' Reset', _type='reset', _onclick='return
confirm("Are you sure you want to reset the form?");',
_id='clear_btn'),TAG.button(SPAN(_class="icon-pencil glyphicon
glyphicon-pencil"),' New-Label',_type='button',_onClick =
"parent.location='%s' " % URL('orders', 'txtlabel_edit',
args=[])),TAG.button(SPAN(_class="icon-print glyphicon
glyphicon-print"),' Txt-Label',_type='button',_onClick =
"parent.location='%s' " % URL('print_txtlabel', args=req_id))]
db.altxtlbl.posting.requires = requires=IS_LENGTH(1000,30)
form = SQLFORM(db.altxtlbl,
record,
buttons = btn_list,
formstyle = 'table3cols',
user_signature=True)
form.process(onvalidation=txtlabel_valupd,
session=settings.editsession)
if form.accepted:
response.flash = 'record saved'
redirect(URL('txtlabel_edit', args=form.vars.id
))
elif form.errors:
response.flash = 'form has errors'
else:

db.define_table(
'alltext',
Field('text_mc', 'string', length=8, unique=True,
label='Text-MC'),
Field('description', 'string', length=50,
requires=IS_NOT_EMPTY(), label='Description'),
Field('titel', 'string', length=50, requires=IS_NOT_EMPTY(),
label='Titel'),
Field('posting', 'text', length=1000,
requires=IS_LENGTH(1000,30), label='Text'),
Field('date_changed', 'datetime', update = request.now,
writable = False, label=T('Modified')),
Field('user_id', 'reference auth_user', update=auth.user and
auth.user.id , writable = False, readable =
False),
migrate=settings.migrapp,
redefine=settings.redefin,
format='%(text_mc)s'
)
db.alltext.text_mc.requires = [IS_NOT_IN_DB(db,
'alltext.text_mc'), IS_UPPER(), IS_LENGTH(minsize=2, maxsize=8)]

db.define_table(
'altxtlbl',
Field('order_date'

[web2py] Re: Scheduler worker name

2015-12-21 Thread Gael Princivalle
Done!

Here is the solution:
Delete scheduler.py file
Delete scheduler table files
Delete scheduler tables in db
Create again the scheduler
At this point running the admin just create the table files but not the 
tables in the db
Restarting the server db tables are created

AND! Now scheduler works.

Il giorno lunedì 21 dicembre 2015 09:35:20 UTC+1, Niphlod ha scritto:
>
> there's no way .table files are created but tables aren't ... please 
> triple check your settings 
>
> On Sunday, December 20, 2015 at 9:28:39 PM UTC+1, Gael Princivalle wrote:
>>
>> Now tables files are created in the database folder, but tables are not 
>> created in the postgress DB.
>> Error in always the same when I try to open a table from the 
>> administration interface.
>>
>> ProgrammingError: relation "scheduler_worker" does not exist
>> LINE 1: SELECT count(*) FROM "scheduler_worker" WHERE ("scheduler_wo...
>>
>>
>> About migrations my db is like that:
>> db = DAL('postgres://user:pass@localhost:5432/postg_db', 
>> check_reserved=['all'], pool_size=1, entity_quoting=True, bigint_id=True, 
>> migrate=True, fake_migrate_all=True)
>>
>> And I've saw also that in the complete scheduler signature you can set 
>> migrate to True so in scheduler.py I have:
>> Scheduler(db, dict(e_db=e_db, update_products_auto=update_products_auto, 
>> sitemap_txt_auto=sitemap_txt_auto), migrate=True)
>>
>> PostgreSQL tables are not created.
>> So this is a desperate attempt, deleting all scheduler and create it 
>> again. I've done it for resolving this scheduler problem, it don't runs for 
>> all my old four applications that I've moved with "pack all" from 2.9.12. 
>> version to this 2.12.3 version. DB's are new. I've moved data with 
>> export/import linux commands, pg_dump, psql.
>>
>> And for new applications scheduler runs.
>>
>> How can I make the debug of it?
>>
>> Thanks.
>>
>>
>> Il giorno domenica 20 dicembre 2015 13:51:45 UTC+1, Niphlod ha scritto:
>>>
>>> you just had to delete corresponding .table files. scheduler tables are 
>>> created as soon as the scheduler is istantiated, unless migrations are 
>>> turned off.
>>>
>>> On Friday, December 18, 2015 at 4:17:48 PM UTC+1, Gael Princivalle wrote:

 No I don't.

 But now I have:
 Dropped all tables in the database folder
 Delete all scheduler tables in the postgress database.
 Delete the scheduler
 Create the scheduler.
 I still have the same db error, for example for workers:

 SELECT count(*) FROM "scheduler_worker" WHERE ("scheduler_wo...

 table files are created but not for scheduler tables
 scheduler tables in postgress db are not created.

 Do you know why?

 Il giorno venerdì 18 dicembre 2015 15:48:06 UTC+1, Niphlod ha scritto:
>
> when you dropped tables, did you remember to delete the corresponding 
> *.table files from the databases/ folder ?
>
> On Friday, December 18, 2015 at 12:47:38 PM UTC+1, Gael Princivalle 
> wrote:
>>
>> >scheduler tables can be dropped manually
>> Done
>>
>> >deleting scheduler.py also.
>> Done
>>
>> >But I still don't think that it's the way to fix the issue you're 
>> facing.
>> Well I'm not able to understand which is this problem, as when I 
>> create a scheduler in a new app tasks are running.
>> For the moment creating a new scheduler is my better idea, if you 
>> have a better one thanks.
>>
>> Anyway now I've got this error when I try to open the scheduler 
>> table, for example scheduler_task.
>> My db string have now migrate=True, fake_migrate_all=True.
>> My only other idea is rebuild all the app starting from a new one, 
>> but if I can resolve it in a shorter way I prefer.
>>
>> Traceback (most recent call last):
>>   File 
>> "/home/tasko/webapps/w2p_2_12_3/web2py/applications/hydrover_oleodinamica/controllers/appadmin.py",
>>  line 238, in select
>> nrows = db(query).count()
>>   File 
>> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/objects.py",
>>  line 1992, in count
>> return db._adapter.count(self.query,distinct)
>>   File 
>> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/adapters/base.py",
>>  line 1311, in count
>> self.execute(self._count(query, distinct))
>>   File 
>> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
>>  line 360, in execute
>> return BaseAdapter.execute(self, *a, **b)
>>   File 
>> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/adapters/base.py",
>>  line 1378, in execute
>> return self.log_execute(*a, **b)
>>   File 
>> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/adapters/base.py",
>>  line 1372, in log_execute
>> ret = self.cursor.execute(command, *a[1:], **b)
>> ProgrammingError: relation "s

[web2py] Re: web2py 2.13.1 is OUT

2015-12-21 Thread Anthony
Do you mean the records are being inserted/updated without those template 
values?

Can you attach a minimal app that reproduces the problem?

Anthony

On Monday, December 21, 2015 at 7:24:04 AM UTC-5, Karl Florian wrote:
>
> *Hi,*
> *I too upgraded to this Version.*
>
> *My issue is the following controller function worked in the previous 
> versions but not in this one.*
>
> *The onvalidation def txtlabel_valupd(form): is not filling my 
> form.vars.titel and form.vars.posting *
> *as it did in previous versions!?*
>
> *If form.vars.title is empty the function should get the title and posting 
> out of the text-template db*
> *and fill them into the form fields. But it doesn't.*
> *Is there anything wrong with the coding?* 
> *Or is there a better way of moving the field values out of the 
> texttemplate (alltext) table*
> *into the textlabel (altxtlbl) table ?*
>
>
> *This is my code and table definitions:*
>
> *def txtlabel_edit():*
> def txtlabel_valupd(form):
> if len(form.vars.text_mc) >0 and len(form.vars.titel)<=0:
> 
> alltxtrec=db(db.alltext.text_mc==form.vars.text_mc).select().first()
> if alltxtrec:
> form.vars.titel=alltxtrec.titel
> form.vars.posting=alltxtrec.posting
>
> def txtlabel_valnew(form):
> if len(form.vars.text_mc) >0 and len(form.vars.titel)<=0:
> alltxtrecs=db(db.alltext.text_mc==form.vars.text_mc).select()
> if alltxtrecs[0]:
> form.vars.titel=alltxtrecs[0].titel
> form.vars.posting=alltxtrecs[0].posting
>
> db.altxtlbl.text_mc.requires = 
> IS_EMPTY_OR(IS_IN_DB(db,db.alltext.text_mc,'alltext.description'))
> if len(request.args):
> session.recstat = 'upd'
> req_id=request.args(0)
> record = db.altxtlbl(request.args(0))
> btn_list = [TAG.button(SPAN(_class="icon-arrow-left glyphicon 
> glyphicon-arrow-left"),' Back',_type='button', _onClick = 
> "parent.location='%s' " % 
> URL('txtlabel_grid')),TAG.button(SPAN(_class="icon-ok glyphicon 
> glyphicon-ok"),' Submit', _type='submit', _id='submit_btn'), 
> TAG.button(SPAN(_class="icon-refresh glyphicon glyphicon-refresh"),' 
> Reset', _type='reset', _onclick='return confirm("Are you sure you want to 
> reset the form?");', _id='clear_btn'),TAG.button(SPAN(_class="icon-pencil 
> glyphicon glyphicon-pencil"),' New-Label',_type='button',_onClick = 
> "parent.location='%s' " % URL('orders', 'txtlabel_edit', 
> args=[])),TAG.button(SPAN(_class="icon-print glyphicon glyphicon-print"),' 
> Txt-Label',_type='button',_onClick = "parent.location='%s' " % 
> URL('print_txtlabel', args=req_id))]
> db.altxtlbl.posting.requires =  requires=IS_LENGTH(1000,30)
> 
> form = SQLFORM(db.altxtlbl, 
> record,
> buttons = btn_list,
> formstyle = 'table3cols',
> user_signature=True)
> form.process(onvalidation=txtlabel_valupd, 
> session=settings.editsession) 
> if form.accepted:
> response.flash = 'record saved'
> redirect(URL('txtlabel_edit', args=form.vars.id))
> elif form.errors:
> response.flash = 'form has errors'
> else:
>
> db.define_table(
> 'alltext',
> Field('text_mc', 'string', length=8, unique=True, label='Text-MC'),
> Field('description', 'string', length=50, requires=IS_NOT_EMPTY(), 
> label='Description'),
> Field('titel', 'string', length=50, requires=IS_NOT_EMPTY(), 
> label='Titel'),
> Field('posting', 'text', length=1000, requires=IS_LENGTH(1000,30), 
> label='Text'),
> Field('date_changed', 'datetime', update = request.now, writable = 
> False, label=T('Modified')),
> Field('user_id', 'reference auth_user', update=auth.user and 
> auth.user.id, writable = False, readable = False),
> migrate=settings.migrapp,
> redefine=settings.redefin,
> format='%(text_mc)s'
> )
> db.alltext.text_mc.requires = [IS_NOT_IN_DB(db, 'alltext.text_mc'), 
> IS_UPPER(), IS_LENGTH(minsize=2, maxsize=8)]
>
> db.define_table(
> 'altxtlbl',
> Field('order_date', 'datetime', default = request.now, 
> label='Order-Date'),
> Field('text_mc', 'string', length=8, label='Text-MC'),
> Field('titel', 'string', length=50, label='Titel'),
> Field('posting', 'text', length=1000, label='Text'),
> Field('no_label', 'integer', notnull=True, requires = 
> IS_INT_IN_RANGE(1, 1), label='No-of-Label'),
> Field('client_mc', 'string', length=8, requires = 
> IS_IN_DB(db,db.alcustomers.cust_mc,'alcustomers.name1'), label='Client-MC'),
> Field('orderdatemc', 'string', length=25, compute=lambda r: '%s%s' % 
> (r.text_mc,r.order_date), label='Order-MC-Date'),
> Field('date_printed', 'datetime', writable = False, 
> label='Date-Printed'),
> Field('date_created', 'datetime', default = request.now, writable = 
> False, label='Created'),
> Field('dat

[web2py] Re: SSL error with CAS after upgrade to 32 bit python 2.7.10 on Windows (ActiveState python)

2015-12-21 Thread Niphlod
and probably due to https cert verification turned 
on https://www.python.org/dev/peps/pep-0476/ . Are you using a valid 
cert ?

On Monday, December 21, 2015 at 2:19:34 PM UTC+1, Niphlod wrote:
>
> this is more of a python installation issue rather than a web2py one 
>
> On Monday, December 21, 2015 at 12:57:00 PM UTC+1, Tim Richardson wrote:
>>
>> Upgrading from python 2.7.8 to 2.7.10 causes me these errors with using 
>> CAS. This is with web2py 2.12.3 and 2.13.1 
>> On Windows Server 2008 R2. 
>>
>>
>> Version:0.9 StartHTML:0241 EndHTML:0446 StartFragment:0275 
>> EndFragment:0410 SourceURL:
>> https://mmcserver.vci.com.au:8040/admin/default/ticket/commission/127.0.0.1.2015-12-21.22-51-22.921a24aa-38c5-4b99-a716-33f09dbf1484
>>  > 'exceptions.IOError'> [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] 
>> certificate verify failed (_ssl.c:590)
>>
>> Modules are built with standard python package management (pip). 
>>
>>
>> Full trace is:
>>
>> Version:0.9 StartHTML:0241 EndHTML:00010123 StartFragment:0275 
>> EndFragment:00010087 SourceURL:
>> https://mmcserver.vci.com.au:8040/admin/default/ticket/commission/127.0.0.1.2015-12-21.22-51-22.921a24aa-38c5-4b99-a716-33f09dbf1484
>>  
>>
>>   File "e:\web2py\web2py_intranet\gluon\restricted.py", line 227, in 
>> restricted
>> exec ccode in environment
>>   File 
>> "e:/web2py/web2py_intranet/applications/commission/controllers/default.py" 
>> ,
>>  line 416, in 
>>   File "e:\web2py\web2py_intranet\gluon\globals.py", line 412, in 
>> self._caller = lambda f: f()
>>   File 
>> "e:/web2py/web2py_intranet/applications/commission/controllers/default.py" 
>> ,
>>  line 42, in user
>> return dict(form=auth())
>>   File "e:\web2py\web2py_intranet\gluon\tools.py", line 1923, in __call__
>> return getattr(self, args[0])()
>>   File "e:\web2py\web2py_intranet\gluon\tools.py", line 3029, in login
>> redirect(cas.login_url(next),
>>   File "e:\web2py\web2py_intranet\gluon\contrib\login_methods\cas_auth.py", 
>> line 66, in login_url
>> current.session.token = self._CAS_login()
>>   File "e:\web2py\web2py_intranet\gluon\contrib\login_methods\cas_auth.py", 
>> line 98, in _CAS_login
>> data = urllib.urlopen(url).read()
>>   File "E:\Python27_32\lib\urllib.py", line 87, in urlopen
>> return opener.open(url)
>>   File "E:\Python27_32\lib\urllib.py", line 213, in open
>> return getattr(self, name)(url)
>>   File "E:\Python27_32\lib\urllib.py", line 443, in open_https
>> h.endheaders(data)
>>   File "E:\Python27_32\lib\httplib.py", line 1049, in endheaders
>> self._send_output(message_body)
>>   File "E:\Python27_32\lib\httplib.py", line 893, in _send_output
>> self.send(msg)
>>   File "E:\Python27_32\lib\httplib.py", line 855, in send
>> self.connect()
>>   File "E:\Python27_32\lib\httplib.py", line 1274, in connect
>> server_hostname=server_hostname)
>>   File "E:\Python27_32\lib\ssl.py", line 352, in wrap_socket
>> _context=self)
>>   File "E:\Python27_32\lib\ssl.py", line 579, in __init__
>> self.do_handshake()
>>   File "E:\Python27_32\lib\ssl.py", line 808, in do_handshake
>> self._sslobj.do_handshake()
>> IOError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
>> verify failed (_ssl.c:590)
>>
>>

-- 
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: manual form and SQLFORM question

2015-12-21 Thread Anthony
I don't see why this requires two forms. Just make the db.tests.questions a 
list:reference field and display a single table via SQLFORM(db.tests). 
You'll get a multi-select box with all the questions as options. If you 
prefer checkboxes, you can do:

Field('questions', 'list:reference questions',
  widget=SQLFORM.widgets.checkboxes.widget)

To display the questions as desired, be sure to set the "format" attribute 
of the db.questions table. If you need a representation more complex than 
can be handled with Python string formatting, the "format" attribute can be 
a function that returns any string or HTML helper object. Alternatively, 
you can specify the "represent" attribute of the db.tests.questions field.

Even if you don't want to use a list:reference field for some reason, you 
could still construct a single custom table to allow selection of the 
questions along with the other test parameters.

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: SSL error with CAS after upgrade to 32 bit python 2.7.10 on Windows (ActiveState python)

2015-12-21 Thread Niphlod
this is more of a python installation issue rather than a web2py one 

On Monday, December 21, 2015 at 12:57:00 PM UTC+1, Tim Richardson wrote:
>
> Upgrading from python 2.7.8 to 2.7.10 causes me these errors with using 
> CAS. This is with web2py 2.12.3 and 2.13.1 
> On Windows Server 2008 R2. 
>
>
> Version:0.9 StartHTML:0241 EndHTML:0446 StartFragment:0275 
> EndFragment:0410 SourceURL:
> https://mmcserver.vci.com.au:8040/admin/default/ticket/commission/127.0.0.1.2015-12-21.22-51-22.921a24aa-38c5-4b99-a716-33f09dbf1484
>   'exceptions.IOError'> [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] 
> certificate verify failed (_ssl.c:590)
>
> Modules are built with standard python package management (pip). 
>
>
> Full trace is:
>
> Version:0.9 StartHTML:0241 EndHTML:00010123 StartFragment:0275 
> EndFragment:00010087 SourceURL:
> https://mmcserver.vci.com.au:8040/admin/default/ticket/commission/127.0.0.1.2015-12-21.22-51-22.921a24aa-38c5-4b99-a716-33f09dbf1484
>  
>
>   File "e:\web2py\web2py_intranet\gluon\restricted.py", line 227, in 
> restricted
> exec ccode in environment
>   File 
> "e:/web2py/web2py_intranet/applications/commission/controllers/default.py" 
> ,
>  line 416, in 
>   File "e:\web2py\web2py_intranet\gluon\globals.py", line 412, in 
> self._caller = lambda f: f()
>   File 
> "e:/web2py/web2py_intranet/applications/commission/controllers/default.py" 
> ,
>  line 42, in user
> return dict(form=auth())
>   File "e:\web2py\web2py_intranet\gluon\tools.py", line 1923, in __call__
> return getattr(self, args[0])()
>   File "e:\web2py\web2py_intranet\gluon\tools.py", line 3029, in login
> redirect(cas.login_url(next),
>   File "e:\web2py\web2py_intranet\gluon\contrib\login_methods\cas_auth.py", 
> line 66, in login_url
> current.session.token = self._CAS_login()
>   File "e:\web2py\web2py_intranet\gluon\contrib\login_methods\cas_auth.py", 
> line 98, in _CAS_login
> data = urllib.urlopen(url).read()
>   File "E:\Python27_32\lib\urllib.py", line 87, in urlopen
> return opener.open(url)
>   File "E:\Python27_32\lib\urllib.py", line 213, in open
> return getattr(self, name)(url)
>   File "E:\Python27_32\lib\urllib.py", line 443, in open_https
> h.endheaders(data)
>   File "E:\Python27_32\lib\httplib.py", line 1049, in endheaders
> self._send_output(message_body)
>   File "E:\Python27_32\lib\httplib.py", line 893, in _send_output
> self.send(msg)
>   File "E:\Python27_32\lib\httplib.py", line 855, in send
> self.connect()
>   File "E:\Python27_32\lib\httplib.py", line 1274, in connect
> server_hostname=server_hostname)
>   File "E:\Python27_32\lib\ssl.py", line 352, in wrap_socket
> _context=self)
>   File "E:\Python27_32\lib\ssl.py", line 579, in __init__
> self.do_handshake()
>   File "E:\Python27_32\lib\ssl.py", line 808, in do_handshake
> self._sslobj.do_handshake()
> IOError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
> verify failed (_ssl.c:590)
>
>

-- 
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: Form processing: multiple forms

2015-12-21 Thread Anthony

>
> if form1.process(formname="form_one").accepted:
> form2 = FORM(INPUT(_id = '0', _name = '0'),
> INPUT(_id = '1', _name = '1'),
> INPUT(_id = '2', _name = '2'),
> INPUT(_type='submit', _value="submit"))
> 
> if form2.process(formname="form_two"):
> e = {'p':'process ok'}
> elif form2.accepted:
> e =  form2.vars
> else:
> e = {'s':'something else'}
> return {'form2':form2, 'e':e}   
>

form2 is only processed when form1 is submitted and accepted, so when you 
submit form2, the "if form1.process(formname="form_
one").accepted" condition will be false, and none of the remaining code 
will be executed.

After form1, you might instead want to redirect to another action to handle 
form2. If you want to handle two forms in the same action, and the second 
depends on the first having been submitted, may store a flag in the session 
indicating that, and serve/process form2 contingent on that flag being 
there (reset the flag after form2 has been submitted).

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: web2py 2.13.1 is OUT

2015-12-21 Thread Karl Florian
*Hi,*
*I too upgraded to this Version.*

*My issue is the following controller function worked in the previous 
versions but not in this one.*

*The onvalidation def txtlabel_valupd(form): is not filling my 
form.vars.titel and form.vars.posting *
*as it did in previous versions!?*

*If form.vars.title is empty the function should get the title and posting 
out of the text-template db*
*and fill them into the form fields. But it doesn't.*
*Is there anything wrong with the coding?* 
*Or is there a better way of moving the field values out of the 
texttemplate (alltext) table*
*into the textlabel (altxtlbl) table ?*


*This is my code and table definitions:*

*def txtlabel_edit():*
def txtlabel_valupd(form):
if len(form.vars.text_mc) >0 and len(form.vars.titel)<=0:

alltxtrec=db(db.alltext.text_mc==form.vars.text_mc).select().first()
if alltxtrec:
form.vars.titel=alltxtrec.titel
form.vars.posting=alltxtrec.posting

def txtlabel_valnew(form):
if len(form.vars.text_mc) >0 and len(form.vars.titel)<=0:
alltxtrecs=db(db.alltext.text_mc==form.vars.text_mc).select()
if alltxtrecs[0]:
form.vars.titel=alltxtrecs[0].titel
form.vars.posting=alltxtrecs[0].posting

db.altxtlbl.text_mc.requires = 
IS_EMPTY_OR(IS_IN_DB(db,db.alltext.text_mc,'alltext.description'))
if len(request.args):
session.recstat = 'upd'
req_id=request.args(0)
record = db.altxtlbl(request.args(0))
btn_list = [TAG.button(SPAN(_class="icon-arrow-left glyphicon 
glyphicon-arrow-left"),' Back',_type='button', _onClick = 
"parent.location='%s' " % 
URL('txtlabel_grid')),TAG.button(SPAN(_class="icon-ok glyphicon 
glyphicon-ok"),' Submit', _type='submit', _id='submit_btn'), 
TAG.button(SPAN(_class="icon-refresh glyphicon glyphicon-refresh"),' 
Reset', _type='reset', _onclick='return confirm("Are you sure you want to 
reset the form?");', _id='clear_btn'),TAG.button(SPAN(_class="icon-pencil 
glyphicon glyphicon-pencil"),' New-Label',_type='button',_onClick = 
"parent.location='%s' " % URL('orders', 'txtlabel_edit', 
args=[])),TAG.button(SPAN(_class="icon-print glyphicon glyphicon-print"),' 
Txt-Label',_type='button',_onClick = "parent.location='%s' " % 
URL('print_txtlabel', args=req_id))]
db.altxtlbl.posting.requires =  requires=IS_LENGTH(1000,30)

form = SQLFORM(db.altxtlbl, 
record,
buttons = btn_list,
formstyle = 'table3cols',
user_signature=True)
form.process(onvalidation=txtlabel_valupd, 
session=settings.editsession) 
if form.accepted:
response.flash = 'record saved'
redirect(URL('txtlabel_edit', args=form.vars.id))
elif form.errors:
response.flash = 'form has errors'
else:

db.define_table(
'alltext',
Field('text_mc', 'string', length=8, unique=True, label='Text-MC'),
Field('description', 'string', length=50, requires=IS_NOT_EMPTY(), 
label='Description'),
Field('titel', 'string', length=50, requires=IS_NOT_EMPTY(), 
label='Titel'),
Field('posting', 'text', length=1000, requires=IS_LENGTH(1000,30), 
label='Text'),
Field('date_changed', 'datetime', update = request.now, writable = 
False, label=T('Modified')),
Field('user_id', 'reference auth_user', update=auth.user and 
auth.user.id, writable = False, readable = False),
migrate=settings.migrapp,
redefine=settings.redefin,
format='%(text_mc)s'
)
db.alltext.text_mc.requires = [IS_NOT_IN_DB(db, 'alltext.text_mc'), 
IS_UPPER(), IS_LENGTH(minsize=2, maxsize=8)]

db.define_table(
'altxtlbl',
Field('order_date', 'datetime', default = request.now, 
label='Order-Date'),
Field('text_mc', 'string', length=8, label='Text-MC'),
Field('titel', 'string', length=50, label='Titel'),
Field('posting', 'text', length=1000, label='Text'),
Field('no_label', 'integer', notnull=True, requires = 
IS_INT_IN_RANGE(1, 1), label='No-of-Label'),
Field('client_mc', 'string', length=8, requires = 
IS_IN_DB(db,db.alcustomers.cust_mc,'alcustomers.name1'), label='Client-MC'),
Field('orderdatemc', 'string', length=25, compute=lambda r: '%s%s' % 
(r.text_mc,r.order_date), label='Order-MC-Date'),
Field('date_printed', 'datetime', writable = False, 
label='Date-Printed'),
Field('date_created', 'datetime', default = request.now, writable = 
False, label='Created'),
Field('date_changed', 'datetime', update = request.now, writable = 
False, label='Modified'),
Field('user_id', 'reference auth_user', update=auth.user and 
auth.user.id, writable = False, readable = False),
migrate=settings.migrapp,
redefine=settings.redefin,
format='%(order_date)s %(text_mc)s'
)
db.altxtlbl.orderdatemc.requires = [IS_NOT_IN_DB(db, 
'altxtlbl.orderdatemc')]
db.altxtlbl.titel.requires = requires=IS_LENGTH(50,

[web2py] SSL error with CAS after upgrade to 32 bit python 2.7.10 on Windows (ActiveState python)

2015-12-21 Thread Tim Richardson
Upgrading from python 2.7.8 to 2.7.10 causes me these errors with using 
CAS. This is with web2py 2.12.3 and 2.13.1 
On Windows Server 2008 R2. 


Version:0.9 StartHTML:0241 EndHTML:0446 StartFragment:0275 
EndFragment:0410 
SourceURL:https://mmcserver.vci.com.au:8040/admin/default/ticket/commission/127.0.0.1.2015-12-21.22-51-22.921a24aa-38c5-4b99-a716-33f09dbf1484
 
 [Errno socket error] [SSL: 
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

Modules are built with standard python package management (pip). 


Full trace is:

Version:0.9 StartHTML:0241 EndHTML:00010123 StartFragment:0275 
EndFragment:00010087 
SourceURL:https://mmcserver.vci.com.au:8040/admin/default/ticket/commission/127.0.0.1.2015-12-21.22-51-22.921a24aa-38c5-4b99-a716-33f09dbf1484
 


  File "e:\web2py\web2py_intranet\gluon\restricted.py", line 227, in restricted
exec ccode in environment
  File 
"e:/web2py/web2py_intranet/applications/commission/controllers/default.py" 
,
 line 416, in 
  File "e:\web2py\web2py_intranet\gluon\globals.py", line 412, in 
self._caller = lambda f: f()
  File 
"e:/web2py/web2py_intranet/applications/commission/controllers/default.py" 
,
 line 42, in user
return dict(form=auth())
  File "e:\web2py\web2py_intranet\gluon\tools.py", line 1923, in __call__
return getattr(self, args[0])()
  File "e:\web2py\web2py_intranet\gluon\tools.py", line 3029, in login
redirect(cas.login_url(next),
  File "e:\web2py\web2py_intranet\gluon\contrib\login_methods\cas_auth.py", 
line 66, in login_url
current.session.token = self._CAS_login()
  File "e:\web2py\web2py_intranet\gluon\contrib\login_methods\cas_auth.py", 
line 98, in _CAS_login
data = urllib.urlopen(url).read()
  File "E:\Python27_32\lib\urllib.py", line 87, in urlopen
return opener.open(url)
  File "E:\Python27_32\lib\urllib.py", line 213, in open
return getattr(self, name)(url)
  File "E:\Python27_32\lib\urllib.py", line 443, in open_https
h.endheaders(data)
  File "E:\Python27_32\lib\httplib.py", line 1049, in endheaders
self._send_output(message_body)
  File "E:\Python27_32\lib\httplib.py", line 893, in _send_output
self.send(msg)
  File "E:\Python27_32\lib\httplib.py", line 855, in send
self.connect()
  File "E:\Python27_32\lib\httplib.py", line 1274, in connect
server_hostname=server_hostname)
  File "E:\Python27_32\lib\ssl.py", line 352, in wrap_socket
_context=self)
  File "E:\Python27_32\lib\ssl.py", line 579, in __init__
self.do_handshake()
  File "E:\Python27_32\lib\ssl.py", line 808, in do_handshake
self._sslobj.do_handshake()
IOError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed (_ssl.c:590)

-- 
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] Form processing: multiple forms

2015-12-21 Thread Martin

I would like to generate a form2  based on input from form1.

#Normal processing in test2 works fine. so all ok if both forms are made on 
init of page.

def test2():
action = request.args(0)

form1 = FORM(
INPUT(_id = 'foo', _name = 'foo'),
INPUT(_type='submit', _value="submit")
)

form2 = FORM(INPUT(_id = '0', _name = '0'),
INPUT(_id = '1', _name = '1'),
INPUT(_id = '2', _name = '2'),
INPUT(_type='submit', _value="submit"))
   
f1_vars = False
f2_vars = False
if form1.process(formname="form_one").accepted:
f1_vars = form1.vars

if form2.accepts(request.vars, session, formname="form_two"):
f2_vars = form2.vars

return {'form1':form1, 'form2':form2, 'f1v':f1_vars, 'f2v':f2_vars}


## This section is not working - why ??
# form is processing, but not accepted on submit. 


def test():

form1 = FORM(
INPUT(_id = 'foo', _name = 'foo'),
INPUT(_type='submit', _value="submit")
)

form1_vars = False
form2_vars = False
form2 = False
e = {}
if form1.process(formname="form_one").accepted:
form2 = FORM(INPUT(_id = '0', _name = '0'),
INPUT(_id = '1', _name = '1'),
INPUT(_id = '2', _name = '2'),
INPUT(_type='submit', _value="submit"))

if form2.process(formname="form_two"):
e = {'p':'process ok'}
elif form2.accepted:
e =  form2.vars
else:
e = {'s':'something else'}
return {'form2':form2, 'e':e}   
return locals()

-- 
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 worker name

2015-12-21 Thread Niphlod
there's no way .table files are created but tables aren't ... please triple 
check your settings 

On Sunday, December 20, 2015 at 9:28:39 PM UTC+1, Gael Princivalle wrote:
>
> Now tables files are created in the database folder, but tables are not 
> created in the postgress DB.
> Error in always the same when I try to open a table from the 
> administration interface.
>
> ProgrammingError: relation "scheduler_worker" does not exist
> LINE 1: SELECT count(*) FROM "scheduler_worker" WHERE ("scheduler_wo...
>
>
> About migrations my db is like that:
> db = DAL('postgres://user:pass@localhost:5432/postg_db', 
> check_reserved=['all'], pool_size=1, entity_quoting=True, bigint_id=True, 
> migrate=True, fake_migrate_all=True)
>
> And I've saw also that in the complete scheduler signature you can set 
> migrate to True so in scheduler.py I have:
> Scheduler(db, dict(e_db=e_db, update_products_auto=update_products_auto, 
> sitemap_txt_auto=sitemap_txt_auto), migrate=True)
>
> PostgreSQL tables are not created.
> So this is a desperate attempt, deleting all scheduler and create it 
> again. I've done it for resolving this scheduler problem, it don't runs for 
> all my old four applications that I've moved with "pack all" from 2.9.12. 
> version to this 2.12.3 version. DB's are new. I've moved data with 
> export/import linux commands, pg_dump, psql.
>
> And for new applications scheduler runs.
>
> How can I make the debug of it?
>
> Thanks.
>
>
> Il giorno domenica 20 dicembre 2015 13:51:45 UTC+1, Niphlod ha scritto:
>>
>> you just had to delete corresponding .table files. scheduler tables are 
>> created as soon as the scheduler is istantiated, unless migrations are 
>> turned off.
>>
>> On Friday, December 18, 2015 at 4:17:48 PM UTC+1, Gael Princivalle wrote:
>>>
>>> No I don't.
>>>
>>> But now I have:
>>> Dropped all tables in the database folder
>>> Delete all scheduler tables in the postgress database.
>>> Delete the scheduler
>>> Create the scheduler.
>>> I still have the same db error, for example for workers:
>>>
>>> SELECT count(*) FROM "scheduler_worker" WHERE ("scheduler_wo...
>>>
>>> table files are created but not for scheduler tables
>>> scheduler tables in postgress db are not created.
>>>
>>> Do you know why?
>>>
>>> Il giorno venerdì 18 dicembre 2015 15:48:06 UTC+1, Niphlod ha scritto:

 when you dropped tables, did you remember to delete the corresponding 
 *.table files from the databases/ folder ?

 On Friday, December 18, 2015 at 12:47:38 PM UTC+1, Gael Princivalle 
 wrote:
>
> >scheduler tables can be dropped manually
> Done
>
> >deleting scheduler.py also.
> Done
>
> >But I still don't think that it's the way to fix the issue you're 
> facing.
> Well I'm not able to understand which is this problem, as when I 
> create a scheduler in a new app tasks are running.
> For the moment creating a new scheduler is my better idea, if you have 
> a better one thanks.
>
> Anyway now I've got this error when I try to open the scheduler table, 
> for example scheduler_task.
> My db string have now migrate=True, fake_migrate_all=True.
> My only other idea is rebuild all the app starting from a new one, but 
> if I can resolve it in a shorter way I prefer.
>
> Traceback (most recent call last):
>   File 
> "/home/tasko/webapps/w2p_2_12_3/web2py/applications/hydrover_oleodinamica/controllers/appadmin.py",
>  line 238, in select
> nrows = db(query).count()
>   File 
> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/objects.py",
>  line 1992, in count
> return db._adapter.count(self.query,distinct)
>   File 
> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/adapters/base.py",
>  line 1311, in count
> self.execute(self._count(query, distinct))
>   File 
> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/adapters/postgres.py",
>  line 360, in execute
> return BaseAdapter.execute(self, *a, **b)
>   File 
> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/adapters/base.py",
>  line 1378, in execute
> return self.log_execute(*a, **b)
>   File 
> "/home/tasko/webapps/w2p_2_12_3/web2py/gluon/packages/dal/pydal/adapters/base.py",
>  line 1372, in log_execute
> ret = self.cursor.execute(command, *a[1:], **b)
> ProgrammingError: relation "scheduler_task" does not exist
> LINE 1: SELECT count(*) FROM "scheduler_task" WHERE ("scheduler_task...
>
>
>
>
> Il giorno venerdì 18 dicembre 2015 11:58:15 UTC+1, Niphlod ha scritto:
>>
>> scheduler tables can be dropped manually
>> deleting scheduler.py also.
>> But I still don't think that it's the way to fix the issue you're 
>> facing.
>>
>> On Friday, December 18, 2015 at 11:22:57 AM UTC+1, Gael Princivalle 
>> wrote:
>>>