[web2py] authentication fields

2018-02-17 Thread F.C.
I am creating custom forms using the standard authentication sql forms. 
Where can I get a list of all the relevant fields that come with these 
forms.

For example, for the password, reset I believe that password and 
password_two can be used to grab the password from the user. What field is 
used to capture the old password?


-- 
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: How to have a view getting data from a long running time controller ?

2018-02-17 Thread Val K
try  encode yield:
yield DIV(...).xml().encode('utf-8')



On Sunday, February 18, 2018 at 3:36:13 AM UTC+3, Ramos wrote:
>
> i think i misplaced axios.min.js
>
> second try and got this error
> [image: Imagem inline 1]
> and after 3 seconds i got this 
>
> [image: Imagem inline 2]
>
>
> Regards
> António
>
>
>
> 2018-02-17 22:38 GMT+00:00 Val K :
>
>> As I see it's PY3, I tested on PY2. As I know in PY3 all strings are 
>> unicode, so, It is necessary to dig in this direction
>>
>>
>> On Saturday, February 17, 2018 at 10:46:40 PM UTC+3, Ramos wrote:
>>>
>>> I tried your simple example but when i click on the button i get "Server 
>>> Error" above the button
>>>
>>> then in admin i see this
>>> [image: Imagem inline 1]
>>> any help
>>> Regards
>>>
>>> 2018-02-16 23:48 GMT+00:00 Val K :
>>>
 Just a very simple example using https://github.com/axios/axios


 def long_load():
 ret = DIV()
 ret.append(SCRIPT(_src=URL('static/js','axios.min.js')))
 ret.append(SCRIPT(
 """
 function DownLoadTick(e){
 document.getElementById("result").innerHTML = 
 e.target.response; 
 };
   function long_load(){
 axios({
   url: 'streamer',
   timeout: 100,
   onDownloadProgress: DownLoadTick,
   withCredentials: true
 });
 };
 """
 ))
 ret.append(DIV(_id='result'))
 ret.append(BUTTON('click me', _onclick = 'long_load()'))
 return dict(ret=ret)

 def streamer():
 i=0
 while True:
 # do something for a long time
 time.sleep(1)
 yield DIV('part %s' % i).xml()
 i+=1
 if i>5: 
 yield DIV('Done!').xml()
 break






 On Tuesday, February 13, 2018 at 10:28:13 PM UTC+3, Ramos wrote:
>
> Hello i have a controller that scans a lot of databases searching for 
> some data.
> The view in the end gets that data a makes a dashboard.
>
> If the controller takes 10 minutes , the view is blank for 10 minutes 
> and that is not a good thing for the user.
>
> How can i have the controller to send the data to the view and the 
> view to display data as it is being calculated from the controller?
> Is it possible in a simple manner?
>
>
>
> 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+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] Re: How to have a view getting data from a long running time controller ?

2018-02-17 Thread António Ramos
i think i misplaced axios.min.js

second try and got this error
[image: Imagem inline 1]
and after 3 seconds i got this

[image: Imagem inline 2]


Regards
António



2018-02-17 22:38 GMT+00:00 Val K :

> As I see it's PY3, I tested on PY2. As I know in PY3 all strings are
> unicode, so, It is necessary to dig in this direction
>
>
> On Saturday, February 17, 2018 at 10:46:40 PM UTC+3, Ramos wrote:
>>
>> I tried your simple example but when i click on the button i get "Server
>> Error" above the button
>>
>> then in admin i see this
>> [image: Imagem inline 1]
>> any help
>> Regards
>>
>> 2018-02-16 23:48 GMT+00:00 Val K :
>>
>>> Just a very simple example using https://github.com/axios/axios
>>>
>>>
>>> def long_load():
>>> ret = DIV()
>>> ret.append(SCRIPT(_src=URL('static/js','axios.min.js')))
>>> ret.append(SCRIPT(
>>> """
>>> function DownLoadTick(e){
>>> document.getElementById("result").innerHTML =
>>> e.target.response;
>>> };
>>>   function long_load(){
>>> axios({
>>>   url: 'streamer',
>>>   timeout: 100,
>>>   onDownloadProgress: DownLoadTick,
>>>   withCredentials: true
>>> });
>>> };
>>> """
>>> ))
>>> ret.append(DIV(_id='result'))
>>> ret.append(BUTTON('click me', _onclick = 'long_load()'))
>>> return dict(ret=ret)
>>>
>>> def streamer():
>>> i=0
>>> while True:
>>> # do something for a long time
>>> time.sleep(1)
>>> yield DIV('part %s' % i).xml()
>>> i+=1
>>> if i>5:
>>> yield DIV('Done!').xml()
>>> break
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tuesday, February 13, 2018 at 10:28:13 PM UTC+3, Ramos wrote:

 Hello i have a controller that scans a lot of databases searching for
 some data.
 The view in the end gets that data a makes a dashboard.

 If the controller takes 10 minutes , the view is blank for 10 minutes
 and that is not a good thing for the user.

 How can i have the controller to send the data to the view and the view
 to display data as it is being calculated from the controller?
 Is it possible in a simple manner?



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

