[web2py] Open a form popup only some user registered

2016-06-20 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear All.
I hope you could me explain how i can do the follow idea:
If a have a user registered like username  in my  web2py site.
I have another application like asterisk (IP PBX) so when asterisk received a 
inbound a call for user  i need that the browser of user  (only browser 
of this user) open a form pop with parameters received from external 
application like phone numember..etc.i do not know how i can do a remote 
call process to web2py and i need this remote call only open a window popup 
only for this user registered (or only for session of this user ).
I hope you could understand me and tell me some idea or example about how i can 
do.
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] Open a form popup only some user registered

2016-06-21 Thread 'Fernando Villarroel' via web2py-users
Ok Richard 
Thank you for you answer.

Enviado desde mi iPhone

> El 21-06-2016, a las 11:25, Richard Vézina  
> escribió:
> 
> You will need websocket_messaging/tornado for doing such a thing...
> 
> Richard
> 
>> On Tue, Jun 21, 2016 at 12:21 AM, 'FERNANDO VILLARROEL' via web2py-users 
>>  wrote:
>> Dear All.
>> 
>> I hope you could me explain how i can do the follow idea:
>> 
>> If a have a user registered like username  in my  web2py site.
>> 
>> I have another application like asterisk (IP PBX) so when asterisk received 
>> a inbound a call for user  i need that the browser of user  (only 
>> browser of this user) open a form pop with parameters received from external 
>> application like phone numember..etc.
>> i do not know how i can do a remote call process to web2py and i need this 
>> remote call only open a window popup only for this user registered (or only 
>> for session of this user ).
>> 
>> I hope you could understand me and tell me some idea or example about how i 
>> can do.
>> 
>> 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.
> 
> -- 
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> --- 
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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


Re: [web2py] Web2py and WebRTC?

2016-08-03 Thread 'Fernando Villarroel' via web2py-users
Dear.

I think the deploy coments use a server like Asterisk or FreeSWITCH.

So the deploy from Django surely use some library JavaScript for comunícate 
browsers like sip.js or another with websocket server (Asterisk or FreeSWITCH ).

Regarding about webrtc i deploy a server webrtc using FreeSWITCH 1.6

https://freeswitch.org/confluence/plugins/servlet/mobile#content/view/7144556

But i need know how i can do a websocket call to a single peer (browser user) 
from the server ws (FreeSWITCH); peer to peer

>From web2py i know that i can use tornado; but i do know how i can do

Anyone could me some example?

Regards

Enviado desde mi iPhone

> El 03-08-2016, a las 10:14, Ron Chatterjee  
> escribió:
> 
> Have you implemented something similar webrtc + web2py?
> 
> -- 
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> --- 
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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] Web2py and WebRTC?

2016-08-04 Thread 'Fernando Villarroel' via web2py-users
Thank you Antonio

Enviado desde mi iPhone

> El 04-08-2016, a las 4:51, António Ramos  escribió:
> 
> https://www.youtube.com/watch?v=MUWy-NSrvNQ
> 
> 2016-08-03 19:26 GMT+01:00 'Fernando Villarroel' via web2py-users 
> :
>> Dear.
>> 
>> I think the deploy coments use a server like Asterisk or FreeSWITCH.
>> 
>> So the deploy from Django surely use some library JavaScript for comunícate 
>> browsers like sip.js or another with websocket server (Asterisk or 
>> FreeSWITCH ).
>> 
>> Regarding about webrtc i deploy a server webrtc using FreeSWITCH 1.6
>> 
>> https://freeswitch.org/confluence/plugins/servlet/mobile#content/view/7144556
>> 
>> But i need know how i can do a websocket call to a single peer (browser 
>> user) from the server ws (FreeSWITCH); peer to peer
>> 
>> From web2py i know that i can use tornado; but i do know how i can do
>> 
>> Anyone could me some example?
>> 
>> Regards
>> 
>> Enviado desde mi iPhone
>> 
>>> El 03-08-2016, a las 10:14, Ron Chatterjee  
>>> escribió:
>>> 
>>> Have you implemented something similar webrtc + web2py?
>>> 
>>> -- 
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> -- 
>> 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.


