[web2py] User group blocked in China

2017-01-24 Thread Ben Lawrence
Hi
I am in China for 3 weeks and suddenly realized this awesome user group is 
now blocked! So up comes the VPN tunnel... But for our Chinese comrades, 
would you consider  moving the group to web2py.com ?
regards
Ben

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


[web2py] Re: Scheduler is_ticker and deadlock issues

2017-01-24 Thread Dave S
On Tuesday, January 24, 2017 at 1:59:31 PM UTC-8, Jason Solack wrote:
>
> Hello all, 
>
> I'm having some re-occurring issue with the scheduler.  We are currently 
> running multiple environments (production, beta) and have several nodes in 
> each environment.  If we have scheduler services running on all machines on 
> each node we get a lot of deadlock errors.  If we drop each environment 
> down to one node we get no deadlock errors.  I am noticing the field 
> "is_ticker" in the worker table will only have one ticker across all the 
> workers (spanning environments).  Is that the expected behavior?  I don't 
> see any documentation about the ticker field so i'm not sure what to expect 
> from that.
>
> Also is there any best practices about running the scheduler in an 
> environment that i've described?  
>
> Thanks in advance
>
> Jason
>


My scheduler experiences are a lot simpler, so I can't directly answer your 
questions.

But I can ask for more details!  Is this a cluster, or independent but 
related nodes?  What db engine is being used for the scheduler tables?   
Are the deadlocks related to having a lot of work, or happen when the nodes 
are relatively idle as well?  Are tasks recurring or are they in response 
to client requests?  Do tasks not get run because of the problem, or is it 
just a minor delay?

/dps



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


[web2py] Web2py Added to Vinta's Awesome-Python

2017-01-24 Thread Michael Messmer
Hello All,

Just wanted to get Web2py some additional exposure out there.   If y'all 
could thumbs up my pull request it will get added.  Thanks!

https://github.com/vinta/awesome-python/pull/787

Also a link to 
awesome-python https://github.com/vinta/awesome-python/blob/master/README.md

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] Scheduler is_ticker and deadlock issues

2017-01-24 Thread Jason Solack
Hello all, 

I'm having some re-occurring issue with the scheduler.  We are currently 
running multiple environments (production, beta) and have several nodes in 
each environment.  If we have scheduler services running on all machines on 
each node we get a lot of deadlock errors.  If we drop each environment 
down to one node we get no deadlock errors.  I am noticing the field 
"is_ticker" in the worker table will only have one ticker across all the 
workers (spanning environments).  Is that the expected behavior?  I don't 
see any documentation about the ticker field so i'm not sure what to expect 
from that.

Also is there any best practices about running the scheduler in an 
environment that i've described?  

Thanks in advance

Jason

-- 
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: Not authorized opening a url link with user_signature set

2017-01-24 Thread Anthony
On Tuesday, January 24, 2017 at 1:35:12 PM UTC-5, Alex Glaros wrote:
>
> @Anthony, is that how, or the best way, a web2py app can create an 
> e-signature service where an organization can get documents e-signed? 
>

I don't know. I suppose it depends on the requirements of the service. This 
method requires a login. Once a user is logged in, there are lots of ways 
to direct them to user-specific content (e.g., simply storing records in a 
database with a reference to the user ID).

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: Using Travis CI to test a web2py app on Github

2017-01-24 Thread Tim Korb
I was able to get Travis to work with my app by cloning Web2Py into the top 
level of my app directory during the Travis installation phase, then 
creating a symlink from the Web2Py applications directory to my app. 
 Here's a snippet of the .travis.xml file:

install:
  - pip install -r requirements.txt
  - git clone --recurse-submodules https://github.com/web2py/web2py.git
  - cd web2py; touch welcome.w2p; cd applications; ln -s ../../. MYAPP; mkdir 
MYAPP/databases; cd ..

script: ./web2py.py --test MYAPP/test