-- 
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: How to have a view getting data from a long running time controller ?

2018-02-17 Thread Val K
As I see it's PY3, I tested on PY2. As I know in PY3 all strings are 
unicode, so, It is necessary to dig in this direction


On Saturday, February 17, 2018 at 10:46:40 PM UTC+3, Ramos wrote:
>
> I tried your simple example but when i click on the button i get "Server 
> Error" above the button
>
> then in admin i see this
> [image: Imagem inline 1]
> any help
> Regards
>
> 2018-02-16 23:48 GMT+00:00 Val K :
>
>> Just a very simple example using https://github.com/axios/axios
>>
>>
>> def long_load():
>> ret = DIV()
>> ret.append(SCRIPT(_src=URL('static/js','axios.min.js')))
>> ret.append(SCRIPT(
>> """
>> function DownLoadTick(e){
>> document.getElementById("result").innerHTML = 
>> e.target.response; 
>> };
>>   function long_load(){
>> axios({
>>   url: 'streamer',
>>   timeout: 100,
>>   onDownloadProgress: DownLoadTick,
>>   withCredentials: true
>> });
>> };
>> """
>> ))
>> ret.append(DIV(_id='result'))
>> ret.append(BUTTON('click me', _onclick = 'long_load()'))
>> return dict(ret=ret)
>>
>> def streamer():
>> i=0
>> while True:
>> # do something for a long time
>> time.sleep(1)
>> yield DIV('part %s' % i).xml()
>> i+=1
>> if i>5: 
>> yield DIV('Done!').xml()
>> break
>>
>>
>>
>>
>>
>>
>> On Tuesday, February 13, 2018 at 10:28:13 PM UTC+3, Ramos wrote:
>>>
>>> Hello i have a controller that scans a lot of databases searching for 
>>> some data.
>>> The view in the end gets that data a makes a dashboard.
>>>
>>> If the controller takes 10 minutes , the view is blank for 10 minutes 
>>> and that is not a good thing for the user.
>>>
>>> How can i have the controller to send the data to the view and the view 
>>> to display data as it is being calculated from the controller?
>>> Is it possible in a simple manner?
>>>
>>>
>>>
>>> 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+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


[web2py] Re: parametric routes