Re: [web2py] Web2py and WebRTC?

2016-08-10 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear Massimo.I did tested opentok great tip!!!
Regards
 

On Saturday, August 6, 2016 4:43 AM, Massimo Di Pierro 
 wrote:
 

 I would use opentok

On Tuesday, 2 August 2016 19:46:07 UTC-5, Ron Chatterjee wrote:
This may help. Its a django app. Someone needs to take a stab at this to 
convert into web2py. 
https://github.com/ craigmadden/videochat


On Sunday, July 28, 2013 at 8:42:19 PM UTC-4, Vinicius Assef wrote:
WebRTC has nothing to do with web2py.

It's a client specification, concerning basically audio and video
capturing and transmission.
It's accessed through javascript.

On Sun, Jul 28, 2013 at 9:37 PM, Ovidio Marinho  wrote:
> you did this work in web2py?? you can publish the app? this is very good?
>
>
>
>
>          Ovidio Marinho Falcao Neto
>                   ITJP.NET.BR
>              ovid...@gmail.com
>                83   8826 9088 - Oi
>                83   9336 3782 - Claro
>                         Brasil
>
>
>
> 2013/7/28 Mika Sjöman 
>>
>> Hi
>>
>> I would like the users of my website to communicate with video without
>> using Skype etc. I am currently using pythonanywhere as my host, and they do
>> not permit using node.js, so I can not use
>> https://github.com/ henrikjoreteg/SimpleWebRTC
>>
>> Is there any other way you guys know of that I could use to easily add
>> WebRTC to the webpage? Anyone wrote a plugin for that? Anything I should
>> know before jumping into it?
>>
>> Cheers
>>
>> --
>>
>> ---
>> 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/ groups/opt_out.
>>
>>
>
>
> --
>
> ---
> 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/ groups/opt_out.
>
>


-- 
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] Features as Modules

2014-11-03 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear All.

I need to add new features to my application like a modules; something like 
purchases module, sales module, etc. 
The idea is that each new module installed enable the respective option menu. 

My idea is to create folders within the folder modules such as sales folder; 
inside are the * .py script of module sales, I hope understand me:

~application/foo/modules/sales/

Also I take it that if I install a module that enables a choice of menu, this 
script should be within their respective controllers; then you should be:


~application/foo/controlllers/sales.py

sales.py
from sales import *

So in sales.py module is the bussines logic.

and

~application/foo/views/sales/sales.html

Any suggestions or how i can do it or if someone show me an example.
Excuse my english
 
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.


[web2py] Audio wav file

2014-11-05 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear all.

I need to play a sound file (.wav)

I am trying like this:

controler:

def play():

filename='2014-11-04-19-20-19_994491803_448908901.wav'
ff=XML('' 
% filename)
return dict(ff=ff)

view:

play.html


{{extend 'layout.html'}}
 


{{=ff}}

 

But not works

For my test, the wav file is static folder, but in production the wav files are 
in /tmp folder.

What i am doing wrong and how i can play files from /tmp folder 

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: Audio wav file

2014-11-06 Thread 'FERNANDO VILLARROEL' via web2py-users
Hi.

The follow script it works;


Your browser does not support the audio element.

And this works in Firefox but not in Chrome, why?. I am use latest version of 
firefox and Chrome.
But my problem is that the wav file is a variable,so i try to use:

f='{{=filename}}'


But i received a exception:

response.write(URL(a=request.application, c='static', f='{{=filename)
^
SyntaxError: EOL while scanning string literal

Regards



On Thursday, November 6, 2014 1:23 AM, LoveWeb2py  wrote:
 


Where is your /tmp folder located? Is it the actual /tmp folder located in the 
root of linux? I would recommend moving it to 
/web2py_src/web2py/applications/static/audio

You could then reference the file like this:




with nothing in the controller.

Also, this application Massimo created may come in handy for you: 
https://www.reddit.com/r/Python/comments/1r7v23/audio_streaming_app_in_web2py_from_scratch/

Hope this helps...

On Wednesday, November 5, 2014 2:52:46 PM UTC-5, visuallinux wrote:
Dear all.
>
>
>I need to play a sound file (.wav)
>
>
>I am trying like this:
>
>
>controler:
>
>
>def play():
>
>
>filename='2014-11-04-19-20- 19_994491803_448908901.wav'
>ff=XML(''' type="audio/wav">''' % filename)
>return dict(ff=ff)
>
>
>view:
>
>
>play.html
>
>
>
>{{extend 'layout.html'}}
> 
>
>
>
>{{=ff}}
>
> 
>
>
>But not works
>
>
>For my test, the wav file is static folder, but in production the wav files 
>are in /tmp folder.
>
>
>What i am doing wrong and how i can play files from /tmp folder 
>
>
>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.

-- 
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] Backend and FrontEnd dev

2014-12-17 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear All.
Some customer need a application like a Desktop application (visual basic, 
wxPython, etc.) and reports.
I think to use web2py, but i need to do rich windows (widgets or RIA). I am 
searching how i can do so i found qooxdoo.For reports i think to use Reportlab.
My web development experience is some low, but i think this is my opportunity 
to learn.  

So i think to use web2py like bakend and  qooxdoo like front end.
I need to know your recomendation, it's fine that  i use web2py and qooxdoo.? 
And someone could me explain how i can use both technologies.Do you recommend 
to me use another libs like bootstrap for to do rich windows?
I hope look your feedback and recomendations of how i can do and not die to 
trying

Regards
Pd. Excuse my english.

-- 
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: happy holidays everybody

2014-12-24 Thread 'FERNANDO VILLARROEL' via web2py-users
pyDAL +10

I wish you merry christmas and happy new year Massimo and everybody of this 
community.
Fernando 

 On Wednesday, December 24, 2014 12:48 PM, DJ  
wrote:
   

 Congrats Massimo and happy holidays!

On Wednesday, December 24, 2014 8:48:18 AM UTC-5, Massimo Di Pierro wrote:
I wish a happy holidays to everybody in this community.
As a Christmas present and mostly the work of Giovanni Barillari we have 
re-released the web2py DAL as a separate Python package under the BSD license:
https://pypi.python.org/pypi/ pyDAL
https://github.com/web2py/ pydal

Now you can more easily use the web2py DAL from any python app. Simply do
pip install pyDAL>>> from pydal import DAL, Field
>>> db = DAL('sqlite://storage.db')
>>> db.define_table('thing',Field( 'name'))
>>> db.thing.insert(name="Chair')you know the rest... ;-)
Massimo



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




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


Re: [web2py] web2py and sublime test

2015-01-04 Thread 'Fernando Villarroel' via web2py-users
+1

Enviado desde mi iPhone

> El 03-01-2015, a las 23:32, Massimo Di Pierro  
> escribió:
> 
> I came across this: 
> 
> https://github.com/cassiobotaro/my_environment
> 
> Useful!
> -- 
> 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] Heroku deploy

2015-03-03 Thread 'Fernando Villarroel' via web2py-users
" 
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)

Dear All.

I have my app in my home folder ~/web2py/application/foo

I do not understand how i can deploy on Heroku

Anyone can explain how i can do

I am trying to follow the book guide but i do not understand.
I am using git bitbucket on my foo app folder.
And i have a Heroku account.

Regards

Enviado desde mi iPhone

-- 
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] sqlform.smartgrid from custom datefield from sqlform.factory