Two notes:


   - The "touch welcome.w2p" is just to suppress the error message that Web2Py 
currently generates when it starts up the first time.
   - The "mkdir MYAPP/databases" keeps Web2Py from crashing with a "database 
doesn't exist error" when it starts in test mode.

-- 
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] Off topic: What network and server information fields require encryption?

2017-01-24 Thread Alex Glaros
(Have not received response from stackOverflow and LinkedIn forums, hope 
it's okay to ask here.)

Am building a web2py online service desk that keeps track of servers and 
network devices. System is on Amazon cloud. Security basics are covered. 
Additionally, would like to know if some fields would justify being 
encrypted during rest. Any server/network data fields in list below stand 
out?

mac_address:
ip_address:
vendor:
manufacturer:
location:
Server type:  
Server model:  
bios version:  
CPU type: 
CPU quantity:  
CPU speed: 
Memory:  
Virtual memory:
Video:
OS:
OS family: 
Host name:
User name:

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: ERROR:root:New installation error: unable to create welcome.w2p file

2017-01-24 Thread Tim Korb
The error message occurs the first time Web2Py is started after doing a 
full clone:

$ git clone --recurse-submodules https://github.com/web2py/web2py.git
$ cd web2py
$ python web2py.py

The code in fileutils.py creates welcome.w2p correctly, but then tries to 
unlink the missing NEWINSTALL file, which generates the (somewhat 
confusing) error.

The error appears harmless, but I see it every time Travis CI runs.


On Tuesday, September 6, 2016 at 10:26:33 AM UTC-4, Massimo Di Pierro wrote:
>
> Did you do git clone --recursive as explained in the instructions?
>
> On Sunday, 28 August 2016 19:41:17 UTC-5, Rommel Sotto wrote:
>>
>> I have this error running it on macbook pro
>>
>> I installed it thru git clone.
>>
>> It does not also show the welcome page when i do 127.0.0.1:8000
>>
>> any thing I can do to fix 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 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: Not authorized opening a url link with user_signature set

2017-01-24 Thread Alex Glaros
@Anthony, is that how, or the best way, a web2py app can create an 
e-signature service where an organization can get documents e-signed?  

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: Best way to display results on a new page?

2017-01-24 Thread Anthony
Please show your code.

On Monday, January 23, 2017 at 4:53:07 PM UTC-5, Reed Crowe wrote:
>
> Seems like a simple thing.
>
> I have a simple search form with three fields on it.
>
> The information entered helps tailor the DB query.
> I have it working where it displays the data on the same form page, but I 
> want it to display on a separate page.
>
> What is the best way to do this?
> I have tried to use a redirect, but I can not seem to get it to parse the 
> returned data and display it.
> Is redirect the correct web2py way to do it or is there another method?
>
> Obviously I could use Django or take the data and using a python function 
> to parse the data and display it, but I am trying to learn web2py and so 
> far I am struggling a little bit.
>
> Any suggestions?
>

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


Re: [web2py] data from controller to javascript

2017-01-24 Thread Anthony
On Tuesday, January 24, 2017 at 7:43:24 AM UTC-5, Ramos wrote:
>
> try 
> var lista = {{=*XML(*dic["signals_list"]*)*}};
>

To be safe, you might instead want to convert the Python object to JSON:

var lista = {{=json.dumps(dic['signals_list'])}};

The latter approach will always generate a valid Javascript object 
(assuming the object is JSON serializable), whereas the former may not in 
some circumstances. For example:

XML(['a', 'b', None]) will yield:

var lista = ['a', 'b', None]

which is not valid Javascript.

But json.dumps(['a', 'b', None]) will yield the correct:

var lista = ["a", "b", null]

The difference is that XML() ultimately just calls str() on the object, 
whereas json.dumps generates a proper JSON object.

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: Not authorized opening a url link with user_signature set

2017-01-24 Thread António Ramos
Thank you Anthony. I think i can solve it with your snippet...



2017-01-24 15:26 GMT+00:00 Anthony :

> On Tuesday, January 24, 2017 at 6:50:30 AM UTC-5, Ramos wrote:
>>
>> hello i send a link to another user to approve a document.
>>
>> like this
>>
>> http://myapp.etc.etc/fileit/events/list?itemID=146=ficheir
>> os=6ed5d053-a2ff-48d8-8bd9-18400a059de4&_signature=1
>> 18c38a9845690d4acf628bc1b977ef1eca864fe
>>
>> if i send it to another user , that user gets a "not authorized" error
>> however if i send it to me as the approver i get the document to approve
>> and it works ok
>>
>> How can i solve this?
>>
>> the list function in controller events starts like this
>>
>> @auth.requires_signature()
>> def list():
>>
>
> The @auth.requires_signature() decorator expects the URL signature to be
> generated using the hmac key that is generated for the logged in user at
> login time (this key is stored in the user's session). However, you are
> presumably generating the signature in a request related to your own
> session, not the session of the user in question, so the hmac key used to
> generate the signature is not the same as the hmac key of the user that
> ultimately clicks the link.
>
> Instead, you must generate a signature based on some secret plus something
> unique to the user you are targeting, and then use the URL.verify() method
> to check that signature at authorization time. Something like this:
>
> secret = '123abc' # Just an example -- the real secret should be longer
> and random.
>
> def link_generating_action():
> targeted_user_id = some_id # Somehow get the id of the user you are
> targeting.
> url = URL('default', 'myaction', hmac_key='%s%s' % (secret,
> targeted_user_id))
> link = A('For your eyes only', _href=url)
> [do something with link]
>
> @auth.requires(lambda: URL.verify(request, hmac_key='%s%s' % (secret, auth
> .user.id))
> def myaction():
> ...
>
> For access to the above action, the user must be logged in, and the
> signature must match the one generated using a key that combines the secret
> plus the user's id.
>
> Anthony
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


[web2py] Re: Not authorized opening a url link with user_signature set

2017-01-24 Thread Anthony
On Tuesday, January 24, 2017 at 6:50:30 AM UTC-5, Ramos wrote:
>
> hello i send a link to another user to approve a document.
>
> like this
>
>
> http://myapp.etc.etc/fileit/events/list?itemID=146=ficheiros=6ed5d053-a2ff-48d8-8bd9-18400a059de4&_signature=118c38a9845690d4acf628bc1b977ef1eca864fe
>
> if i send it to another user , that user gets a "not authorized" error 
> however if i send it to me as the approver i get the document to approve 
> and it works ok
>
> How can i solve this?
>
> the list function in controller events starts like this
>
> @auth.requires_signature()
> def list():
>

The @auth.requires_signature() decorator expects the URL signature to be 
generated using the hmac key that is generated for the logged in user at 
login time (this key is stored in the user's session). However, you are 
presumably generating the signature in a request related to your own 
session, not the session of the user in question, so the hmac key used to 
generate the signature is not the same as the hmac key of the user that 
ultimately clicks the link.

Instead, you must generate a signature based on some secret plus something 
unique to the user you are targeting, and then use the URL.verify() method 
to check that signature at authorization time. Something like this:

secret = '123abc' # Just an example -- the real secret should be longer and 
random.

def link_generating_action():
targeted_user_id = some_id # Somehow get the id of the user you are 
targeting.
url = URL('default', 'myaction', hmac_key='%s%s' % (secret, 
targeted_user_id))
link = A('For your eyes only', _href=url)
[do something with link]

@auth.requires(lambda: URL.verify(request, hmac_key='%s%s' % (secret, auth.
user.id))
def myaction():
...

For access to the above action, the user must be logged in, and the 
signature must match the one generated using a key that combines the secret 
plus the user's id.

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: websocket_messaging.py error on multiple connections

2017-01-24 Thread Marlysson Silva
Show me the code.. So stay more easy help

Em terça-feira, 24 de janeiro de 2017 00:10:34 UTC-3, Omicron VT escreveu:
>
> Following the example in websocket_messaging.py i have this config:
>
> A tv.html view that refresh its content when an event on client.html sends 
> a message to group1
>
> All of this works fine if tv.html is opened only 1 time. 
>
> When i open tv.html more than one time when first message is sended, 
> tv.html begins an infinite loop refreshing for ever.
>
> Any ideas ?  
>

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

2017-01-24 Thread Javier Pepe
Hi

You can use selectable metod to pass selected row to a function to update
records.



El sáb., 21 ene. 2017 a las 12:05, Bishal Saha ()
escribió:

> Cant we use grid to update few rows ?
>
> --
> 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] data from controller to javascript

2017-01-24 Thread Diego Tostes
Thanks Ramos!

2017-01-24 10:42 GMT-02:00 António Ramos :

> try
> var lista = {{=*XML(*dic["signals_list"]*)*}};
>
>
> http://www.web2pyref.com/reference/xml-html-helper
>
> 2017-01-24 11:37 GMT+00:00 Diego Tostes :
>
>> Hi,
>>
>>
>> I need to send a list from controller to a javascript variable in the
>> view.
>>
>>
>> When i send the data the list to the view using:
>>
>>
>> var lista = {{=dic["signals_list"]}};
>>
>>
>> and when i try to open the page i get:
>>
>> var lista = [Fever, fever, dor no
>> corpo, enxaqueca];
>>
>> How can i fix this?
>>
>> Rgds
>>
>> Tostes
>>
>> --
>> 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: Encrypting/decrypting db values

2017-01-24 Thread Anthony
On Monday, January 23, 2017 at 7:36:50 PM UTC-5, Alex Glaros wrote:
>
> is this correct:  I need roughly 44 characters generated by my password 
> generator (no human/dictionary words) to contain about 256 bits of 
> randomness to obtain an AES 256-bit key?
>

It depends on the exact character set, but I think that is roughly the 
idea. Note, you would also likely use some key stretching process (i.e., a 
"password based key derivation function"), which would make a somewhat 
shorter password effectively as difficult to crack as a longer password 
that wasn't key stretched. So, you could get 256-bit level of protection 
with a slightly shorter password.

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] data from controller to javascript

2017-01-24 Thread António Ramos
try
var lista = {{=*XML(*dic["signals_list"]*)*}};


http://www.web2pyref.com/reference/xml-html-helper

2017-01-24 11:37 GMT+00:00 Diego Tostes :

> Hi,
>
>
> I need to send a list from controller to a javascript variable in the view.
>
>
> When i send the data the list to the view using:
>
>
> var lista = {{=dic["signals_list"]}};
>
>
> and when i try to open the page i get:
>
> var lista = [Fever, fever, dor no
> corpo, enxaqueca];
>
> How can i fix this?
>
> Rgds
>
> Tostes
>
> --
> 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] Not authorized opening a url link with user_signature set

2017-01-24 Thread António Ramos
hello i send a link to another user to approve a document.

like this

http://myapp.etc.etc/fileit/events/list?itemID=146=ficheiros=6ed5d053-a2ff-48d8-8bd9-18400a059de4&_signature=118c38a9845690d4acf628bc1b977ef1eca864fe

if i send it to another user , that user gets a "not authorized" error
however if i send it to me as the approver i get the document to approve
and it works ok

How can i solve this?

the list function in controller events starts like this

@auth.requires_signature()
def list():


regards
António

-- 
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] data from controller to javascript

2017-01-24 Thread Diego Tostes
Hi,


I need to send a list from controller to a javascript variable in the view.


When i send the data the list to the view using:


var lista = {{=dic["signals_list"]}};


and when i try to open the page i get:

var lista = [Fever, fever, dor no
corpo, enxaqueca];

How can i fix this?

Rgds

Tostes

-- 
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: static file

2017-01-24 Thread Diego Tostes
work!!

thanks guys!

2017-01-20 13:28 GMT-02:00 António Ramos :

> open the browser console. You should see some kind of warning saying  css
> and js not found..
>
> in your html you are calling the js like this ?!
> 
> you should place your js inside static/js
> then load it like this in the html
> {{response.files.append(URL('static','/js/tagit.js'))}}
>
>
>
>
> 2017-01-20 12:42 GMT+00:00 Diego Tostes :
>
>> Hi guys,,...
>>
>> i did all the tips without succes...
>>
>> here is my files:
>>
>> html file  -   http://pastebin.com/XDVkv4T6
>> js file - http://pastebin.com/70HMVFNb
>> css file - http://pastebin.com/yanwj6ve
>>
>>
>> my html file is at /views/config/disease.html
>>
>>
>> Rgds
>>
>> Tostes
>>
>>
>> 2017-01-19 20:26 GMT-02:00 António Ramos :
>>
>>> if you already placed your css and js in static then in your html inside
>>> your controller folder you can do
>>>
>>> {{response.files.extend([URL('static','js/xxx.js')])}}
>>> {{response.files.append(URL('static','/js/yyy.js'))}}
>>> {{response.files.append(URL('static','/css/zzz.css'))}}
>>> {{extend 'layout.html'}}
>>>
>>> 2017-01-19 20:30 GMT+00:00 Dave S :
>>>
 On Thursday, January 19, 2017 at 12:22:06 PM UTC-8, Diego Tostes wrote:
>
> Hi,
>
> I have a html file that i i need to use with web2py, but this file
> access a unique css and js file.
>
>
> I try to add the files at the static withous success. I try to
> hardcoder the script and the css at the html file without success too.
>
> How can i do ?
>
> Rgds
>
> Tostes
>

 I have a graph that's served by myapp/static/chart1.html.  It has the
 following header lines:

 
 HTML5 Canvas Chart Demo
 
 
 
 
 
 


 data.js is just an array declaration (and generated by a script).

 The Rgraph stuff is in maypp/static/js

 If this doesn't help, please show us what you've tried.

 /dps



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

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


[web2py] Re: Best way to display results on a new page?

2017-01-24 Thread Dave S
On Monday, January 23, 2017 at 4:09:43 PM UTC-8, Dave S wrote:
>
>
>
> On Monday, January 23, 2017 at 2:48:21 PM UTC-8, Jim S wrote:
>>
>> I'd build the url using URL and then redirect to the controller page to 
>> build the results page.
>>
>> http://web2py.com/books/default/chapter/29/04#markmin_URL
>>
>> http://web2py.com/books/default/chapter/29/04/the-core?search=redirect#HTTP-and-redirect
>>
>> -Jim
>>
>
> (To expand on this)
> The post at
> 
> discusses a self-redirect after a form.process().accepted, but the idea is 
> the same for going elsewhere.
> See the second paragraph.
>
>  
Even more expansion:   the book explicity talks about redirecting --


/dps


>>
>>
>> On Monday, January 23, 2017 at 3:53:07 PM UTC-6, Reed Crowe wrote:
>>>
>>> Seems like a simple thing.
>>>
>>> I have a simple search form with three fields on it.
>>>
>>> The information entered helps tailor the DB query.
>>> I have it working where it displays the data on the same form page, but 
>>> I want it to display on a separate page.
>>>
>>> What is the best way to do this?
>>> I have tried to use a redirect, but I can not seem to get it to parse 
>>> the returned data and display it.
>>> Is redirect the correct web2py way to do it or is there another method?
>>>
>>> Obviously I could use Django or take the data and using a python 
>>> function to parse the data and display it, but I am trying to learn web2py 
>>> and so far I am struggling a little bit.
>>>
>>> Any suggestions?
>>>
>>

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