2018-02-17 Thread Anthony
On Saturday, February 17, 2018 at 4:46:59 PM UTC-5, Scorpa wrote:
>
> Thats reall frustrating because there is no details about parametric and 
> so i need to use patterns :(
>

It's not clear what you're talking about. The problem is not a lack of 
details about the parameter-based system -- the link below provides fairly 
comprehensive documentation of it. The parameter-based system simply cannot 
do what you want -- so you must use the pattern-based system instead.

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: parametric routes

2018-02-17 Thread Scorpa
Thats reall frustrating because there is no details about parametric and so 
i need to use patterns :(

суббота, 17 февраля 2018 г., 22:05:06 UTC+3 пользователь Anthony написал:
>
> On Saturday, February 17, 2018 at 1:09:28 PM UTC-5, Scorpa wrote:
>>
>> Unfortunately this gives nothing.
>>
>
> You have already been directed to check out the pattern-based system for 
> your needs.
>  
>
>> Again case is very simple redirect from view named "abc" to controler 
>> "blabla".
>> It's not even something unusual.
>>
>
> Please read the documentation: 
> http://web2py.com/books/default/chapter/29/04/the-core#Pattern-based-system. 
> The very first example there does exactly what you are asking.
>
> 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: About Rest API uploads (again)

2018-02-17 Thread Marco Mansilla
Yes, got it. I hace something like:


var image = event.target[0];
formData.append('name', image.name);
formData.append('myfile', image);
 axios.post('../services/api/uploads', formData).then(...).catch(...);

Params are correctly passed to the server, but files are not uploaded.

El 16 feb. 2018 22:36, "Val K"  escribió:

> Are you trying  to insert formData in something another? I believe, that
>  formData should be passed to axios as is:
>  axios.post('../services/api/uploadimg', formData)
>
> if you need to add some fields just do it:
>  formData.append('name', 'blah')
>
>
>
>
> On Monday, February 5, 2018 at 7:16:04 AM UTC+3, marco mansilla wrote:
>>
>> Hi everyone, this is something that has been asked several times and
>> still there's no specific solution.
>>
>> I need to upload files by using a Rest API, so far I know we have nice
>> ways to implement our apps in web2py
>>
>> http://www.web2pyslices.com/slice/show/1533/restful-api-with-web2py is
>> one way, simple and clean.
>>
>> the other one is
>>
>> http://experts4solutions.com/collection2/default/examples
>>
>> both work perfectly fine wiith regular form data, as it comes with
>> uploads they dont.
>>
>> following the recipe from Bruno I can upload files by using curl like this
>>
>> curl POST -F "name=myfile" -F "image=@/home/user/myimgfile.png"
>> http://127.0.0.1:8000/myapp/services/api/uploadimg
>>
>> and it works.
>>
>> In this new project I need to upload several images and some other format
>> files (csv, doc, pdf, xls), as now I'm working with Vue.js and Axios it
>> would be awesome (and somehow faster) applying it.
>>
>> when I try to send the request using axios in this way
>>
>>let img=e.target.files;
>>let formData = new FormData();
>>
>>formData.append('file', img[0]);
>>axios.post('../services/api/uploadimg',{
>> name:'test from axios',
>> image:formData
>> }, { headers: { 'Content-Type': 'multipart/form-data' } })
>> .then((response)=>{console.log('file uploaded');})
>> .catch((error)=>{console.log(error);});
>> }
>>
>> server returns an error
>>
>> Traceback (most recent call last):
>>   File "/home/user/web2py/gluon/restricted.py", line 219, in restricted
>> exec(ccode, environment)
>>   File "/home/user/web2py/applications/myapp/controllers/services.py", line 
>> 50, in 
>>   File "/home/user/web2py/gluon/globals.py", line 414, in 
>> self._caller = lambda f: f()
>>   File "/home/user/web2py/gluon/globals.py", line 377, in f
>> res = rest_action(*request.args, **request.vars)
>>   File "/home/user/web2py/gluon/globals.py", line 309, in vars
>> self.parse_all_vars()
>>   File "/home/user/web2py/gluon/globals.py", line 280, in parse_all_vars
>> for key, value in iteritems(self.post_vars):
>>   File "/home/user/web2py/gluon/globals.py", line 301, in post_vars
>> self.parse_post_vars()
>>   File "/home/user/web2py/gluon/globals.py", line 237, in parse_post_vars
>> dpost = cgi.FieldStorage(fp=body, environ=env, keep_blank_values=1)
>>   File "/usr/lib/python2.7/cgi.py", line 507, in __init__
>> self.read_multi(environ, keep_blank_values, strict_parsing)
>>   File "/usr/lib/python2.7/cgi.py", line 621, in read_multi
>> raise ValueError, 'Invalid boundary in multipart form: %r' % (ib,)
>> ValueError: Invalid boundary in multipart form: '
>>
>>
>> couln't find much on that error but an old post in this group from 2012
>>
>> https://groups.google.com/forum/#!topic/web2py/ixeUUWryZh0/discussion
>>
>> Any suggestions?, meanwhile I'm still trying to make it work.
>>
>> Greets.
>>
>> --
> 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] Re: How to have a view getting data from a long running time controller ?