2015-05-25 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear All
I have problem when i click on pagination of sqlform.smartgrid because my 
custom date field change to today and i lost data
def index():
   d=datetime.datetime.strptime(request.vars.desde, "%d/%m/%Y %H:%M:%S") \      
      if request.vars.desde else 
datetime.datetime.strptime(datetime.datetime.strftime(datetime.datetime.now(),'%Y-%m-%d
 00:00:00'), \                                        '%Y-%m-%d %H:%M:%S')

query =((auth.user.id==db.cdr.accountcode) & (db.cdr.billsec>0) & 
(db.cdr.start_stamp>=d))

 form = SQLFORM.factory(Field('desde','datetime', 
requires=IS_DATETIME(format='%Y-%m-%d %H:%M:%S'),default=d))

 if form.accepts(request.vars,session):

                query =((auth.user.id==db.cdr.accountcode) & (db.cdr.billsec>0) 
& (db.cdr.start_stamp>=form.vars.desde))

table=SQLFORM.smartgrid(db.cdr, 
constraints=dict(cdr=query),fields=fields,orderby=orderby,                      
          
details=False,create=False,editable=False,deletable=False,csv=True,paginate=50) 


return dict(form=form,table=table)



How i can do?
REgards
PD: Excuse my english

-- 
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] sqlform.smartgrid from custom datefield from sqlform.factory

2015-05-26 Thread 'FERNANDO VILLARROEL' via web2py-users
Hi.
I need you help, any idea how i can solve my problem.
Regards 


 On Monday, May 25, 2015 11:03 PM, 'FERNANDO VILLARROEL' via web2py-users 
 wrote:
   

 Dear All
I have problem when i click on pagination of sqlform.smartgrid because my 
custom date field change to today and i lost data
def index():
   d=datetime.datetime.strptime(request.vars.desde, "%d/%m/%Y %H:%M:%S") \      
      if request.vars.desde else 
datetime.datetime.strptime(datetime.datetime.strftime(datetime.datetime.now(),'%Y-%m-%d
 00:00:00'), \                                        '%Y-%m-%d %H:%M:%S')

query =((auth.user.id==db.cdr.accountcode) & (db.cdr.billsec>0) & 
(db.cdr.start_stamp>=d))

 form = SQLFORM.factory(Field('desde','datetime', 
requires=IS_DATETIME(format='%Y-%m-%d %H:%M:%S'),default=d))

 if form.accepts(request.vars,session):

                query =((auth.user.id==db.cdr.accountcode) & (db.cdr.billsec>0) 
& (db.cdr.start_stamp>=form.vars.desde))

table=SQLFORM.smartgrid(db.cdr, 
constraints=dict(cdr=query),fields=fields,orderby=orderby,                      
          
details=False,create=False,editable=False,deletable=False,csv=True,paginate=50) 


return dict(form=form,table=table)



How i can do?
REgards
PD: Excuse my english-- 
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] Web2py & Geraldo Reports

2014-09-01 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear All.

I am try to use Geraldo Reports with web2py and i am following this howto:

http://www.geraldoreports.org/docs/tutorial-web2py.html


But i received a error with this import

>>> from reports import ReportPurchase
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named reports

what i am doing wrog?

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.


[web2py] SQLFORM.smartgrid 'module' object has no attribute 'split'

2014-09-03 Thread 'FERNANDO VILLARROEL' via web2py-users
Hi All.

I am trying to use SQLFORM.smartgrid:

query=(db.cdr.accountcode==form.vars.nombre[0])
grid=SQLFORM.smartgrid(db.cdr,constraints=dict(cdr=query),details=False,create=False,editable=False,deletable=False,csv=False)

But i received the follow exception:

 'module' object has no attribute 'split'
Versión
web2py™Version 2.9.5-stable+timestamp.2014.03.16.02.35.39 
PythonPython 2.6.6: /usr/bin/python (prefix: /usr) 
Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18. Traceback (most recent call last):
File "/home/fvillarroel/www/web2py/gluon/restricted.py", line 220, in restricted
exec ccode in environment
File 
"/home/fvillarroel/www/web2py/applications/freeswitch/controllers/repocallcltes.py",
 line 28, in 
File "/home/fvillarroel/www/web2py/gluon/globals.py", line 385, in 
self._caller = lambda f: f()
File "/home/fvillarroel/www/web2py/gluon/tools.py", line 3287, in f
return action(*a, **b)
File 
"/home/fvillarroel/www/web2py/applications/freeswitch/controllers/repocallcltes.py",
 line 12, in repocallcltes
grid=SQLFORM.smartgrid(db.cdr, 
constraints=dict(cdr=query),details=False,create=False,editable=False,deletable=False,csv=False)
File "/home/fvillarroel/www/web2py/gluon/sqlhtml.py", line 2800, in smartgrid
user_signature=user_signature, **kwargs)
File "/home/fvillarroel/www/web2py/gluon/sqlhtml.py", line 2255, in grid
search_menu = SQLFORM.search_menu(sfields, prefix=prefix)
File "/home/fvillarroel/www/web2py/gluon/sqlhtml.py", line 1709, in search_menu
ftype = field.type.split(' ')[0]
AttributeError: 'module' object has no attribute 'split' 

I do not know what i am doing wrong and if i changed smartgrid for sqlform.grid 
i reveived the same error.

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.


[web2py] Re: SQLFORM.smartgrid 'module' object has no attribute 'split'

2014-09-04 Thread 'FERNANDO VILLARROEL' via web2py-users
Hi.

The database definition ;


db.define_table('cdr',
Field('caller_id_name',length=30),
Field('caller_id_number',length=30),
Field('destination_number',length=30),
Field('context',length=20),
Field('start_stamp', datetime),
Field('answer_stamp', datetime),
Field('end_stamp',datetime),
Field('duration','integer'),
Field('billsec','integer'),
Field('hangup_cause',length=50),
Field('accountcode',db.auth_user),
Field('read_codec',length=20),
Field('write_codec',length=20),
Field('cost', 'decimal(20,6)'),
Field('carrier',length=255),
Field('rate','decimal(11,5)'), 
format='%(caller_id_number)s',migrate=False)




On Thursday, September 4, 2014 4:34 AM, Niphlod  wrote:
 


what's the table definition of db.cdr ?

On Thursday, September 4, 2014 4:29:17 AM UTC+2, visuallinux wrote:
Hi All.
>
>
>I am trying to use SQLFORM.smartgrid:
>
>
>query=(db.cdr.accountcode== form.vars.nombre[0])
>grid=SQLFORM.smartgrid(db.cdr, constraints=dict(cdr=query), 
>details=False,create=False, editable=False,deletable= False,csv=False)
>
>
>But i received the follow exception:
>
>
> 'module' object has no attribute 'split'
>Versión
>web2py™Version 2.9.5-stable+timestamp.2014. 03.16.02.35.39 
>PythonPython 2.6.6: /usr/bin/python (prefix: /usr) 
>Traceback
>1.
>2.
>3.
>4.
>5.
>6.
>7.
>8.
>9.
>10.
>11.
>12.
>13.
>14.
>15.
>16.
>17.
>18. Traceback (most recent call last):
>File "/home/fvillarroel/www/web2py/ gluon/restricted.py", line 220, in 
>restricted
>exec ccode in environment
>File "/home/fvillarroel/www/web2py/ applications/freeswitch/ 
>controllers/repocallcltes.py", line 28, in 
>File "/home/fvillarroel/www/web2py/ gluon/globals.py", line 385, in 
>self._caller = lambda f: f()
>File "/home/fvillarroel/www/web2py/ gluon/tools.py", line 3287, in f
>return action(*a, **b)
>File "/home/fvillarroel/www/web2py/ applications/freeswitch/ 
>controllers/repocallcltes.py", line 12, in repocallcltes
>grid=SQLFORM.smartgrid(db.cdr, constraints=dict(cdr=query),de 
>tails=False,create=False,edita ble=False,deletable=False,csv=False)
>File "/home/fvillarroel/www/web2py/ gluon/sqlhtml.py", line 2800, in smartgrid
>user_signature=user_signature, **kwargs)
>File "/home/fvillarroel/www/web2py/ gluon/sqlhtml.py", line 2255, in grid
>search_menu = SQLFORM.search_menu(sfields, prefix=prefix)
>File "/home/fvillarroel/www/web2py/ gluon/sqlhtml.py", line 1709, in 
>search_menu
>ftype = field.type.split(' ')[0]
>AttributeError: 'module' object has no attribute 'split' 
>
>
>I do not know what i am doing wrong and if i changed smartgrid for 
>sqlform.grid i reveived the same error.
>
>
>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: SQLFORM.smartgrid 'module' object has no attribute 'split'

