Re: [web2py] PDF view - set printing page size

2015-03-05 Thread Pavel
I am from Central Europe region with a lot of accented characters. U use 
your second solution:
import sys

reload(sys)
sys.setdefaultencoding("utf-8")

pdf.add_font('DejaVu', '',os.path.join(request.folder,'static',
'DejaVuSansCondensed.ttf'), uni=True)



... and now it is all working completely.

Thanks again.

Pavel

-- 
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] Displaying request.vars

2015-03-05 Thread Gael Princivalle
Hello.

I would like to build an URL using request.args.

Something like that:
http://www.mydomain.com/index?{{=request.vars}}";>
Go



But the result is:

http://www.mydomain.com/index?
Go


And it should be:
http://www.mydomain.com/index?product_id=8";>
Go


Someone have a solution?

Thanks, regards.

-- 
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: cache.disk.clear() crashes in appadmin

2015-03-05 Thread Eric Christiaanse
Hi Leonel,

I've removed the cache folder from svn. Everything works fine now with
cache removal :)

Tnx!


2015-03-03 16:21 GMT+01:00 Leonel Câmara :

> Yes, it is created on demand if it isn't there, go ahead and svn delete it.
>
> --
> 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/3usaQxAFY0k/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: Displaying request.vars

2015-03-05 Thread Leonel Câmara
{{import urllib}}
http://www.mydomain.com/index?{{=urllib.urlencode(request.vars)}} 
">
Go


-- 
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] Displaying request.vars

2015-03-05 Thread Anthony
Is it a web2py URL? If so, you can do URL(..., vars=request.vars).

Antony

-- 
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: Displaying request.vars

2015-03-05 Thread 黄祥
index.html
{{=A(_href = URL(vars = dict(product_id = request.vars) ) ) }}

best regards,
stifan

-- 
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: Resizable SQLFORM grid columns?

2015-03-05 Thread Richard Vézina
It use to have an integration of jqgrid in web2py in the pass... It may
still there... If you search the user group a bit you will find details
about it I am pretty sure...

Richard

On Wed, Mar 4, 2015 at 3:21 PM, LoveWeb2py  wrote:

> Although I do like the layout of jqgrid I'm also using custom buttons in
> the sqlform.grid  and have links going back to database versioning. I will
> give jqgrid a shot, but I'd love to hear other thoughts/ideas.
>
>
> On Wednesday, March 4, 2015 at 9:00:52 AM UTC-5, LoveWeb2py wrote:
>>
>> Very nice slice! I'm going to give it a try. Wasn't sure if there was a
>> builtin already with web2py. I'd like to see something integrated with
>> web2py in the future. Maybe I'll write a widget to add to the SQLFORM which
>> could integrated jqgrid.
>>
>> On Wednesday, March 4, 2015 at 8:36:00 AM UTC-5, Willoughby wrote:
>>>
>>> I'd move over to jqgrid for something like that. But I've been using it
>>> for 5+ years, so I'm a bit biased.
>>> I think Tim's update is the latest.  Take a look:
>>> http://www.web2pyslices.com/slice/show/1714/jqgrid-
>>> viewing-and-updating-data
>>>
>>>
>>> On Wednesday, March 4, 2015 at 8:29:45 AM UTC-5, LoveWeb2py wrote:

 Has anyone tried to tackle this before?

 I'd like to be able to resize the SQLFORM.grid columns so the user
 could expand or contract the column similar to excel. I'm guessing I'll
 have to use jquery for this?

 If anyone could point me in the right direction to get started I'd
 really appreciate it.

 Thanks!

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

-- 
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: Displaying request.vars

2015-03-05 Thread Anthony


On Thursday, March 5, 2015 at 6:53:47 AM UTC-5, 黄祥 wrote:
>
> index.html
> {{=A(_href = URL(vars = dict(product_id = request.vars) ) ) }}
>
>
"product_id" is already in request.vars (which acts like a dict), so no 
need to create a new dict with a "product_id" key.

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: how to define field so that it only pulls from auth_user those who have a certain auth_membership?

2015-03-05 Thread Oliver Holloway
This works perfectly, stifan, thank you very much. 

On Thursday, March 5, 2015 at 12:09:10 AM UTC-5, 黄祥 wrote:
>
> perhaps you can achieve it with query on IS_IN_DB validator:
> e.g.
> query_sessions = (
> (db.auth_user.id == db.auth_membership.user_id) &
> (db.auth_membership.group_id == db.auth_group.id) &
> (db.auth_group.role.like('coach'))
> )
>
> db.sessions.coach.requires = IS_IN_DB(db(query_sessions), db.auth_user.id, 
>  '%(first_name)s %(last_name)s')
>
> best regards,
> stifan
>

-- 
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] dbio=False proper way to update every fields not only the one that had changed

2015-03-05 Thread Richard Vézina
Futher check make me confirm which I thought :

**{f: v for f, v in form.vars.iteritems()}

Prevent my compute to work since it return only the fields modify by the
user... I need to understand how web2py really update on form submit and
why compute works in this case...

Or how can I make sure that every fields get update even if there is not
any values change which should be what web2py do...

Richard

On Wed, Mar 4, 2015 at 5:05 PM, Anthony  wrote:

> The update should calculate the computed field as long as all the values
> needed for the calculation are included with the update.
>
> Anthony
>
>
> On Wednesday, March 4, 2015 at 4:55:01 PM UTC-5, Richard wrote:
>>
>> Thanks for answering Anthony,
>>
>> Actually f1 and f2 belongs to the table, I am filtering them because I
>> want to treat them separately...
>>
>> About your question, I am investigating why my compute didn't work... My
>> first impression is that it is not include in form.vars so it not get hit
>> at all... But I am not sure of that...
>>
>> Richard
>>
>> On Wed, Mar 4, 2015 at 4:44 PM, Anthony  wrote:
>>
>>> Does form.vars include all the variables needed by the compute function?
>>>
>>> Also, instead of:
>>>
>>> **{f: v for f, v in form.vars.iteritems()}
>>>
>>> you can do:
>>>
>>> **db[request.args(0)]._filter_fields(form.vars)
>>>
>>> _filter_fields will filter out the "id" field as well as any form.vars
>>> that are not fields in the table.
>>>
>>> Anthony
>>>
>>>
>>>
>>>
>>> On Wednesday, March 4, 2015 at 4:35:37 PM UTC-5, Richard wrote:

 Hello,

 I need to do control record update in order to clear some fields values
 in case a flag is set to false. But doing the update like this :


 db(db[request.args(0)].id == request.args(1)).update(**{f: v for f, v
 in form.vars.iteritems()})

 prevent a compute field to be trigger and updating properly as well...

 So, to make sure my compute field get it I am doing another update()
 like this


 db(db[request.args(0)].id == request.args(1)).update()


 Which work in one case by not in the other where I actually clear some
 values like this :


 db(db[request.args(0)].id == request.args(1)).update(f1=None, f2=None,
 **{f: v for f, v in form.vars.iteritems() if f not in ('f1', 'f2')})


 Maybe I should do a db.commit() before my second "blank" update()
 though it seems to me that it should be a better way and I am concern in
 reducing db hit.

 Thanks

 Richard

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

-- 
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: SQLFORM.factory adding dynamic form

2015-03-05 Thread Ramkrishan Bhatt
 table already defined: address


Anyway i guess you are not understanding requirement :-
SQLFORM.factory(table1,table2,table3)

if form.process().accepted:

  do something.


Now we want like we can add extra add table2 form in dynamically.

like in view


composit form of 

table1

table2 (option for add more form from table2)

table3 (option for add more form from table3)

submit for bulk insert # That i know using dict{}

but how to generate dynamic form from our table. 


On Thursday, 5 March 2015 10:49:34 UTC+5:30, 黄祥 wrote:
>
> perhaps you can create an address table and use list:reference in 
> sqlform.factory
> e.g. (not tested)
> db.define_table('address', Field('address') )
>
> def form_from_factory():
> form = SQLFORM.factory(
> Field('address', *'list:reference', requires = IS_IN_DB(db, 
> db.address.id ,  '%(address)s')* ) )
> if form.process().accepted:
> response.flash = 'form accepted'
> session.address = form.vars.address
> elif form.errors:
> response.flash = 'form has errors'
> return dict(form = form)
>
> best regards,
> stifan
>

-- 
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: Displaying request.vars

2015-03-05 Thread Gael Princivalle
Thanks a lot Leonel, it's exactly what I was searching for.
@Antony thanks but in this case it was not the current web2py url (a .load 
file), but another that calla the .load file.

Il giorno giovedì 5 marzo 2015 12:20:25 UTC+1, Leonel Câmara ha scritto:
>
> {{import urllib}}
> http://www.mydomain.com/index?{{=urllib.urlencode(request.vars)}} 
> ">
> Go
> 
>

-- 
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: Ckeditor plugin - Update ckeditor

2015-03-05 Thread Alex Glaros
can someone tell me how to install the plugin?

assume I've never installed a plugin, don't know what directory to put it 
in, and don't know basic plugin concepts.  Have tried downloading and 
inserting everywhere but need info gaps filled.

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] sqlformfactory smartgrid just search field

2015-03-05 Thread Ron Chatterjee
I like the way the search field shows up using smartgrid in web2py. But I dont 
want the table to b listed below because I want to customize the table display. 
Does anyone one if there way to display just the search box using smartgrid 
without displaying the table underneath.I know there is a way to create a 
search box using "like". But really like the search box from form factory   

-- 
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] sqlformfactory smartgrid just search field

2015-03-05 Thread Ron Chatterjee
I like the way the search field shows up using smartgrid in web2py. But I dont 
want the table to b listed below because I want to customize the table display. 
Does anyone one if there way to display just the search box using smartgrid 
without displaying the table underneath.I know there is a way to create a 
search box using "like". But really like the search box from form factory   

-- 
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] sqlformfactory smartgrid just search field

2015-03-05 Thread Ron Chatterjee
I like the way the search field shows up using smartgrid in web2py. But I dont 
want the table to b listed below because I want to customize the table display. 
Does anyone one if there way to display just the search box using smartgrid 
without displaying the table underneath.I know there is a way to create a 
search box using "like". But really like the search box from form factory   

-- 
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] sqlformfactory smartgrid just search field

