[web2py] Re: smartgrid tampering with url in browser

2017-06-26 Thread T.R.Rajkumar
Yes, Anthony I did del session.auth in logout action and it working fine. 
Thanks for all the input. I thought I cannot use the grid without auth. But 
now because of your help the dependency has been removed and I am on my own 
authentication. Thanks again.

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


[web2py] SQLForm.factory jquery conditional fields in Views

2017-06-26 Thread Karl Florian











*Hi everybody,what is wrong with this JQuery Script?Changing the 
reporttype, should hide or show the incomingref field.Best regardsCharles 
Heinz Florian -Controllers - 
orderrpt.py*
WHINREPS = {'CARGIN':'Cargo in storage report','INVREP':'Inventory 
report','CMANIN':'Cargo Manifest incoming'}
form = SQLFORM.factory(
Field('reporttype', 'string', label='Report type', 
requires=IS_IN_SET(WHINREPS), default='CARGIN'),
Field('reportaddinf', 'string', label='Add. information', 
default=''),
Field('cust_mc', 'string', 
label='Customer-MC',widget=SQLFORM.widgets.autocomplete(request 
,db.fcustomers.cust_mc, limitby=(0,10), min_length=0)),
Field('shipmtype', 'string', label='Shipment-Type', 
requires=IS_IN_SET(['All','Export','Import','Consolidation']), 
default='All'),
Field('incomingref', 'string', label='Cargo in ref.'),
Field('fdate_in_wh', 'date', label='From-Date-in-Storage'),
Field('tdate_in_wh', 'date', label='To-Date-in-Storage'),
Field('sortpdf', 'string', label='Sort-by', 
requires=IS_IN_SET(['Customer-MC','Date-in-Storage']), 
default='Date-in-Storage'),
buttons = btn_list,
formstyle = 'table3cols',
submit_button='Submit')
form.vars.fdate_in_wh= datetime.datetime.now().date().replace(day=1)
form.vars.tdate_in_wh= datetime.datetime.now().date()
if form.process().accepted:




*Views - 
orderrpt.html*{{extend
 
'layout.html'}}
{{block center}}



{{=form.custom.begin}}


   
{{=form.custom.label.reporttype}}
{{=form.custom.widget.reporttype}}

   
{{=form.custom.label.reportaddinf}}
{{=form.custom.widget.reportaddinf}}


{{=form.custom.label.cust_mc}}
{{=form.custom.widget.cust_mc}}

   
{{=form.custom.label.shipmtype}}
{{=form.custom.widget.shipmtype}}

   
{{=form.custom.label.incomingref}}
{{=form.custom.widget.incomingref}}

 additional elements ...


{{=form.custom.submit}}
{{=form.custom.end}}






*This script does not hide the 'incomingref' row.Apparently JQuery can not 
read the value of the 'reporttype' element.*
#WHINREPS = {'CARGIN':'Cargo in storage report','INVREP':'Inventory 
report','CMANIN':'Cargo Manifest incoming'}
jQuery(document).ready(function(){
if(jQuery('#no_table_reporttype').val() == 'INVREP')
jQuery('#no_table_incomingref__row').hide();
else jQuery('#no_table_incomingref__row').show();
jQuery('#no_table_reporttype').change(function(){
if(jQuery('#no_table_reporttype').val() == 'INVREP'){
jQuery('#no_table_incomingref__row').hide();
}
else {
jQuery('#no_table_incomingref__row').show();
};
});
});


{{end}}

-- 
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: New plugin to integrate with SparkPost

2017-06-26 Thread Leonel Câmara
Hey,

no-re...@example.com should be replaced by an email in your sparkpost 
sending domain, the email that you wish to use to send emails from. Later 
if you want to send emails with another from address you can use the sender 
keyword argument in the send method to use another one.  
  

> Anyway you know how to populate custom email address based on username? 
> e.g.,  us...@sparkmail.com, us...@sparkmail.com, ...so that each user has 
> his own inbox?


Maybe I'm misunderstanding you, but note that this plugin does not deal 
with inboxes, sparkpost is used to send email not to receive it. 
  
Using this plugin you are able to send emails in exactly the same way 
described in the web2py book in the sending section:
http://www.web2py.com/books/default/chapter/29/08/emails-and-sms#Sending-emails

The objective was to make it as easy as possible for web2py users to use 
the sparkpost REST API without having to change any kind of code in their 
project.  

I'm open to adding missing features if people need them as I will also be 
using 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.


Re: [web2py] Active Directory (ldap) authntication problem

2017-06-26 Thread Richard Vézina
Note : Don't use many differents methods of authentication, if you can... I
was doing it before until I realize that my user was block/locked regularly
because of automated testing... The web2py is performing multiple
authentication, trying one method before shift to the other if the password
is not working... Automated test launching failing authentication attempt
to AD because I was using web2py auth password block my AD account...

Richard




On Mon, Jun 26, 2017 at 3:44 PM, Richard Vézina  wrote:

> Here my conf :
>
> auth.settings.login_methods = \
> [auth,
>  ldap_auth(mode='ad',
># --
> -
># To unlock LDAPS with self-signed certificate this line
> should be
># present in ldap_auth.py :
># ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT,
> ldap.OPT_X_TLS_NEVER)
># This line should be inside : ldap_auth()
># Ref: https://onemoretech.wordpress.
> com/2015/06/25/connecting-to-ldap-over-self-signed-tls-with-python/
># Ref: http://bneijt.nl/blog/post/
> connecting-to-ldaps-with-self-signed-cert-using-python/
># Ref: https://mail.python.org/
> pipermail/python-ldap/2015q4/003631.html
>port=636,
>secure=True,
>self_signed_certificate=True,
># --
> -
>bind_dn='DOMAIN\AD_USER_NAME',
>bind_pw='PASSWORD',
>manage_groups=False,
>manage_user=True,
>user_firstname_attrib='cn:1',  # May use other attributes
> you have to try
>user_lastname_attrib='cn:2',  # May use other attributes
> you have to try
>server='SERVER_DNS',
>user_mail_attrib='mail',
># userPrincipalName #mail #proxyAddresses:1
># username_attrib='sAMAccountName',
>base_dn='dc=DOMAIN,dc=COM/NET/ORG/ETC',  # Depend of AD
> config
>logging_level='error',
>db=db)]
>
> I think your main issue is not having bind username and bind password...
> You need a AD user that can accees the same base dn then the users to
> authenticate...
>
> Richard
>
> On Mon, Jun 26, 2017 at 1:32 PM, Francisco García 
> wrote:
>
>> Hello all,
>>
>> I have the following configuration to validate users with windows Active
>> directory:
>>
>>
>> auth.define_tables(username=False, signature=False)
>> auth.settings.create_user_groups = False
>>
>> auth.settings.actions_disabled=['register','change_password'
>> ,'request_reset_password','retrieve_username','profile']
>> auth.settings.remember_me_form = False
>>
>> auth.settings.login_methods.append(ldap_auth(mode='ad',
>>  server= server_ldap,
>>  base_dn='OU=_delegat,DC=domai
>> n,DC=net'
>> ))
>>
>> auth.settings.login_methods = [ldap_auth, auth]
>>
>>
>> With this configuration, Active directory server doesn't validate users.
>> And whatever email and password access, creates the new user, if it
>> doesn't exist, and grant access to application.
>>
>> Do you know what could be the problem?.
>> Any help is appreciated.  Thank you.
>>
>> Best regards,
>> Francisco.
>>
>> --
>> 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] Active Directory (ldap) authntication problem