2018-02-17 Thread António Ramos
I tried your simple example but when i click on the button i get "Server
Error" above the button

then in admin i see this
[image: Imagem inline 1]
any help
Regards

2018-02-16 23:48 GMT+00:00 Val K :

> Just a very simple example using https://github.com/axios/axios
>
>
> def long_load():
> ret = DIV()
> ret.append(SCRIPT(_src=URL('static/js','axios.min.js')))
> ret.append(SCRIPT(
> """
> function DownLoadTick(e){
> document.getElementById("result").innerHTML =
> e.target.response;
> };
>   function long_load(){
> axios({
>   url: 'streamer',
>   timeout: 100,
>   onDownloadProgress: DownLoadTick,
>   withCredentials: true
> });
> };
> """
> ))
> ret.append(DIV(_id='result'))
> ret.append(BUTTON('click me', _onclick = 'long_load()'))
> return dict(ret=ret)
>
> def streamer():
> i=0
> while True:
> # do something for a long time
> time.sleep(1)
> yield DIV('part %s' % i).xml()
> i+=1
> if i>5:
> yield DIV('Done!').xml()
> break
>
>
>
>
>
>
> On Tuesday, February 13, 2018 at 10:28:13 PM UTC+3, Ramos wrote:
>>
>> Hello i have a controller that scans a lot of databases searching for
>> some data.
>> The view in the end gets that data a makes a dashboard.
>>
>> If the controller takes 10 minutes , the view is blank for 10 minutes and
>> that is not a good thing for the user.
>>
>> How can i have the controller to send the data to the view and the view
>> to display data as it is being calculated from the controller?
>> Is it possible in a simple manner?
>>
>>
>>
>> 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.
>

-- 
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: parametric routes

2018-02-17 Thread Anthony
On Saturday, February 17, 2018 at 1:09:28 PM UTC-5, Scorpa wrote:
>
> Unfortunately this gives nothing.
>

You have already been told to check out the pattern-based system for your 
needs.
 

> Again case is very simple redirect from view named "abc" to controler 
> "blabla".
> It's not even something unusual.
>

Please read the 
documentation: 
http://web2py.com/books/default/chapter/29/04/the-core#Pattern-based-system. 
The very first example there does exactly what you are asking.

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: parametric routes

2018-02-17 Thread Scorpa
Unfortunately this gives nothing.

Again case is very simple redirect from view named "abc" to controler 
"blabla".
It's not even something unusual.

пятница, 16 февраля 2018 г., 19:05:14 UTC+3 пользователь Anthony написал:
>
> On Friday, February 16, 2018 at 7:03:18 AM UTC-5, Scorpa wrote:
>>
>> Documentation about parametric system is VERY bad and doesnt describe its 
>> abilities in.
>>
>
> There is more detail in the example file: 
> https://github.com/web2py/web2py/blob/master/examples/routes.parametric.example.py
>  
>
>> But because it's stated that parametric systems should be suffcient for 
>> all i assume somewhere i can find how to implement my solution.
>>
>
> I don't think it is stated anywhere that the parameter-based system is 
> sufficient for *all *use cases. The parameter-based system was created 
> after the pattern-based system and designed to accommodate the most common 
> use cases in a simpler manner. The pattern-based system is for handling 
> more complex cases.
>
> 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: Custom buttons and standard buttons

2018-02-17 Thread Francois Barnard
Thank you so much!

On Sat, Feb 17, 2018 at 10:44 AM, Anthony  wrote:

> On Saturday, February 17, 2018 at 10:57:08 AM UTC-5, F.C. wrote:
>>
>> How do i change the class of a custom and/or standard form button. Is
>> there an example you can reference? Again, thank you for the assistance
>>
>
> To add a class to the submit button:
>
> form.custom.submit.add_class('my_class')
>
> To completely change the class:
>
> form.custom.submit['_class'] = 'my_class'
>
> You can also use .element() (as described here
> ) to
> find and manipulate any DOM element within the form.
>
> Finally, SQLFORM takes a "formstyle" argument, which can be a function
> that produces the form DOM. For examples of how the function should work,
> see for example: https://github.com/web2py/web2py/blob/
> 82cf2eb44db907a3ca20c29ee8116f95ef77bb5a/gluon/sqlhtml.py#L991.
>
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/IEWkmxjLqcA/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.