2015-03-05 Thread Ron Chatterjee
I like the way the search field shows up using smartgrid in web2py. But I dont 
want the table to b listed below because I want to customize the table display. 
Does anyone one if there way to display just the search box using smartgrid 
without displaying the table underneath.I know there is a way to create a 
search box using "like". But really like the search box from form factory   

-- 
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] sqlformfactory smartgrid just search field

2015-03-05 Thread Ron Chatterjee
I like the way the search field shows up using smartgrid in web2py. But I dont 
want the table to b listed below because I want to customize the table display. 
Does anyone one if there way to display just the search box using smartgrid 
without displaying the table underneath.I know there is a way to create a 
search box using "like". But really like the search box from form factory   

-- 
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: sqlformfactory smartgrid just search field

2015-03-05 Thread Ron Chatterjee



In other words,




On Thursday, March 5, 2015 at 12:26:32 PM UTC-5, Ron Chatterjee wrote:
>
> I like the way the search field shows up using smartgrid in web2py. But I 
> dont want the table to b listed below because I want to customize the table 
> display. Does anyone one if there way to display just the search box using 
> smartgrid without displaying the table underneath.I know there is a way to 
> create a search box using "like". But really like the search box from form 
> factory   

-- 
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: Ckeditor plugin - Update ckeditor

2015-03-05 Thread Willoughby
Have you reviewed the chapter on plugins?
http://web2py.com/books/default/chapter/29/12#Plugins


On Thursday, March 5, 2015 at 12:17:04 PM UTC-5, Alex Glaros wrote:
>
> can someone tell me how to install the plugin?
>
> assume I've never installed a plugin, don't know what directory to put it 
> in, and don't know basic plugin concepts.  Have tried downloading and 
> inserting everywhere but need info gaps filled.
>
> 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: Displaying request.vars

2015-03-05 Thread Anthony
On Thursday, March 5, 2015 at 11:15:27 AM UTC-5, Gael Princivalle wrote:
>
> Thanks a lot Leonel, it's exactly what I was searching for.
> @Antony thanks but in this case it was not the current web2py url (a .load 
> file), but another that calla the .load file.
>

As long as it is a web2py URL, you can and should use the URL function -- 
just specify the controller and function (and app if it's a different app):

URL('default', 'index', vars=request.get_vars, extension=False)

The extension=False argument will suppress the extension, so it won't 
propogate the .load extension.

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: Ckeditor plugin - Update ckeditor

2015-03-05 Thread Alex Glaros
somehow I missed the simplicity of installation - it's installed now but 
resulting web page displays the HTML code instead of implementing them

how to make create the the HTML action and not display the HTML code?

looks like:  gov improvement   testing this 
text editor

the db field that's used is "text".  

thanks

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.


Re: [web2py] Re: Ckeditor plugin - Update ckeditor

2015-03-05 Thread Willoughby
Did you import and initialize it?
https://github.com/timrichardson/web2py_ckeditor4#introduction




On Thursday, March 5, 2015 at 1:26:14 PM UTC-5, Alex Glaros wrote:
>
> somehow I missed the simplicity of installation - it's installed now but 
> resulting web page displays the HTML code instead of implementing them
>
> how to make create the the HTML action and not display the HTML code?
>
> looks like:  gov improvement   testing this 
> text editor
>
> the db field that's used is "text".  
>
> thanks
>
> 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.


Re: [web2py] Re: Ckeditor plugin - Update ckeditor

2015-03-05 Thread Alex Glaros
yes, I imported as stated on slices and github

the only way to get it to display correctly is if escape out, in the view, 
e.g.,

{{=XML(personID.summarySelfDescription, sanitize=False)}}

any ideas why others don't have to escape?

is it safe to do that?

thanks

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.


Re: [web2py] Re: Ckeditor plugin - Update ckeditor

2015-03-05 Thread Alex Glaros
sanitize=TRUE works, don't need 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: Ckeditor plugin - Update ckeditor

2015-03-05 Thread Alex Glaros
sanitize=True doesn't work on all styles/sizes/fonts.  sanitize=False works 
consistently

-- 
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] dbio=False proper way to update every fields not only the one that had changed

2015-03-05 Thread Niphlod
web2py doesn't know if a field has been edited or not. form.vars (for a 
standard web2py form) holds EVERY value, irregardless of the ones touched 
or not by the user... 

On Thursday, March 5, 2015 at 4:17:26 PM UTC+1, Richard wrote:
>
> Futher check make me confirm which I thought : 
>
> **{f: v for f, v in form.vars.iteritems()}
>
> Prevent my compute to work since it return only the fields modify by the 
> user... I need to understand how web2py really update on form submit and 
> why compute works in this case...
>
> Or how can I make sure that every fields get update even if there is not 
> any values change which should be what web2py do...
>
> Richard
>
> On Wed, Mar 4, 2015 at 5:05 PM, Anthony > 
> wrote:
>
>> The update should calculate the computed field as long as all the values 
>> needed for the calculation are included with the update.
>>
>> Anthony
>>
>>
>> On Wednesday, March 4, 2015 at 4:55:01 PM UTC-5, Richard wrote:
>>>
>>> Thanks for answering Anthony,
>>>
>>> Actually f1 and f2 belongs to the table, I am filtering them because I 
>>> want to treat them separately... 
>>>
>>> About your question, I am investigating why my compute didn't work... My 
>>> first impression is that it is not include in form.vars so it not get hit 
>>> at all... But I am not sure of that...
>>>
>>> Richard
>>>
>>> On Wed, Mar 4, 2015 at 4:44 PM, Anthony 
>>> > wrote:
>>>
 Does form.vars include all the variables needed by the compute function?

 Also, instead of:

 **{f: v for f, v in form.vars.iteritems()}

 you can do:

 **db[request.args(0)]._filter_fields(form.vars)

 _filter_fields will filter out the "id" field as well as any form.vars 
 that are not fields in the table.

 Anthony




 On Wednesday, March 4, 2015 at 4:35:37 PM UTC-5, Richard wrote:
>
> Hello,
>
> I need to do control record update in order to clear some fields 
> values in case a flag is set to false. But doing the update like this :
>
>
> db(db[request.args(0)].id == request.args(1)).update(**{f: v for f, v 
> in form.vars.iteritems()})
>
> prevent a compute field to be trigger and updating properly as well...
>
> So, to make sure my compute field get it I am doing another update() 
> like this
>
>
> db(db[request.args(0)].id == request.args(1)).update()
>
>
> Which work in one case by not in the other where I actually clear some 
> values like this :
>
>
> db(db[request.args(0)].id == request.args(1)).update(f1=None, f2=None, 
> **{f: v for f, v in form.vars.iteritems() if f not in ('f1', 'f2')})
>
>
> Maybe I should do a db.commit() before my second "blank" update() 
> though it seems to me that it should be a better way and I am concern in 
> reducing db hit.
>
> Thanks
>
> 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+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+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.


Re: [web2py] dbio=False proper way to update every fields not only the one that had changed

2015-03-05 Thread Richard Vézina
Yes I struggle with it to make compute works...

I come up with something like this :

after .accepted

for f in db[request.args(0)].fields:
if f != db[request.args(0)]._id and f !=
db[request.args(0)].record_review_status:
form.vars[f] = form.vars.get(f,
db[request.args(0)](request.args(1))[f])

record_review_status being my compute field, so I make sure form.vars
contain all the missing values which for differents reason may lack from
SQLFORM and user input... But still not working, so I am confuse...

Richard

On Thu, Mar 5, 2015 at 3:17 PM, Niphlod  wrote:

> web2py doesn't know if a field has been edited or not. form.vars (for a
> standard web2py form) holds EVERY value, irregardless of the ones touched
> or not by the user...
>
> On Thursday, March 5, 2015 at 4:17:26 PM UTC+1, Richard wrote:
>>
>> Futher check make me confirm which I thought :
>>
>> **{f: v for f, v in form.vars.iteritems()}
>>
>> Prevent my compute to work since it return only the fields modify by the
>> user... I need to understand how web2py really update on form submit and
>> why compute works in this case...
>>
>> Or how can I make sure that every fields get update even if there is not
>> any values change which should be what web2py do...
>>
>> Richard
>>
>> On Wed, Mar 4, 2015 at 5:05 PM, Anthony  wrote:
>>
>>> The update should calculate the computed field as long as all the values
>>> needed for the calculation are included with the update.
>>>
>>> Anthony
>>>
>>>
>>> On Wednesday, March 4, 2015 at 4:55:01 PM UTC-5, Richard wrote:

 Thanks for answering Anthony,

 Actually f1 and f2 belongs to the table, I am filtering them because I
 want to treat them separately...

 About your question, I am investigating why my compute didn't work...
 My first impression is that it is not include in form.vars so it not get
 hit at all... But I am not sure of that...

 Richard

 On Wed, Mar 4, 2015 at 4:44 PM, Anthony  wrote:

> Does form.vars include all the variables needed by the compute
> function?
>
> Also, instead of:
>
> **{f: v for f, v in form.vars.iteritems()}
>
> you can do:
>
> **db[request.args(0)]._filter_fields(form.vars)
>
> _filter_fields will filter out the "id" field as well as any form.vars
> that are not fields in the table.
>
> Anthony
>
>
>
>
> On Wednesday, March 4, 2015 at 4:35:37 PM UTC-5, Richard wrote:
>>
>> Hello,
>>
>> I need to do control record update in order to clear some fields
>> values in case a flag is set to false. But doing the update like this :
>>
>>
>> db(db[request.args(0)].id == request.args(1)).update(**{f: v for f,
>> v in form.vars.iteritems()})
>>
>> prevent a compute field to be trigger and updating properly as well...
>>
>> So, to make sure my compute field get it I am doing another update()
>> like this
>>
>>
>> db(db[request.args(0)].id == request.args(1)).update()
>>
>>
>> Which work in one case by not in the other where I actually clear
>> some values like this :
>>
>>
>> db(db[request.args(0)].id == request.args(1)).update(f1=None, f2=None
>> , **{f: v for f, v in form.vars.iteritems() if f not in ('f1', 'f2'
>> )})
>>
>>
>> Maybe I should do a db.commit() before my second "blank" update()
>> though it seems to me that it should be a better way and I am concern in
>> reducing db hit.
>>
>> Thanks
>>
>> 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+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+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 