2017-06-26 Thread Richard Vézina
Here my conf :

auth.settings.login_methods = \
[auth,
 ldap_auth(mode='ad',
   #
---
   # To unlock LDAPS with self-signed certificate this line
should be
   # present in ldap_auth.py :
   # ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT,
ldap.OPT_X_TLS_NEVER)
   # This line should be inside : ldap_auth()
   # Ref:
https://onemoretech.wordpress.com/2015/06/25/connecting-to-ldap-over-self-signed-tls-with-python/
   # Ref:
http://bneijt.nl/blog/post/connecting-to-ldaps-with-self-signed-cert-using-python/
   # Ref:
https://mail.python.org/pipermail/python-ldap/2015q4/003631.html
   port=636,
   secure=True,
   self_signed_certificate=True,
   #
---
   bind_dn='DOMAIN\AD_USER_NAME',
   bind_pw='PASSWORD',
   manage_groups=False,
   manage_user=True,
   user_firstname_attrib='cn:1',  # May use other attributes
you have to try
   user_lastname_attrib='cn:2',  # May use other attributes you
have to try
   server='SERVER_DNS',
   user_mail_attrib='mail',
   # userPrincipalName #mail #proxyAddresses:1
   # username_attrib='sAMAccountName',
   base_dn='dc=DOMAIN,dc=COM/NET/ORG/ETC',  # Depend of AD
config
   logging_level='error',
   db=db)]

I think your main issue is not having bind username and bind password...
You need a AD user that can accees the same base dn then the users to
authenticate...

Richard

On Mon, Jun 26, 2017 at 1:32 PM, Francisco García 
wrote:

> Hello all,
>
> I have the following configuration to validate users with windows Active
> directory:
>
>
> auth.define_tables(username=False, signature=False)
> auth.settings.create_user_groups = False
>
> auth.settings.actions_disabled=['register','change_
> password','request_reset_password','retrieve_username','profile']
> auth.settings.remember_me_form = False
>
> auth.settings.login_methods.append(ldap_auth(mode='ad',
>  server= server_ldap,
>  base_dn='OU=_delegat,DC=
> domain,DC=net'
> ))
>
> auth.settings.login_methods = [ldap_auth, auth]
>
>
> With this configuration, Active directory server doesn't validate users.
> And whatever email and password access, creates the new user, if it
> doesn't exist, and grant access to application.
>
> Do you know what could be the problem?.
> Any help is appreciated.  Thank you.
>
> Best regards,
> Francisco.
>
> --
> 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: New plugin to integrate with SparkPost

2017-06-26 Thread anitadesmukh101
Greetings Mr. Camara,

In your github post, no-re...@example.com I am assuming the sparkmail email 
address of the sender, should be no-reply-exam...@sparkmail.com?

Anyway you know how to populate custom email address based on username? 
e.g.,  us...@sparkmail.com, us...@sparkmail.com, ...so that each user has 
his own inbox?

mail = SparkMail(api_key='YOUR_API_KEY_HERE', sender='no-re...@example.com')



On Saturday, June 24, 2017 at 2:52:00 PM UTC-4, Leonel Câmara wrote:
>
> I've seen a lot of people having trouble integrating with sparkpost, I 
> actually want to start using it too, so I made a plugin:
> https://github.com/leonelcamara/web2py_sparkpost
>
> Enjoy!
>

-- 
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: Auth.signature not updating update_on

2017-06-26 Thread Anthony
auth.signature includes a modified_on field, not an update_on field.

Also, if you update a record by making changes to the row object and then 
calling row.update_record() (with no arguments), it will update the record 
with all the existing values (so modified_on will not be changed).

Anthony

On Monday, June 26, 2017 at 1:21:43 PM UTC-4, Ramos wrote:
>
> Hi,
>
> my table 
> db.define_table(
> 'entities',
> Field('uuid',length=64,default=lambda:str(uuid.uuid4())),
> Field('entity',required=True,label=T("Entity")),
> Field('description',label=T("Description"),default=""),
> Field('status', db.status),
> Field('type','reference dbentities',label=T("Type")),
> # Field('workflow','reference workflows',label="Workflow"),
> Field('event'),
> Field("last_error",default=""),
> Field('readers','list:string',default=[""]),
> auth.signature,
>  format='%(entity)s',
> )
> the field *update_on* is not being updated  when i update a record via 
> code.
>
> if i update a record via appadmin it does also not update *update_on* 
> field
>
> Help :)
>
> thank you
>

-- 
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] Active Directory (ldap) authntication problem

2017-06-26 Thread Francisco García
Hello all,

I have the following configuration to validate users with windows Active 
directory:


auth.define_tables(username=False, signature=False)
auth.settings.create_user_groups = False

auth.settings.actions_disabled=['register','change_password','request_reset_password','retrieve_username','profile']
auth.settings.remember_me_form = False

auth.settings.login_methods.append(ldap_auth(mode='ad',
 server= server_ldap,

 base_dn='OU=_delegat,DC=domain,DC=net'
))

auth.settings.login_methods = [ldap_auth, auth]


With this configuration, Active directory server doesn't validate users.
And whatever email and password access, creates the new user, if it doesn't 
exist, and grant access to application.

Do you know what could be the problem?.
Any help is appreciated.  Thank you.

Best regards,
Francisco.

-- 
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] Auth.signature not updating update_on

2017-06-26 Thread António Ramos
Hi,

my table
db.define_table(
'entities',
Field('uuid',length=64,default=lambda:str(uuid.uuid4())),
Field('entity',required=True,label=T("Entity")),
Field('description',label=T("Description"),default=""),
Field('status', db.status),
Field('type','reference dbentities',label=T("Type")),
# Field('workflow','reference workflows',label="Workflow"),
Field('event'),
Field("last_error",default=""),
Field('readers','list:string',default=[""]),
auth.signature,
 format='%(entity)s',
)
the field *update_on* is not being updated  when i update a record via code.

if i update a record via appadmin it does also not update *update_on* field

Help :)

thank you

-- 
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: Future of web2py

2017-06-26 Thread Anthony
On Monday, June 26, 2017 at 11:59:22 AM UTC-4, Richard wrote:
>
> I notice web2py is reported latency... What is causing this latency, js 
> not minify?? Ca we improve it?
>

Latency is just roughly the inverse of the total requests served (i.e., 
lower latency means more requests served). In this case, no JS is served -- 
it's just a single HTML page. The latency is due to (a) the time it takes 
to execute the DB query, an (b) the time it takes for the framework code to 
run and produced the output. We can only improve it by making the framework 
code faster.

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: Future of web2py

2017-06-26 Thread António Ramos
I just got curious about Lapis

2017-06-26 16:59 GMT+01:00 Richard Vézina :