2014-09-04 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear,

i changed datetime with 'datetime' and now it's works

Thank You


On Thursday, September 4, 2014 8:15 AM, Niphlod  wrote:
 


tat's probabl why replace datetime with 'datetime' (notice the '')

On Thursday, September 4, 2014 1:37:51 PM UTC+2, visuallinux wrote:
Hi.
>
>
>The database definition ;
>
>
>
>
>db.define_table('cdr',
>Field('caller_id_name',length= 30),
>Field('caller_id_number', length=30),
>Field('destination_number', length=30),
>Field('context',length=20),
>Field('start_stamp', datetime),
>Field('answer_stamp', datetime),
>Field('end_stamp',datetime),
>Field('duration','integer'),
>Field('billsec','integer'),
>Field('hangup_cause',length= 50),
>Field('accountcode',db.auth_ user),
>Field('read_codec',length=20),
>Field('write_codec',length=20) ,
>Field('cost', 'decimal(20,6)'),
>Field('carrier',length=255),
>Field('rate','decimal(11,5)'), format='%(caller_id_number)s', 
> migrate=False)
>
>
>
>
>
>
>
>On Thursday, September 4, 2014 4:34 AM, Niphlod  wrote:
>
>
>
>
>
>what's the table definition of db.cdr ?
>
>On Thursday, September 4, 2014 4:29:17 AM UTC+2, visuallinux wrote:
>Hi All.
>>
>>
>>I am trying to use SQLFORM.smartgrid:
>>
>>
>>query=(db.cdr.accountcode== form.vars.nombre[0])
>>grid=SQLFORM.smartgrid(db.cdr, constraints=dict(cdr=query), 
>>details=False,create=False, editable=False,deletable= False,csv=False)
>>
>>
>>But i received the follow exception:
>>
>>
>> 'module' object has no attribute 'split'
>>Versión
>>web2py™Version 2.9.5-stable+timestamp.2014. 03.16.02.35.39 
>>PythonPython 2.6.6: /usr/bin/python (prefix: /usr) 
>>Traceback
>>1.
>>2.
>>3.
>>4.
>>5.
>>6.
>>7.
>>8.
>>9.
>>10.
>>11.
>>12.
>>13.
>>14.
>>15.
>>16.
>>17.
>>18. Traceback (most recent call last):
>>File "/home/fvillarroel/www/web2py/ gluon/restricted.py", line 220, in 
>>restricted
>>exec ccode in environment
>>File "/home/fvillarroel/www/web2py/ applications/freeswitch/ 
>>controllers/repocallcltes.py", line 28, in 
>>File "/home/fvillarroel/www/web2py/ gluon/globals.py", line 385, in 
>>self._caller = lambda f: f()
>>File "/home/fvillarroel/www/web2py/ gluon/tools.py", line 3287, in f
>>return action(*a, **b)
>>File "/home/fvillarroel/www/web2py/ applications/freeswitch/ 
>>controllers/repocallcltes.py", line 12, in repocallcltes
>>grid=SQLFORM.smartgrid(db.cdr, constraints=dict(cdr=query),de 
>>tails=False,create=False,edita ble=False,deletable=False,csv=False)
>>File "/home/fvillarroel/www/web2py/ gluon/sqlhtml.py", line 2800, in smartgrid
>>user_signature=user_signature, **kwargs)
>>File "/home/fvillarroel/www/web2py/ gluon/sqlhtml.py", line 2255, in grid
>>search_menu = SQLFORM.search_menu(sfields, prefix=prefix)
>>File "/home/fvillarroel/www/web2py/ gluon/sqlhtml.py", line 1709, in 
>>search_menu
>>ftype = field.type.split(' ')[0]
>>AttributeError: 'module' object has no attribute 'split' 
>>
>>
>>I do not know what i am doing wrong and if i changed smartgrid for 
>>sqlform.grid i reveived the same error.
>>
>>
>>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
.