Re: [web2py] dbio=False proper way to update every fields not only the one that had changed

2015-03-05 Thread Anthony
On Thursday, March 5, 2015 at 4:18:06 PM UTC-5, Richard wrote:
>
> Yes I struggle with it to make compute works...
>
> I come up with something like this :
>
> after .accepted
>
> for f in db[request.args(0)].fields:
> if f != db[request.args(0)]._id and f != 
> db[request.args(0)].record_review_status:
> form.vars[f] = form.vars.get(f, 
> db[request.args(0)](request.args(1))[f])
>

If it is an update form, all the fields should be in the form already 
(unless they were explicitly excluded from the form). Also, the above does 
a separate database select for every missing field -- it would be better to 
fetch the record just once and then read the fetched record.

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] how to sanitize ckeditor and then test it

2015-03-05 Thread Alex Glaros
(1) what is syntax for sanitizing ckeditor input, (2) and afterwards what 
can I type into ckeditor form to test for XSS, to see if sanitize is 
working?

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] Any way to push error tickets in web2p to the database?

2015-03-05 Thread Franky Davis Monroe Jr.
I noticed that error tickets in web2py are written to files but I have a 
load balanced environment.  Is there a way to write these tickets to the 
database instead?

-- 
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: IMPORTANT - WEB2PY CONSULTING

2015-03-05 Thread tahnoon pasha
As a user of web2py consultants, can I please just add what a great idea it 
is to do this.

On Monday, 16 February 2015 06:21:36 UTC+8, Massimo Di Pierro wrote:
>
> We need to update the list of companies that provide web2py consulting.
> This list is obsolete:
>
> http://web2py.com/init/default/support
>
> Some links are broke. Most pages do not even mention web2py. Some of them 
> have a design that is simply not acceptable for a web development company.
>
> That list will be eliminated. IF YOU WANT TO BE LISTED please update your 
> page to have a decent design and MENTION WEB2PY on the main site. Then 
> respond to this thread by providing an updated link and the country were 
> you incorporated. If you have a self-employed individual list your country 
> of residence.
>
>

-- 
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.com/sqldesigner not working import export

2015-03-05 Thread ifM
Hello people
Prompt, "web2py.com/sqldesigner" only I have not worked import or export?
And web2py.com/sqldesigner is very different from that on 
"github.com/elcio/visualdal"

-- 
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] websocket: Send data when connect

2015-03-05 Thread Manu Mora
In websocket_messaging.py there are the following code:

class DistributeHandler(tornado.websocket.WebSocketHandler):
def open(self, params):
group, token, name = params.split('/') + [None, None]
self.group = group or 'default'
self.token = token or 'none'
self.name = name or 'anonymous'

I want to send some parameters like token or name. I have tried several 
options:

if(!web2py_websocket('ws://127.0.0.1:/realtime/chat?name=name',function(
e){


if(!web2py_websocket('ws://127.0.0.1:/realtime/chat/name',function(e){

I would like to send some data to websocket server, however I don't work.

-- 
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] Adding

2015-03-05 Thread James O' Driscoll
I am trying to place all email sent from app into queue.

I am using scheduler and this works fine.

I want to add the email for verifying email, detailed below, to the queue.

I would have taught that I have to append a mail function to the 
request_reset_password.onaccept, but this is not available.

Any help would be great.

Regards,
J

auth.messages.verify_email = 'Click on the link http://' + 
request.env.http_host + 
URL(r=request,c='default',f='user',args=['verify_email']) + '/%(key)s to 
verify your email'

-- 
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] Query Production Oracle database using DAL

2015-03-05 Thread Michel Krav
Hi ,
 
I need to dump some tables from oracle db let's call it *dbo *into sqlite *db  
*to allow a "disconnect/offline" mode for an app.

I' ve already done this stuff using cx_oracle, building a cursor, then my 
own SQL requests..., now I'm looking to ease those tasks.
[So no problem to connect oracle dbo using cx_oracle even in web2py]

But I'm not really sure about how to do it using DAL :

   1. Once define connexion to oracle dbo is done : (using lazy_tables=True 
   to enhance performance as hundred of table have to be read but not for 
   each request)
   2. I've read I have to *define_table* manually for each table I want to 
   query, (to instantiate table class  and attributes)
   3. In the signature of define_table : I plan to secure the *"read only 
   mode"* to *dbo *using* migration = False *and  *fake_migration* = *True *in 
   order to never alter the source table : is it correct ? I will specify 
*redefine 
   = False* for the same reason. By the way , I think there's a mistake in 
   the online documentation in 
   
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Fixing-broken-migrations
 
   : 
   
   db.define_table(,migrate=True,fake_migrate=True)
   should be in this context : 
   db.define_table(,migrate=False,fake_migrate=True)
   
   
   4. Once *dbo*.table is available, I should use export_to_csv_file method 
then 
   import_from_csv_file to (re)load *db.table * when needed (synchronisation 
   on demand).
   
Thanks.

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


[web2py] if I use the "one step production deployment" will it overwrite these existing settings?

2015-03-05 Thread Simon Redmond
quick install question, I have postfix,dovecot apache and an ssl cert 
already installed and configured on my server, if I use the "one step 
production deployment" will it overwrite these existing settings?

-- 
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: Bootstrap is really killing web2py

2015-03-05 Thread Moiz Nagpurwala
Hello,

I'm using latest relaease of web2py on my local machine. (
2.9.12-stable+timestamp.2015.02.15.23.04.25 (Running on Rocket 1.2.6, 
Python 2.7.9))
Unable to install the w2p file provided for BS 3.

Please 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: How to properly import Active Directory users into web2py auth_user table?

2015-03-05 Thread Grzegorz Dzień
Found it, it was that values I was importing were tuples, it works given I 
access "first tuple item" e.g.:
first_name=user[1]['givenName'][0]

On Wednesday, March 4, 2015 at 8:59:32 PM UTC+1, Grzegorz Dzień wrote:
>
> I have tried doing it this way:
>
> def showthemall():
> # LDAP connection settings
> LDAP_SERVER = "ldap://ad.superhost";
> BIND_DN = "superuser@ad.superhost"
> BIND_PASS = "mysupersecretpassword"
> # Connect to LDAP
> con = ldap.initialize(LDAP_SERVER)
> # Authenticate in LDAP
> con.simple_bind_s(BIND_DN, BIND_PASS)
> # We don't want disabled users, so we use some magic LDAP-Active
> Directory filers for it
> ldapfilter =
> '(&(&(objectclass=person)(
> objectcategory=person))(!(userAccountControl:1.2.840.113556.1.4.803:=2)))'
> # What user attributes do we want list in link:
> # 
> http://www.manageengine.com/products/ad-manager/help/csv-import-management/active-directory-ldap-attributes.html
> attrs = ['displayName', 'givenName', 'sn', 'mail', 'mailNickname',
> 'department']
> # Get all users from ldap
> base_dn = 'ou=,dc=,dc='
> ad_users = con.search_s( base_dn, ldap.SCOPE_SUBTREE, ldapfilter, 
> attrs )
>
> for user in ad_users:
> # get 2nd value separated by comma
> ouvar=user[0].split(',')[1]
> # if ouvar valude is not Generic
> if ouvar != 'OU=Generic':
> # add user to the auth_user table
> required_fields = set([ 'sn', 'givenName', 'mail',
> 'department', 'mailNickname' ])
> if required_fields.issubset(set(user[1])):
> db.auth_user.insert(first_name=user[1]['givenName'],
> last_name=user[1]['sn'],
> email=user[1]['mail'],
> username=user[1]['mailNickname'],
> password=None,
> 
> registration_id=user[1]['mailNickname'])
>
>
>
> It is importing contact as (I mean every value in the DB is enveloped in 
> vertical bar):
>
> |Grzegorz||Dzien||gdzien@domai...|gdzien|None|gdzien|
>
>
> By the way - is there a way to re-use web2py's AD connector's connection?
>

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

2015-03-05 Thread Massimo Di Pierro
it js so it would go into applications/yourapp/static/

On Wednesday, 4 March 2015 17:27:28 UTC-6, Alex Glaros wrote:
>
> hi Tim
>
> how do I install ck_editor?
>
> assume I don't know what directory to use or anything else
>
> thanks!
>
> 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: web2py.com/sqldesigner not working import export

2015-03-05 Thread Ron Chatterjee
I believe the developers are working to put a new sqldesigner that is more 
DAL specific. I have the same issue so I am assuming its a working 
progress. You can just look at the example file and start coding up DAL. 
Its not that difficult. But I do agree, it can be a handy tool to have.

On Thursday, March 5, 2015 at 6:30:17 PM UTC-5, ifM wrote:
>
> Hello people
> Prompt, "web2py.com/sqldesigner" only I have not worked import or export?
> And web2py.com/sqldesigner is very different from that on "
> github.com/elcio/visualdal"
>

-- 
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 sanitize ckeditor and then test it

2015-03-05 Thread Alex Glaros
Am I supposed to put this a top of edit page view?

 {{=XML(tableName.fieldName,sanitize=True)}}  ???

seems like sanitize should be located in controller, not in view...

-- 
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: Current status of adapting OrientDB for web2py

2015-03-05 Thread Pumplerod
I had a look, thanks.  Wow.  I think I would need a much better 
understanding of all the parts before I could take that on.  What are the 
odds I could make a contribution toward web2py in order to fast-track the 
adapter?