> I notice web2py is reported latency... What is causing this latency, js
> not minify?? Ca we improve it?
>
> On Mon, Jun 26, 2017 at 11:50 AM, Anthony  wrote:
>
>> On Monday, June 26, 2017 at 11:12:17 AM UTC-4, Ron Chatterjee wrote:
>>>
>>> And If I have to guess the fastest framework is not in python.
>>>
>>
>> You don't have to guess -- all the data are at
>> https://www.techempower.com/benchmarks/#section=data-r14=
>> ph=fortune=6=6 (that link includes only full stack frameworks
>> using a full ORM). Actually, if you don't want to code in Java or C++,
>> Python has some top contenders.
>>
>> 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.
>

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


Re: [web2py] Re: web2py 2.15.1

2017-06-26 Thread Anthony
On Monday, June 26, 2017 at 12:04:37 PM UTC-4, Richard wrote:
>
> http://web2py.com/books/default/chapter/29/07/forms-and-validators#IS_DATE
>
> I don't know if we enforce that this formatting respect any python 
> standard...
>
> I can give a try if we can pass flatpickr parameters without issue... 
>

The point is, there is no reason that IS_DATE must use the same formatting 
strings as Flatpickr. For example, just do the following:

Field('mydate', 'date', requires=IS_DATE(format=T('%Y-%m-%d'))

and in web2py_ajax.html (and similarly in web2py.js):

var w2p_ajax_date_format = "{{=T('Y-m-d')}}";

w2p_ajax_date_format gets passed to Flatpickr. In that case, Flatpickr will 
generate dates that are in the format expected by IS_DATE(). But there is 
no reason that w2p_ajax_date_format must itself be a Python date formatting 
string -- it can simply using the Flatpickr formatting.

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: web2py 2.15.1

2017-06-26 Thread Richard Vézina
http://web2py.com/books/default/chapter/29/07/forms-and-validators#IS_DATE

I don't know if we enforce that this formatting respect any python
standard...

I can give a try if we can pass flatpickr parameters without issue...

Richard

On Mon, Jun 26, 2017 at 11:57 AM, Anthony  wrote:

> On Monday, June 26, 2017 at 10:42:33 AM UTC-4, Richard wrote:
>>
>> We could certainly do that... Things would happen in web2py.js thought,
>> or we bringing out flatpickr from there... But it wouldn't work properly
>> passing parameters time/date/datetime from validators IS_TIME(), IS_DATE(),
>> etc. So we will get complaints saying that it doesn't work specifying date
>> format from validator as before...
>>
>
> Where does the web2py framework code pass parameters from the IS_TIME()
> and IS_DATE() validators to the Javascript date and time picker widgets?
>
> Note, we just have to specify the Flatpickr options so that the submitted
> value is in the correct format -- we don't actually have to use Python
> datetime formatting to achieve that. For example, if the IS_DATE()
> validator expects something in -MM-DD format, then just set up
> Flatpickr to return values in that format (using whatever formatting
> options the Flatpickr API requires to do so).
>
> 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.


Re: [web2py] Re: Future of web2py

2017-06-26 Thread Richard Vézina
I notice web2py is reported latency... What is causing this latency, js not
minify?? Ca we improve it?

On Mon, Jun 26, 2017 at 11:50 AM, Anthony  wrote:

> On Monday, June 26, 2017 at 11:12:17 AM UTC-4, Ron Chatterjee wrote:
>>
>> And If I have to guess the fastest framework is not in python.
>>
>
> You don't have to guess -- all the data are at
> https://www.techempower.com/benchmarks/#section=data-r14;
> hw=ph=fortune=6=6 (that link includes only full stack frameworks
> using a full ORM). Actually, if you don't want to code in Java or C++,
> Python has some top contenders.
>
> 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.


Re: [web2py] Re: web2py 2.15.1

2017-06-26 Thread Anthony
On Monday, June 26, 2017 at 10:42:33 AM UTC-4, Richard wrote:
>
> We could certainly do that... Things would happen in web2py.js thought, or 
> we bringing out flatpickr from there... But it wouldn't work properly 
> passing parameters time/date/datetime from validators IS_TIME(), IS_DATE(), 
> etc. So we will get complaints saying that it doesn't work specifying date 
> format from validator as before...
>

Where does the web2py framework code pass parameters from the IS_TIME() and 
IS_DATE() validators to the Javascript date and time picker widgets?

Note, we just have to specify the Flatpickr options so that the submitted 
value is in the correct format -- we don't actually have to use Python 
datetime formatting to achieve that. For example, if the IS_DATE() 
validator expects something in -MM-DD format, then just set up 
Flatpickr to return values in that format (using whatever formatting 
options the Flatpickr API requires to do so).

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: Future of web2py

2017-06-26 Thread Anthony
On Monday, June 26, 2017 at 11:12:17 AM UTC-4, Ron Chatterjee wrote:
>
> And If I have to guess the fastest framework is not in python.
>

You don't have to guess -- all the data are at 
https://www.techempower.com/benchmarks/#section=data-r14=ph=fortune=6=6
 
(that link includes only full stack frameworks using a full ORM). Actually, 
if you don't want to code in Java or C++, Python has some top contenders.

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: Future of web2py

2017-06-26 Thread Ron Chatterjee
And If I have to guess the fastest framework is not in python. 

On Monday, June 26, 2017 at 10:19:45 AM UTC-4, Anthony wrote:
>
> On Saturday, June 24, 2017 at 11:55:13 AM UTC-4, Ben Lawrence wrote:
>>
>> Thanks Massimo for outlining your plan. Would you be able to outline the 
>> goal?
>>
>> I think web2py's goal is a framework that is easy to start and program, 
>> and great for teaching purposes. Great for hobbyists, students and small 
>> company websites with up to 1000 clicks per day or so. Am I wrong?
>>
>> Can you outline the goal for web3py? (e.g. framework for websites in 
>> production with 100,000s clicks per day? or a framework for teaching client 
>> side web design? I don't know...)
>>
>
> Although web2py certainly isn't the fastest framework around*, *its 
> limits (on a single server) are not likely to be anywhere near as low as 
> 1000 clicks (pages) or even 100,000 per *day*. For example, in the latest 
> round of the TechEmpower Framework Benchmarks 
> ,
>  
> web2py served 5,886 pages in the Fortunes test in *15 seconds* (which 
> translates to nearly *34 million pages per day*). web2py is one of the 
> slower Python frameworks, but still within a factor of two compared with 
> Django and Flask, and a factor of four compared with the fastest frameworks.
>
> 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: web2py 2.15.1

2017-06-26 Thread Richard Vézina
We could certainly do that... Things would happen in web2py.js thought, or
we bringing out flatpickr from there... But it wouldn't work properly
passing parameters time/date/datetime from validators IS_TIME(), IS_DATE(),
etc. So we will get complaints saying that it doesn't work specifying date
format from validator as before...

I would have make sure that python datetime format plugin would support
most of the regular date time formating (not all) and we can just point
people to improve the plugin if their formating is not cover... Writing a
2-3 use case plugin in the first place wouldn't be that long...

We can craft a built massage telling people to improve the plugin when
their usecase is not cover... So we can implement default web2py date time
formating only to pick up flatpickr rapidly...

I am not that good in javascript though, so I leave that to others...

Richard


On Mon, Jun 26, 2017 at 10:33 AM, Anthony  wrote:

> I'm not sure it would really have to support Python date formatting.
> Couldn't we just specify the appropriate default formats in
> web2py_ajax.html
> 
> and then point users to the Flatpickr documentation if they want to use
> alternative formats (they'll need the Flatpickr documentation anyway to
> make other types of customizations)?
>
> Anthony
>
>
> On Monday, June 26, 2017 at 10:16:05 AM UTC-4, Richard wrote:
>>
>> To integrate flatpickr a flatpickr plugin should be write to support
>> python date time string formating : http://strftime.org/
>>
>> That what have been suggested by flatpickr devs :
>> https://github.com/chmln/flatpickr/issues/886
>>
>> I try to integrate flatpickr here and it get muddy along the road as I
>> learn flatpickr API for datetime formating which is javascript compliant if
>> compliant to anything at all... Code here : https://github.com/Buhtigith
>> uB/web2py/tree/improve/replace-calendar-time-picker-by-flatpicker
>>
>> It works, but you have to support all kinds of datetime string formatting
>> for which you will have a lot of logic to write... This logic should be
>> write once as a flatpickr plugin to me...
>>
>> Calendar may be ogly but by accepting python switches :
>> http://www.dynarch.com/jscal/#printDate
>>
>> It made it a really good fit...
>>
>> I don't really have time to work on a flatpickr plugin...
>>
>> Richard
>>
>> On Fri, Jun 23, 2017 at 10:36 AM, Oasis Agano 
>> wrote:
>>
>>> i think this guy is working on the flatpickr datepicker but could use
>>> some help
>>>
>>> https://github.com/web2py/web2py/issues/1646
>>>
>>>
>>> On Monday, June 5, 2017 at 10:39:11 AM UTC+2, Karoly Kantor wrote:

 Dear Massimo,

 I saw your question in the developers group where I cannot post,
 therefore i do it here.

 I am currently aware of the following issues to be fixed:

 1. Google 2nd generation SQL is definitely a problem. Please note I
 made a temporary hack to fix it, described here:
 https://groups.google.com/forum/?fromgroups=#!topic/web2py/vs39zZpaH7g

 2. We have a long overdue issue with the password reset emails not
 sending on GAE. I am using a temporary dirty workaround that sends a plain
 text new password, search for the issue about "lazyT object being passed to
 GAE".

 3. I am having trouble making the date picker work nicely across all
 browsers, especially where there is a native solution. Microsoft Edge is
 the worst case. In general, would be good to have a nicer date picker

 4. General comment: We have "batteries included", however, some of
 those batteries now have newer versions than included, e.g. bootstrap




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

Re: [web2py] Re: web2py 2.15.1

2017-06-26 Thread Anthony
I'm not sure it would really have to support Python date formatting. 
Couldn't we just specify the appropriate default formats in web2py_ajax.html 

 
and then point users to the Flatpickr documentation if they want to use 
alternative formats (they'll need the Flatpickr documentation anyway to 
make other types of customizations)?

Anthony

On Monday, June 26, 2017 at 10:16:05 AM UTC-4, Richard wrote:
>
> To integrate flatpickr a flatpickr plugin should be write to support 
> python date time string formating : http://strftime.org/
>
> That what have been suggested by flatpickr devs :
> https://github.com/chmln/flatpickr/issues/886
>
> I try to integrate flatpickr here and it get muddy along the road as I 
> learn flatpickr API for datetime formating which is javascript compliant if 
> compliant to anything at all... Code here : 
> https://github.com/BuhtigithuB/web2py/tree/improve/replace-calendar-time-picker-by-flatpicker
>
> It works, but you have to support all kinds of datetime string formatting 
> for which you will have a lot of logic to write... This logic should be 
> write once as a flatpickr plugin to me...
>
> Calendar may be ogly but by accepting python switches : 
> http://www.dynarch.com/jscal/#printDate
>
> It made it a really good fit...
>
> I don't really have time to work on a flatpickr plugin...
>
> Richard
>
> On Fri, Jun 23, 2017 at 10:36 AM, Oasis Agano  
> wrote:
>
>> i think this guy is working on the flatpickr datepicker but could use 
>> some help
>>
>> https://github.com/web2py/web2py/issues/1646
>>
>>
>> On Monday, June 5, 2017 at 10:39:11 AM UTC+2, Karoly Kantor wrote:
>>>
>>> Dear Massimo,
>>>
>>> I saw your question in the developers group where I cannot post, 
>>> therefore i do it here.
>>>
>>> I am currently aware of the following issues to be fixed:
>>>
>>> 1. Google 2nd generation SQL is definitely a problem. Please note I made 
>>> a temporary hack to fix it, described here: 
>>> https://groups.google.com/forum/?fromgroups=#!topic/web2py/vs39zZpaH7g
>>>
>>> 2. We have a long overdue issue with the password reset emails not 
>>> sending on GAE. I am using a temporary dirty workaround that sends a plain 
>>> text new password, search for the issue about "lazyT object being passed to 
>>> GAE".
>>>
>>> 3. I am having trouble making the date picker work nicely across all 
>>> browsers, especially where there is a native solution. Microsoft Edge is 
>>> the worst case. In general, would be good to have a nicer date picker
>>>
>>> 4. General comment: We have "batteries included", however, some of those 
>>> batteries now have newer versions than included, e.g. bootstrap
>>>
>>>
>>>
>>>
>>> -- 
>> 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: Future of web2py

2017-06-26 Thread Anthony
On Saturday, June 24, 2017 at 11:55:13 AM UTC-4, Ben Lawrence wrote:
>
> Thanks Massimo for outlining your plan. Would you be able to outline the 
> goal?
>
> I think web2py's goal is a framework that is easy to start and program, 
> and great for teaching purposes. Great for hobbyists, students and small 
> company websites with up to 1000 clicks per day or so. Am I wrong?
>
> Can you outline the goal for web3py? (e.g. framework for websites in 
> production with 100,000s clicks per day? or a framework for teaching client 
> side web design? I don't know...)
>

Although web2py certainly isn't the fastest framework around*, *its limits 
(on a single server) are not likely to be anywhere near as low as 1000 
clicks (pages) or even 100,000 per *day*. For example, in the latest round 
of the TechEmpower Framework Benchmarks 
,
 
web2py served 5,886 pages in the Fortunes test in *15 seconds* (which 
translates to nearly *34 million pages per day*). web2py is one of the 
slower Python frameworks, but still within a factor of two compared with 
Django and Flask, and a factor of four compared with the fastest frameworks.

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: web2py 2.15.1

2017-06-26 Thread Richard Vézina
To integrate flatpickr a flatpickr plugin should be write to support python
date time string formating : http://strftime.org/

That what have been suggested by flatpickr devs :
https://github.com/chmln/flatpickr/issues/886

I try to integrate flatpickr here and it get muddy along the road as I
learn flatpickr API for datetime formating which is javascript compliant if
compliant to anything at all... Code here :
https://github.com/BuhtigithuB/web2py/tree/improve/replace-calendar-time-picker-by-flatpicker

It works, but you have to support all kinds of datetime string formatting
for which you will have a lot of logic to write... This logic should be
write once as a flatpickr plugin to me...

Calendar may be ogly but by accepting python switches :
http://www.dynarch.com/jscal/#printDate

It made it a really good fit...

I don't really have time to work on a flatpickr plugin...

Richard

On Fri, Jun 23, 2017 at 10:36 AM, Oasis Agano  wrote:

> i think this guy is working on the flatpickr datepicker but could use some
> help
>
> https://github.com/web2py/web2py/issues/1646
>
>
> On Monday, June 5, 2017 at 10:39:11 AM UTC+2, Karoly Kantor wrote:
>>
>> Dear Massimo,
>>
>> I saw your question in the developers group where I cannot post,
>> therefore i do it here.
>>
>> I am currently aware of the following issues to be fixed:
>>
>> 1. Google 2nd generation SQL is definitely a problem. Please note I made
>> a temporary hack to fix it, described here: https://groups.google.co
>> m/forum/?fromgroups=#!topic/web2py/vs39zZpaH7g
>>
>> 2. We have a long overdue issue with the password reset emails not
>> sending on GAE. I am using a temporary dirty workaround that sends a plain
>> text new password, search for the issue about "lazyT object being passed to
>> GAE".
>>
>> 3. I am having trouble making the date picker work nicely across all
>> browsers, especially where there is a native solution. Microsoft Edge is
>> the worst case. In general, would be good to have a nicer date picker
>>
>> 4. General comment: We have "batteries included", however, some of those
>> batteries now have newer versions than included, e.g. bootstrap
>>
>>
>>
>>
>> --
> 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: How to use FORM, INPUT to create a field with dropdown list?

2017-06-26 Thread Anthony
You do not need to use FORM() and INPUT() helpers just because you need to 
construct some custom markup for the form. Instead, use SQLFORM as usual 
and use the form.custom.widget widgets it generates to compose your form, 
as described here: 
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Custom-forms.
 
You can use those widgets either in the view within custom HTML (as shown 
in the book), or inside the FORM() helper if you really prefer that method.

You can also generate just the SELECT widget as follows:

SQLFORM.widgets.options.widget(db.quotation.customer, quote_row.customer)

Anthony

On Thursday, June 22, 2017 at 6:34:54 AM UTC-4, Rudy wrote:
>
> Hi there,
>
> Due to the javascript reason, i need to create a form using FORM and INPUT 
> helper. I wonder how I can create a form using these helpers with field 
> displaying a dropdown list for selection (of customer from quotation form)? 
> Below is a simplified version, currently i created autocomplete to display 
> a list of customer names matched the input text while user is typing. 
> Thanks in advance!
>
> db.define_table('customer',
> Field('customer_name', requires=[IS_NOT_EMPTY()]),
> format='%(customer_name)s')
> db.define_table('quotation',
> Field('customer', 'reference customer'),
> Field('project_name', requires=IS_NOT_EMPTY()),
> Field('total', 'double', default=0),
> auth.signature)
>
> quote_row = db.quotation(id)
> quotation_form = FORM(
> 'Quotation id:', INPUT(_type='number', _name='id', _value=
> quote_row.id, _id='quotation_id', _readonly='True', 
> requires=IS_NOT_EMPTY()),BR(),
>
> #'Customer Name:', INPUT(_type='number', _name='customer', 
> _value=quote_row.customer, _id='quotation_customer', requires=IS_IN_DB(db, '
> customer.id', '%(customer_name)s')),BR(),  DIV(_style="position: 
> absolute;", _id="suggestions", _class="suggestions"), BR(),
> 'Customer Name:', INPUT(_type='text', _name='customer', 
> _value=db.customer(quote_row.customer).customer_name, 
> _id='quotation_customer', requires=IS_IN_DB(db, 'customer.id', 
> '%(customer_name)s')),BR(), DIV(_style="position: absolute;", 
> _id="suggestions", _class="suggestions"), BR(),
>
> 'Project Name:', INPUT(_type='text', _name='project_name', 
> _value=quote_row.project_name, _id='quotation_project_name'),BR(),
> 'Total:', INPUT(_type='number', _step='0.01', 
> _name='total', _value=quote_row.total, _id='quotation_total', 
> _readonly='True'),BR(),
> INPUT(_type='submit'))
>

-- 
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: vue.js

2017-06-26 Thread Anthony
Change:



To:



and add the following CSS rule:

[v-cloak] {
  display: none;
}

That will cause the div to remain hidden until after the Vue instance has 
finished compiling.

Anthony

On Monday, June 26, 2017 at 12:10:35 AM UTC-4, Ben Lawrence wrote:
>
> This thread might be a little old but here is a way where you do not have 
> to change web2py's delimiters, instead change Vue's delimiters. Problem is, 
> with V2, you got to put all the scripts up front or you will see the 
> strange delimiters as the page is loading. Here is main.html from that 
> scaffolding app using Vue V2
> {{extend 'layout.html'}}
> 
>   
> 
>   
> 
>   
> 
> ${ answer }
> 
>   
> 
>   ${doc.title}
>   ${doc.body}
> 
>   
> 
>   
> 
>
> {{block bottomjs}}
> {{=ASSIGNJS(BASE='/'+request.application+'/')}}
> https://unpkg.com/vue";>
> https://unpkg.com/lodash@4.13.1/lodash.min.js";>
> 
>
> docsGET = function(url, data) {
> return jQuery.getJSON(url, data).fail(self.on_error);
> };
>
> var mainVM = new Vue({
>   el: '#vue',
>   delimiters: ['${', '}'],
>   data: {
> answer: 'Results',
> page: '',/* page name */
> state: {},  /* global page state */
> keywords: '',   /* example: search field */
> docs: []/* example search response */
>   },
>   watch: {
> // whenever keywords change, this function will run
> keywords: function (newKeywords) {
>   this.answer = 'Waiting ...'
>   this.getAnswer()
> }
>   },
>   methods: {
> // _.debounce is a function provided by lodash to limit how
> // often a particularly expensive operation can be run.
> // In this case, we want to limit how often we access
> // the search, waiting until the user has completely
> // finished typing before making the ajax request. To learn
> // more about the _.debounce function (and its cousin
> // _.throttle), visit: https://lodash.com/docs#debounce
> getAnswer: _.debounce(
>   function () {
> if (this.keywords.length < 3) {
>   this.answer = 'Type more characters...'
>   return
> }
> this.answer = 'Thinking...'
> var vm = this
> docsGET(BASE+'default/search',{q: 
> vm.keywords}).done(function(docs){vm.docs=docs; vm.answer = "Results:"});
>   },
>   // This is the number of milliseconds we wait for the
>   // user to stop typing.
>   500
> )
>   }
> })
> 
> {{end}}
>
>
> On Sunday, February 26, 2017 at 1:54:24 AM UTC-8, St. Pirsch wrote:
>>
>> Hi John,
>> Thanks! it works! Strange though that the untouched scaffolding app seems 
>> to work for some people and for others not.
>> Best,
>> Stephan
>>
>> Am Dienstag, 31. Januar 2017 17:50:14 UTC+1 schrieb John Philip:
>>>
>>> Hi Stephan,
>>>
>>> I tried the brutal approach. I changed the delimiters for web2py on the 
>>> model and changed all of the views accordingly. I left the delimiters for 
>>> vuejs as default ('{{' '}}')
>>>
>>> regards,
>>>
>>> John
>>>
>>> On Monday, January 30, 2017 at 10:24:25 AM UTC+1, St. Pirsch wrote:

 Hello John,
 Would you mind sharing your solution? 
 Thx,
 Stephan
>>>
>>>

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


Re: [web2py] Re: web2py_component does not work with https...

2017-06-26 Thread António Ramos
Upgraded jquery to latest... working now...
Also i´m not using jquery shipped with web2py
I am using the latest from google CDN
Will i have problems with  this ?

Regards

2017-06-22 15:33 GMT+01:00 Anthony :

> Not sure how this would be related to things working over http vs. https,
> but:
>
> typeof jQuery !== strundefined
>
> should be:
>
> typeof jQuery != 'undefined'
>
> Are you checking http vs. https in two different browsers, where the https
> browser has the above Javascript code cached, but the http browser does not?
>
> Anthony
>
>
>
> On Thursday, June 22, 2017 at 6:01:09 AM UTC-4, Ramos wrote:
>>
>> I think i know why no console errors nor admin tickets
>>
>> this is the last line that is executed and comes from jquery
>>
>> [image: Imagem inline 1]
>>
>> after this line i get
>>
>> [image: Imagem inline 2]
>>
>> any ideas ?
>>
>>
>> 2017-06-21 19:17 GMT+01:00 Leonel Câmara :
>>
>>> Can visit your website using https, then open a browser console go to
>>> the network tab, and show me what appears there when you click the button?
>>>
>>> --
>>> 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: FPDF "ne commence pas par '%PDF-' "

2017-06-26 Thread J-Michel Angers
SUPER !
With thiw, it works exactly as I wish.
 => A message appears "Do you want to open/save/saveAs ?", and after the 
choice "Open", I see my PDF in the "Acrobat" tool.
Thank you very much for this advice :-) :-)

Le lundi 26 juin 2017 07:12:49 UTC+2, Peter a écrit :

>
> Have been outputting pdfs for a while and this is what works for me ...
>   
> note, I don't close the pdfpdf.close? but this allows the user to 
> either open or save the file anywhere on their machine (Linux and Windows)
>
> 
> 
> s_io = pdf.output(dest='S')
> response.headers['Content-Type']='application/pdf'
> response.headers['Content-Disposition'] = 'attachment; filename="%s"' 
> % invc_filename
> raise HTTP(200, s_io, **response.headers)
>
>>
>>
>>

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