Re: [web2py] Re: Custom buttons and standard buttons

2018-02-17 Thread Anthony
On Saturday, February 17, 2018 at 10:57:08 AM UTC-5, F.C. wrote:
>
> How do i change the class of a custom and/or standard form button. Is 
> there an example you can reference? Again, thank you for the assistance 
>

To add a class to the submit button:

form.custom.submit.add_class('my_class')

To completely change the class:

form.custom.submit['_class'] = 'my_class'

You can also use .element() (as described here 
) to find 
and manipulate any DOM element within the form.

Finally, SQLFORM takes a "formstyle" argument, which can be a function that 
produces the form DOM. For examples of how the function should work, see 
for 
example: 
https://github.com/web2py/web2py/blob/82cf2eb44db907a3ca20c29ee8116f95ef77bb5a/gluon/sqlhtml.py#L991.

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: Custom buttons and standard buttons

2018-02-17 Thread Yi Liu
There is nothing special about form button as one of the html constructors. 
They all support standard HTML helpers:

http://www.web2py.com/books/default/chapter/29/05/the-views#HTML-helpers

`_class` generates the class tag

You can read more about INPUT here: 
http://www.web2py.com/books/default/chapter/29/05/the-views#INPUT


On Saturday, February 17, 2018 at 7:57:08 AM UTC-8, F.C. wrote:
>
> How do i change the class of a custom and/or standard form button. Is 
> there an example you can reference? Again, thank you for the assistance 
>
> On Sat, Feb 17, 2018 at 09:41 Yi Liu  
> wrote:
>
>> They are already in default bootstrap style. 
>>
>> _class='btn btn-primary'
>>
>> To customize, you can add your own css file, or edit the form constructor 
>> to add a new class, or id , or change to different bootstrap class to 
>> specific form button. For example:
>>
>> _class='btn btn-danger'
>>
>> Your browser's web developer tool will also be handy for such work.
>>
>>
>> On Saturday, February 17, 2018 at 7:09:44 AM UTC-8, F.C. wrote:
>>>
>>> Quick question. Can someone point me to any guidance on how to change 
>>> the style of standard form buttons or custom buttons that i added to a 
>>> form. I want to format them using bootstrap styles. Any help will be 
>>> appreciated. Also Web2py rocks!!!
>>
>> -- 
>> 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/IEWkmxjLqcA/unsubscribe.
>> To unsubscribe from this group and all its topics, 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] Re: Custom buttons and standard buttons

2018-02-17 Thread Francois Barnard
How do i change the class of a custom and/or standard form button. Is there
an example you can reference? Again, thank you for the assistance

On Sat, Feb 17, 2018 at 09:41 Yi Liu  wrote:

> They are already in default bootstrap style.
>
> _class='btn btn-primary'
>
> To customize, you can add your own css file, or edit the form constructor
> to add a new class, or id , or change to different bootstrap class to
> specific form button. For example:
>
> _class='btn btn-danger'
>
> Your browser's web developer tool will also be handy for such work.
>
>
> On Saturday, February 17, 2018 at 7:09:44 AM UTC-8, F.C. wrote:
>>
>> Quick question. Can someone point me to any guidance on how to change the
>> style of standard form buttons or custom buttons that i added to a form. I
>> want to format them using bootstrap styles. Any help will be appreciated.
>> Also Web2py rocks!!!
>
> --
> 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/IEWkmxjLqcA/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: Custom buttons and standard buttons

2018-02-17 Thread Yi Liu
They are already in default bootstrap style. 

_class='btn btn-primary'

To customize, you can add your own css file, or edit the form constructor 
to add a new class, or id , or change to different bootstrap class to 
specific form button. For example:

_class='btn btn-danger'

Your browser's web developer tool will also be handy for such work.