On Monday, February 13, 2012 at 9:54:05 AM UTC-8, Nolan Nichols wrote:
>
> I'm researching the nosql and graph database landscape for a web2py 
> application that will require the schema to evolve over time and 
> provide network/graph analysis metrics. 
>
> I started by looking at the Tinkerpop (http://tinkerpop.com/) stack 
> and the Bulbflow (http://bulbflow.com/) python library for interacting 
> with Tinkerpop graph databases like Neo4j and OrientDB. 
>
> It looks like there was interest a few months back in adapting 
> OrientDB's sql interface for web2py, and there is an open issue: 
>
> - http://code.google.com/p/web2py/issues/detail?id=407 
>
> A few questions: 
>
> What is the current status of an OrientDB/web2py adapter? 
> Is anyone currently using a graph database with web2py? 
> Any suggestions for using web2py DAI/templates with non-rdbms sources? 
>
> Cheers, 
>
> Nolan

-- 
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] .grid() my own search widget possible? How?

2015-03-05 Thread Ron Chatterjee
I just posted a question in the web2py group. Searching I came to this 
post. Since you guys worked on this. What if I do like the default search 
and want to stick with it and display the search box that comes out 
of SQLFORM.grid or smartgrid but I don't want to display the table 
underneath. Do you know a way to do that?



On Thursday, June 5, 2014 at 10:19:16 AM UTC-4, Jim S wrote:
>
> Just dummy'd up this app quickly.
>
> Let me know if you have any issues.
>
> -Jim
>
>
> On Wednesday, June 4, 2014 10:24:34 PM UTC-5, JoeCodeswell wrote:
>>
>> Dear Richard and Jim,
>>
>> Would you both please post your sample code? 
>>
>> I am trying to implement an autocomplete search widget on a 
>> db.contact.l_name field using SQLFORM.grid.
>>
>> Thanks in advance.
>>
>> Love and peace,
>>
>> Joe
>>
>> On Thursday, April 24, 2014 8:10:01 AM UTC-7, Richard wrote:
>>>
>>> I am reading the sqlhtml.py search_widget...
>>>
>>> So I would just pass my function (search widget) like that :
>>>
>>> SQLFORM.grid(...,
>>>search_widget=my_search_widget_function)
>>>
>>> ?
>>>
>>> Thanks
>>>
>>> Richard
>>>
>>>
>>> On Thu, Apr 24, 2014 at 10:38 AM, Jim S  wrote:
>>>
 Yes, you definitely can.  

 I don't ever use the default search.

 In a nutshell, you have to create your own search form and then apply 
 the results of that form to the query passed to the grid.  Let me know if 
 you need an example and I'll see if I can put a quick one together for you 
 today.

 -Jim


 On Thursday, April 24, 2014 9:18:39 AM UTC-5, Richard wrote:
>
> Hello,
>
> Is it possible to create my own search widget? How does I get the grid 
> to use it?
>
> Thanks
>
> 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+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] two (or more) applications using the same database

2015-03-05 Thread lucas
hey one and all,

i have a table or zip codes and another of counties.  i am thinking of 
moving those tables to their own database so that two or more of my 
applications can use those quite general tables.

what are the implications of doing that?  would i have copies of the 
database structures in both db.py files, one under each application?  other 
things to consider?

thanx in advance, lucas

-- 
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: websocket: Send data when connect

2015-03-05 Thread Massimo Di Pierro
You are missing the point of the websocket system. You do not pass data 
when you connect it. You pass data using JS after you connect to it.

You can change this behavior (and I can see use cases when you have to) but 
you would have rewrite your own server side code.

Massimo



