[web2py] shareable web2py pages on linkedin

2020-03-20 Thread Marco Prosperi
hello, if I share www.mysite.com/mypage, linkedin accepts it (can show a preview) but if there is another level as in www.mysite.com/blog/my-new_article then it refuses. It seems that this doesn't happen if I try to share links with more levels in the url from wordpress websites. Do you know

[web2py] Re: tracking file downloads on database

2013-08-26 Thread Marco Prosperi
opening a new page was an hypothetical workaround response.stream() is perfect, thank you Marco On Friday, August 23, 2013 2:30:36 PM UTC+2, Niphlod wrote: On Friday, August 23, 2013 10:49:07 AM UTC+2, Marco Prosperi wrote: hello, I would like to track the number of user download of some

[web2py] tracking file downloads on database

2013-08-23 Thread Marco Prosperi
hello, I would like to track the number of user download of some files on database. The approach I've thought about is: - when the user clicks on the filename link in the first view, myapp redirects to a new page (a controller is called which register on the database the new click) with 'your

[web2py] Re: ajax() infinite loop

2013-08-02 Thread Marco Prosperi
, not to a piece of the page ... let me understand: you have a page with a total that needs to be refreshed via ajax after having submitted with ajax the add or the sub function ? On Friday, August 2, 2013 12:45:17 AM UTC+2, Marco Prosperi wrote: It was the first thing I tried, using the same view

[web2py] Re: ajax() infinite loop

2013-08-02 Thread Marco Prosperi
that your best shot is to put response.js ='jQuery('#910').slideToggle();ajax({{=URL(r=request,c='downld',f='order_reload')}},[],'910');jQuery('#910').slideToggle();' in the add and sub functions. On Friday, August 2, 2013 10:07:13 AM UTC+2, Marco Prosperi wrote: I've started from

[web2py] ajax() infinite loop