-- 
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] Geraldo Report

2014-09-04 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear All.

Does anyone use Geraldo Report?

I am trying to use i follow the how to about web2py and Geraldo 
http://www.geraldoreports.org/docs/tutorial-2.html

But i received a empty pdf.

My code:

controllers/callscltes_pdf.py

def callcltes_pdf():

from reports import ReportPurchase
from geraldo.generators import PDFGenerator
import gluon.contenttype
import StringIO

r=int(request.args[0])
resp = StringIO.StringIO()

cal = db(db.cdr.accountcode==r).select(orderby=db.cdr.id)
report = ReportPurchase(queryset=cal)
report.generate_by(PDFGenerator, filename=resp)

resp.seek(0)
response.headers['Content-Type'] = gluon.contenttype.contenttype('.pdf')
filename = "%s_Purchases.pdf" % (request.env.server_name)
response.headers['Content-disposition'] = "attachment; filename=\"%s\"" 
% filename
return resp.read()

 modules/reports.py

from geraldo import Report

class ReportPurchase(Report):
title = 'Purchases list'
author = 'John Smith Corporation'

The query (db(db.cdr.accountcode==r).select(orderby=db.cdr.id)) returns 50 
tuples.

I appreciate some idea or help.

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.


[web2py] Login password changed