On Thursday, 5 March 2015 17:30:02 UTC-6, Manu Mora wrote:
>
> In websocket_messaging.py there are the following code:
>
> class DistributeHandler(tornado.websocket.WebSocketHandler):
> def open(self, params):
> group, token, name = params.split('/') + [None, None]
> self.group = group or 'default'
> self.token = token or 'none'
> self.name = name or 'anonymous'
>
> I want to send some parameters like token or name. I have tried several 
> options:
>
> if(!web2py_websocket('ws://127.0.0.1:/realtime/chat?name=name',
> function(e){
>
>
> if(!web2py_websocket('ws://127.0.0.1:/realtime/chat/name',function(e){
>
> I would like to send some data to websocket server, however I don't work.
>

-- 
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: Any way to push error tickets in web2p to the database?

2015-03-05 Thread Massimo Di Pierro
Yes and not. web2py always stores them in files but we provide a script 
(scripts/tickets2db.py) which you can run and periodically copy existing 
tickets to db. This also allows you to use a separate db for tickets which 
do not belong with the app data.

There is also a tickets2email which you may want to run before tickets2db

On Thursday, 5 March 2015 17:30:02 UTC-6, Franky Davis Monroe Jr. wrote:
>
> I noticed that error tickets in web2py are written to files but I have a 
> load balanced environment.  Is there a way to write these tickets to the 
> database instead?
>

-- 
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: Adding

2015-03-05 Thread Massimo Di Pierro
please open a github ticket about this.

On Thursday, 5 March 2015 17:30:03 UTC-6, James O' Driscoll wrote:
>
> I am trying to place all email sent from app into queue.
>
> I am using scheduler and this works fine.
>
> I want to add the email for verifying email, detailed below, to the queue.
>
> I would have taught that I have to append a mail function to the 
> request_reset_password.onaccept, but this is not available.
>
> Any help would be great.
>
> Regards,
> J
>
> auth.messages.verify_email = 'Click on the link http://' + 
> request.env.http_host + 
> URL(r=request,c='default',f='user',args=['verify_email']) + '/%(key)s to 
> verify your email'
>
>

-- 
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: two (or more) applications using the same database

2015-03-05 Thread Ron Chatterjee
Once solution I can think of, you can save them all on a csv file and write 
them on a csv file. import and export on demand and create tables that way. 
There are some links I saw about how to create DAL object using csv file. 

On Thursday, March 5, 2015 at 8:57:13 PM UTC-5, lucas wrote:
>
> hey one and all,
>
> i have a table or zip codes and another of counties.  i am thinking of 
> moving those tables to their own database so that two or more of my 
> applications can use those quite general tables.
>
> what are the implications of doing that?  would i have copies of the 
> database structures in both db.py files, one under each application?  other 
> things to consider?
>
> thanx in advance, lucas
>

-- 
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: Adding

2015-03-05 Thread Massimo Di Pierro
On second thought... there is one way. You can create your own mail object 
which has a send_mail method and all it does is to queue its arguments. 
Then configure auth.settings.mailer to user your mailer object.

On Thursday, 5 March 2015 17:30:03 UTC-6, James O' Driscoll wrote:
>
> I am trying to place all email sent from app into queue.
>
> I am using scheduler and this works fine.
>
> I want to add the email for verifying email, detailed below, to the queue.
>
> I would have taught that I have to append a mail function to the 
> request_reset_password.onaccept, but this is not available.
>
> Any help would be great.
>
> Regards,
> J
>
> auth.messages.verify_email = 'Click on the link http://' + 
> request.env.http_host + 
> URL(r=request,c='default',f='user',args=['verify_email']) + '/%(key)s to 
> verify your email'
>
>

-- 
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: two (or more) applications using the same database

2015-03-05 Thread lucas
wouldn't SQL based be better? especially with searching through indexes. 
 like i use postgresql and i wouldn't mind sticking with that.  lucas

On Thursday, March 5, 2015 at 9:39:21 PM UTC-5, Ron Chatterjee wrote:
>
> Once solution I can think of, you can save them all on a csv file and 
> write them on a csv file. import and export on demand and create tables 
> that way. There are some links I saw about how to create DAL object using 
> csv file. 
>

-- 
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 properly import Active Directory users into web2py auth_user table?

2015-03-05 Thread Dave S
Glad to hear that you were successful.  Return types can keep us on our 
toes, can't they?

/dps


On Thursday, March 5, 2015 at 3:30:02 PM UTC-8, Grzegorz Dzień wrote:
>
> Found it, it was that values I was importing were tuples, it works given I 
> access "first tuple item" e.g.:
> first_name=user[1]['givenName'][0]
>
> On Wednesday, March 4, 2015 at 8:59:32 PM UTC+1, Grzegorz Dzień wrote:
>>
>> I have tried doing it this way:
>>
>> def showthemall():
>> # LDAP connection settings
>> LDAP_SERVER = "ldap://ad.superhost";
>> BIND_DN = "superuser@ad.superhost"
>> BIND_PASS = "mysupersecretpassword"
>> # Connect to LDAP
>> con = ldap.initialize(LDAP_SERVER)
>> # Authenticate in LDAP
>> con.simple_bind_s(BIND_DN, BIND_PASS)
>> # We don't want disabled users, so we use some magic LDAP-Active
>> Directory filers for it
>> ldapfilter =
>> '(&(&(objectclass=person)(
>> objectcategory=person))(!(userAccountControl:1.2.840.113556.1.4.803:=2)))'
>> # What user attributes do we want list in link:
>> # 
>> http://www.manageengine.com/products/ad-manager/help/csv-import-management/active-directory-ldap-attributes.html
>> attrs = ['displayName', 'givenName', 'sn', 'mail', 'mailNickname',
>> 'department']
>> # Get all users from ldap
>> base_dn = 'ou=,dc=,dc='
>> ad_users = con.search_s( base_dn, ldap.SCOPE_SUBTREE, ldapfilter, 
>> attrs )
>>
>> for user in ad_users:
>> # get 2nd value separated by comma
>> ouvar=user[0].split(',')[1]
>> # if ouvar valude is not Generic
>> if ouvar != 'OU=Generic':
>> # add user to the auth_user table
>> required_fields = set([ 'sn', 'givenName', 'mail',
>> 'department', 'mailNickname' ])
>> if required_fields.issubset(set(user[1])):
>> db.auth_user.insert(first_name=user[1]['givenName'],
>> last_name=user[1]['sn'],
>> email=user[1]['mail'],
>> username=user[1]['mailNickname'],
>> password=None,
>> 
>> registration_id=user[1]['mailNickname'])
>>
>>
>>
>> It is importing contact as (I mean every value in the DB is enveloped in 
>> vertical bar):
>>
>> |Grzegorz||Dzien||gdzien@domai...|gdzien|None|gdzien|
>>
>>
>> By the way - is there a way to re-use web2py's AD connector's connection?
>>
>

-- 
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: IMPORTANT - WEB2PY CONSULTING

2015-03-05 Thread José Luis Redrejo
2015-03-04 22:26 GMT+01:00 Manuele Pesenti :

> Il 04/03/15 17:40, Chris ha scritto:
> > I do web2py consulting work on the side but I'm an individual. Can I
> > include just an email address, and not a webpage?
> me too... in Italy.
>
>

And me too, in Spain...




> M.
>
> --
> 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: if I use the "one step production deployment" will it overwrite these existing settings?

2015-03-05 Thread Niphlod
yes

On Friday, March 6, 2015 at 12:30:36 AM UTC+1, Simon Redmond wrote:
>
> quick install question, I have postfix,dovecot apache and an ssl cert 
> already installed and configured on my server, if I use the "one step 
> production deployment" will it overwrite these existing settings?
>

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