2013-08-01 Thread Marco Prosperi
hello, I would like to update the total in the view below (bottom of the message) when the user changes quantity. The following script works fine (fixed value) script jQuery(document).ready(function(){ $(document).ajaxStop(function(){ jQuery('#910').slideToggle();

[web2py] Re: ajax() infinite loop

2013-08-01 Thread Marco Prosperi
to happen) ? On Thursday, August 1, 2013 7:25:10 PM UTC+2, Marco Prosperi wrote: hello, I would like to update the total in the view below (bottom of the message) when the user changes quantity. The following script works fine (fixed value) script jQuery(document).ready(function

[web2py] newsletter use case

2012-09-04 Thread Marco Prosperi
hello, I would like to manage a newsletter from my web2py application. I'm already able to send html mails from it but I have 2 questions: - it's better to store my contacts in auth_user or in dedicated table? If I use auth_user I would have all the features to let access to some parts of my

[web2py] Re: register form and service conditions acceptance

2012-08-08 Thread Marco Prosperi
('accept_privacy','boolean',default=False,label=DIV('click me!', _onclick='jQuery(#%s).fadeIn(); return false' % request.cid))] Marco On Tuesday, August 7, 2012 5:05:04 PM UTC+2, Marco Prosperi wrote: Maybe show what you tried. I would think you could make either the field label or comment

[web2py] Re: register form and service conditions acceptance

2012-08-08 Thread Marco Prosperi
thank you for pointing that out. In this form it works (I've forced id=999 for PluginMModal in user.html) _onclick=jQuery('#999').fadeIn(); return false' On Wednesday, August 8, 2012 2:00:10 PM UTC+2, Anthony wrote: auth.settings.extra_fields['auth_user']= [

[web2py] Re: register form and service conditions acceptance

2012-08-07 Thread Marco Prosperi
Maybe show what you tried. I would think you could make either the field label or comment (the comment appears after the input field) a link, and trigger the modal dialog with an onclick attribute or a jQuery event handler. Anthony ok, in models/db.py I have put (but the link in

[web2py] register form and service conditions acceptance

2012-08-06 Thread Marco Prosperi
hi all, I would like to customize the register form so that an additional field would appear (a boolean) to let the new user accept the service conditions. I've tried to add the new extra field with auth.settings.extra_fields[] and it works. But the problem is how to present to the user the

[web2py] Re: long text as content for PluginMModal

2012-06-28 Thread Marco Prosperi
the first issue is solved by your suggestion, thank you. For the second I still have problems: I've created my application using 'welcome' application as template. So I have meta charset=utf-8 / in layout.html and @charset UTF-8; in base.css. The strange thing is that if I run the

[web2py] Re: long text as content for PluginMModal

2012-06-28 Thread Marco Prosperi
If I open the main page of my web2py application with web2py running on my pc then accented characters are shown correctly but if I open the main page of the copy of my application installed on webfaction server I see mis-rendered accented characters (in both cases I use the same Firefox

[web2py] long text as content for PluginMModal

2012-06-27 Thread Marco Prosperi
hi all, I'm putting a long text in a PluginMModal content but I face 2 problems: - carriage returns of the text are not respected (also if I put some \n in the string) - characters with accents (it is an Italian string) are not shown correctly which are the solutions? thanks in advance Marco

[web2py] long text in PluginMModal content

2012-06-27 Thread Marco Prosperi
hi all, I'm trying to put a long string as content of a PluginMModal but I face 2 problems: - carriage returns in the string are not rendered (even if I put some \n in the string) - characters with accents (it is an Italian text) are not shown correctly how can I solve these? thanks in

[web2py] label_separator on SQLFORM.factory

2012-06-25 Thread Marco Prosperi
hi all, I've put: crud.settings.label_separator = '' in db.py to avoid ':' in forms but it seems that this is not read by a SQLFORM.factory form. Is there any way to circumvent this? thanks in advance, Marco --

[web2py] how to limit a label width in a form?

2012-06-22 Thread Marco Prosperi
hi all, I would like to limit the width of a SQLFORM label so that the text appears on more lines if it is too long. I've tried to put label {max-width:200px;} in base.css but without effect. Any suggestion? thanks in advance, Marco --

[web2py] require login on submit

2012-05-16 Thread Marco Prosperi
hi all, what could be a clean way to require login (if not already logged in) when a user clicks on the submit button of a form? thanks in advance for advice Marco

[web2py] change the size of a text field in a form

2012-05-16 Thread Marco Prosperi
hello, how can I change the default size of a 'text' field in a form? (at first appearance, not dragging the corner) thanks Marco

[web2py] issue with list of validators

2010-11-07 Thread Marco Prosperi
hi all, still have problems with validators. Why a field defined so in db.py .. Field('myfield','string',requires=[IS_NOT_EMPTY(error_message=T('my custom message')),IS_IN_LIST(['first','second'])]), .. doesn't show a drop down list in a SQLFORM but shows 'my custom message' after submit if left

[web2py] Re: issue with list of validators

2010-11-07 Thread Marco Prosperi
be just requires=IS_IN_LIST(['first','second']) if you require the value to be in a list, it cannot be empty. This will give you the dropdown. On Nov 7, 9:31 am, Marco Prosperi marcoprosperi...@gmail.com wrote: hi all, still have problems with validators. Why a field defined so in db.py

[web2py] Re: bug on IS_NOT_EMPTY(..)?

2010-11-02 Thread Marco Prosperi
here is the db.py file (it's a work-in-progress), the default.py (it's a welcome app modification) and the movqta.html. Look to default/movqta url Marco # db.define_table('movtempi_mast', Field('IDStaffatura','string'), Field('fase','string'), Field('data_inizio','datetime'),

[web2py] bug on IS_NOT_EMPTY(..)?

2010-10-30 Thread Marco Prosperi
hi all, With web2py 1.88.* if you define something like .. Field('myfield','string',requires=IS_NOT_EMPTY(error_message=T('my message')), .. you don't get 'my message' after submitting an empty a SQLFORM (yes, I use if form.accepts...) but the default message. With older versions of web2py there

[web2py] bug on IS_NOT_EMPTY(..)?

2010-10-30 Thread Marco Prosperi
hi all, With web2py 1.88.* if you define something like .. Field('myfield','string',requires=IS_NOT_EMPTY(error_message=T('my message')), .. you don't get 'my message' after submitting an empty a SQLFORM (yes, I use if form.accepts...) but the default message. With older versions of web2py there

[web2py] Re: bug or backward incompatibility for datetime fields

2010-10-24 Thread Marco Prosperi
I use Firefox 3.6.3 on a Vista machine and Strumenti/Opzioni/Contenuti/ Lingue has [it_it] as first choice. Web2py 1.87.3 complains about the dates' format while web2py 1.67.0 on the same machine works correctly On 24 Ott, 01:48, Michele Comitini michele.comit...@gmail.com wrote:

[web2py] Re: bug or backward incompatibility for datetime fields

2010-10-24 Thread Marco Prosperi
Sorry, I mistyped: there is [it-it] and not [it_it] in my Firefox On 24 Ott, 22:14, mdipierro mdipie...@cs.depaul.edu wrote:

[web2py] Re: bug or backward incompatibility for datetime fields

2010-10-23 Thread Marco Prosperi
Still doesn't work: I get an exception and, moreover, the popping up calendar widget is in English and not in Italian (October instead of Ottobre) Marco

[web2py] bug or backward incompatibility for datetime fields

2010-10-22 Thread Marco Prosperi
hi all, on my Italian localized Windows PC I have a problem with datetime form fields. Putting this code in db.py (you can modify the welcome application): db.define_table('testata', Field('campoa','string'), Field('descr','string'), Field('dt','datetime')) db.define_table('righe',

[web2py:37342] tooltips on crud forms

2009-12-16 Thread Marco Prosperi
hi all, I would like to add tooltips to field labels or to controls in a crud form to show the name of the underlying database field. I've seen some thread about tooltips in the past but not coming to a clear end (and maybe in the meantime something has been added to web2py to manage this easily

[web2py:35428] crud forms and layout

2009-11-16 Thread Marco Prosperi
hi all, I would like to use the crud forms (for their simplicity) for a table with a lot of fields. The problem is that the standard layout positions fields one above the other leaving the right half of my screen empty (a waste of room) and the submit button very far from the top of the page for

[web2py:23676] how to prevent deletion of referenced records

2009-06-09 Thread Marco Prosperi
hi all, is there a validator or an easy way to prevent a user to delete a record if there are other records referencing it? Just to make an example: consider the 'images' application in cookbook2.pdf. I would like that the user cannot delete an image if there are comments referred to it (it would

[web2py:19726] how to detect connected users?

2009-04-14 Thread Marco Prosperi
hi all, how can I verify if there are users currently connected to my web2py application? I just want to know if there is at least one. The evolution of this question could be: how could I notify my app's users that I will stop the application for maintenance? thanks for hints, Marco

[web2py:18854] problems with i18

2009-03-31 Thread Marco Prosperi
hello everybody, I've created a little web2py application to manage customers and contacts in my company. I've put the application on a server and I've discovered some problems with rispect to i18n: for some PC over the network some dates and strings appear with *** in front of them but not if I

[web2py:18510] Re: problems with a query

2009-03-24 Thread Marco Prosperi
=˜db.allineamento_erp.data_allineamento) str(result) On Mon, Mar 23, 2009 at 4:29 PM, Marco Prosperi marcoprosperi...@gmail.comwrote: thanks for the time you spent on my question but I don't have any linebreak in my code after 'select'. It appears in my post after copying the error message from web2py and pasting

[web2py:18511] about buttons

2009-03-24 Thread Marco Prosperi
hi all, I would like to put a button in one of my pages so that when the users clicks it, a computation on the database get started. I don't know the syntax I have to use. Probably something like: button onclick=!!what_am_I_supposed_to_put_here?!!click me/button any hint? Or maybe there is a

[web2py:18519] Re: about buttons

2009-03-24 Thread Marco Prosperi
is this the wrong syntax? Marco On 24 Mar, 10:12, Yarko Tymciurak yark...@gmail.com wrote: On Tue, Mar 24, 2009 at 3:17 AM, Marco Prosperi marcoprosperi...@gmail.comwrote: hi all, I would like to put a button in one of my pages so that when the users clicks it, a computation on the database get

[web2py:18530] Re: about buttons

2009-03-24 Thread Marco Prosperi
just a little change to make it work: button onclick=window.location = ' {{=URL (r=request,f='add_records')}} ' Crea attività/button On 24 Mar, 13:05, Michal Jursa mic...@jursa.cz wrote: Yes, coz it cannot be called like this. The problem is not in web2py but in your page. You have to use

[web2py:18544] Re: problems with a query

2009-03-24 Thread Marco Prosperi
No.. I'll read the manual of the notebook On 24 Mar, 15:32, mdipierro mdipie...@cs.depaul.edu wrote: [alt]126[release alt] should do the trick. no? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web

[web2py:18486] problems with a query

2009-03-23 Thread Marco Prosperi
hi all, I would like to make a query to fetch records in reverse order. The manual says to use ˜ by I get this error (everything works if a eliminate ˜). On web2py (maybe not after pasting the message in googlegroups) the arrow indicating the problems point to ˜. Am I missing something or is a

[web2py:18497] Re: problems with a query

2009-03-23 Thread Marco Prosperi
, Marco Prosperi wrote: hi all, I would like to make a query to fetch records in reverse order. The manual says to use ˜ by I get this error (everything works if a eliminate ˜). On web2py (maybe not after pasting the message in googlegroups) the arrow indicating the problems point

[web2py:18292] auto check for web2py upgrades

2009-03-18 Thread Marco Prosperi
hello, how to prevent web2py from auto check for upgrades? is there any flag/ parameter to set somewhere? thanks, Marco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this

[web2py:18080] automatically set user on record created/modified

2009-03-15 Thread Marco Prosperi
hello ML, in the readme file of the web2py source distribution I've found examples to automatically timestamp when a record is created or modified, but how to stamp the user id that created or modified the record? Is there a simple way to do this as for the timestamp? thanks in advance for hints

[web2py:17874] tab separated csv file

2009-03-11 Thread Marco Prosperi
hello everybody, how can I change the following function (defined in appadmin.py controller) so that the downloaded file has tab separated values instead of comma separated? Or do I have to change some settings somewhere? thanks in advance, Marco def csv(): import gluon.contenttype

[web2py:12706] only capital letters in string fields

2008-12-01 Thread Marco Prosperi
hello everybody, my web2py application will interchange data with an ERP system. On this system all the fields of type string contain only capital letters. It would be nice for me if the values of type string inserted in a web2py form could be directly converted in capital letters. How to manage

[web2py:12443] populating web2py database

2008-11-24 Thread Marco Prosperi
hello everybody, I would like to populate the sqlite database of a web2py application by means of a python script. This script would read data from a file or another relational database and insert records in the web2py database (using pyodbc library and sqlite odbc driver for windows). My

[web2py:11955] IS_IN_SET() usage

2008-11-17 Thread marco prosperi
hello everybody, I would like to do something similar to db.activity.activitytype.requires=[IS_NOT_EMPTY(),IS_IN_SET([ x for x in db().select(db.activitytypes.code)] )] to let the user be able to choose between values defined in another table (activitytypes), not in a mymodel.py file (I will