2014-09-14 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear All.

For some reason i do not know, the login password on my web2py site changed. 

Is possible that someone is attack my website?, how i can prevent or solve this 
issue?

For reseted the password i must  updated auth_user like:

update auth_user set password=md('foo');

What do you think?
I must use captcha?
How i can have a log of events for know  who is change the password?

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.


[web2py] SOAP & WSDL

2018-01-17 Thread 'FERNANDO VILLARROEL' via web2py-users
Hi all.
Excuse for some off topic.
I need to up a SOAP service so i think to use web2py.
I have wsdl file.
I use wsdl2interface for convert wsdl into Python clasesThis is my wsdl file:
 http://oap/ser - 
Pastebin.com

  
|  
|   
|   
|   ||

   |

  |
|  
|   |  
 http://oap/services/checkHolderBillingSynDonorRequestService.    """
    def checkHolderBillingSynDonorRequest(RequestMessageHeader, 
checkHolderBillingSynDonorRequestBody):        """Parameters:                
``RequestMessageHeader`` -- IRequestMessageHeader        
``checkHolderBillingSynDonorRequestBody`` -- 
ICheckHolderBillingSynDonorRequestBody                Returns: 
checkHolderBillingSynDonorResponse        """
I do not understand the difition of method checkHolderBillingSynDonorRequest
Whats parameter i must receive?The data received will be in xml?What i must 
return?

I have never used soap before.
i will appreciate any tips or help for resolv my problem
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.