On Saturday, February 17, 2018 at 7:09:44 AM UTC-8, F.C. wrote:
>
> Quick question. Can someone point me to any guidance on how to change the 
> style of standard form buttons or custom buttons that i added to a form. I 
> want to format them using bootstrap styles. Any help will be appreciated. 
> Also Web2py rocks!!!

-- 
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] Custom buttons and standard buttons

2018-02-17 Thread F.C.
Quick question. Can someone point me to any guidance on how to change the style 
of standard form buttons or custom buttons that i added to a form. I want to 
format them using bootstrap styles. Any help will be appreciated. Also Web2py 
rocks!!!

-- 
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: Trouble with reset password

2018-02-17 Thread Yi Liu
Hi, I reported the lost password issue here:

https://github.com/web2py/web2py/issues/1842

It is fixed and will be in next release.

On Wednesday, January 24, 2018 at 9:07:04 AM UTC-8, Julian Sanchez wrote:
>
> I'm having troubles with the reset password functionality and I'm hoping 
> you guys can give me some pointers on what to check, or how to fix it 
> (version 2.16.1 stable, running from source).
>
> When running my application in GAE I can go to the reset password page 
> ('default/user/request_reset_password') and enter the email address, but 
> when I click on 'Request reset password' button It goes straight to the 
> internal error page, and the logs show "TypeError: long() argument must be 
> a string or a number, not 'auth_user'".
>
> I re-downloaded the web2py source code and put it on a separate location.  
> I simply went to the default app and registered a test user.  When I 
> clicked on the "Lost Password" menu option it went straight to a "404 NOT 
> FOUND".
>
> So at this point I'm not sure if my application is doing something wrong 
> or if it's an issue with the actual framework since the default application 
> doesn't seem to be working right.  I've seen other posts around password 
> reset not working but seem to be related to other issues.  Any 
> ideas/suggestions I would greatly appreciate it.
>
> Thanks,
> Julian
>
>
>
>

-- 
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: Just a silly thread to say... thanks to all web2py developers team

2018-02-17 Thread Yi Liu
I cannot agree more. Web2py is so easy to use, and the support here is so 
genuine, friendly and patient.

I wish the developers all the best!

On Friday, February 9, 2018 at 1:42:10 AM UTC-8, Jaime Sempere wrote:
>
> Hi,
>
> this is gonna sound a littile silly, but I have been wanting to publish a 
> thread like this from years ago.
>
> I just wanna say to Massimo and all the web2py developers one thing: 
> thanks. Thanks a lot.
>
> I love web2py and I enjoy programming and developing with it.
>
> I can notice all the effort and all the work you have made to create a 
> super simple, easy, fun, and good programmed framework like web2py.
>
> Everytime I need to develop a new personal project, I always choose web2py 
> if I can.
>
> I see magic and simplicity in every aspect of web2py. I could not imagine 
> a quicker framework than web2py.
>
> And everytime I need to do something new, when I look to the book, I 
> always find a very easy and simple way to do it. And that's something I 
> love: I find that you have worked a lot to build something simple and 
> powerful. Programming should be like that: simple, non verbose, and fun. 
> Like 'just focus  on the logic and forget about verbose, and extra code, or 
> anything too complicated'... keep it simple, stupid!
>
> And the integrations that you have made possible with GAE or Heroku... oh 
> come on, someone gives these guys a medal!
>
> Or any time that I need to make a customization, or touch anything from 
> the core, I always think to myself: 'this is perfectly programmed, this is 
> exactly how I would develop it', it is like web2py read my mind or if it 
> had same way of thinking as me.
>
> I find magic and roids in every aspect of web2py.
>
> And by the way, vim and web2py make a wonderful team. I feel like a super 
> fanatic boy of both of them...
>
> Well I do not know if this sounds too foolish, but I just want to say to 
> all the members that made and make web2py a solid framework that: thanks, 
> my respects and keep making this framework a reality.
>
> Plus, this group is wonderful support.
>
> Well, that's enough, maybe this can sound awkward or a typical fan-boy 
> thread... but for a last time, thanks to all of you.
>
> Jaime
>

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