[web2py] Call a javascript function from SQLFORM.smartgrid

2017-03-18 Thread 'FERNANDO VILLARROEL' via web2py-users
Dear All.
How a i can call a javascript function from a link of sqlform.grid
My controller:
  d=datetime.datetime.strptime(request.vars.desde, "%d/%m/%Y %H:%M:%S") \    if 
request.vars.desde else 
datetime.datetime.strptime(datetime.datetime.strftime(datetime.datetime.now(),'%Y-%m-%d
 00:00:00'), \        '%Y-%m-%d %H:%M:%S')    
h=datetime.datetime.strptime(request.vars.hasta, "%d/%m/%Y %H:%M:%S") \    if 
request.vars.hasta else 
datetime.datetime.strptime(datetime.datetime.strftime(datetime.datetime.now(),'%Y-%m-%d
 23:59:59'), \        '%Y-%m-%d %H:%M:%S')
    form = SQLFORM.factory(Field('desde','datetime', 
requires=IS_DATETIME(format='%Y-%m-%d %H:%M:%S'),default=d),                    
        Field('hasta','datetime',requires=IS_DATETIME(format='%Y-%m-%d 
%H:%M:%S'), default=h),formstyle='table2cols',method='POST')

 orderby=~db.mensajes.id    links=[dict(header='Detalle',body=lambda row: 
A(IMG(_src=URL(c='static',f='images/view.png'), _width=24, _height=24), 
_href=URL('showsms', args=[row.mensajes.id])))]    #links = [lambda row: A('Ver 
SMS',_href=URL("default","showsms",args=[row.id]))]    
query=(db.mensajes.id_cia==auth.user.cia) & (db.mensajes.fenvio>=d) & 
(db.mensajes.fenvio<=d)    
left=[db.estadosms.on(db.mensajes.estado==db.estadosms.id)]    
fields=[db.mensajes.id,db.mensajes.numero,db.mensajes.msg,db.mensajes.fecha,db.mensajes.fenvio,db.mensajes.fentrega,db.mensajes.respuesta,db.mensajes.frespuesta,db.estadosms.n$

    if form.process().accepted:
        d,h=form.vars.desde,form.vars.hasta
    query=(db.mensajes.id_cia==auth.user.cia) & (db.mensajes.fenvio>=d) & 
(db.mensajes.fenvio<=h)
    table=SQLFORM.smartgrid(db.mensajes, 
constraints=dict(mensajes=query),fields=fields,orderby=orderby,left=left,searchable=True,args=request.args[:1],links=links,
       exportclasses=dict(xml=False, html=False, json=False, tsv=False, 
tsv_with_hidden_cols=False),details=False,create=False,editable=False,deletable=False,csv=True,paginate=50,formstyle='bootstrap')
 return dict(form=form,table=table)




My View:{{extend 'layout.html'}}
Formulario Reporte Mensajes
     {{=form}}     {{=table}}


function getData(id) {    alert('blablabla');
}


How i call function getData(id) from link of sqlform.smartgrid and this 
function receive id row as parameter?




-- 
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] Call a javascript function from SQLFORM.smartgrid

2017-03-24 Thread &#x27;FERNANDO VILLARROEL&#x27; via web2py-users
Dear Nico.
Thank you for you answer.
I use a sqlform.smart grid for show records from database, i want to do a call 
Restful for show especific record clicked using ajax
My problem is i not know how i implement onclick function on sqlform.smart grid
Regards 

On Friday, March 24, 2017 6:20 AM, Nico de Groot  
wrote:
 

 A client-side javascript function can't be triggered by a link. You can define 
a onclick attribute containing a call to a javascript function. If you want to 
use a row id as a parameter you have to make it available as a data attribute.

It's not clear what you want and why.  Maybe you have to grasp the serverside - 
clientside concept better first. Lookup 'javascript' and play around with tools 
like jsfiddle.

Nico de Groot

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