[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2016-02-26 Thread Gael Princivalle
Il giorno domenica 15 febbraio 2015 23:21:36 UTC+1, Massimo Di Pierro ha scritto: > > We need to update the list of companies that provide web2py consulting. > This list is obsolete: > > http://web2py.com/init/default/support > > Some links are broke. Most pages do not even mention web2py. Some

[web2py] Re: Compute return only the last result

2016-02-26 Thread Gael Princivalle
Hi Dave. Yes it is. Now it works, thanks a lot for your help. Il giorno venerdì 26 febbraio 2016 08:52:16 UTC+1, Dave S ha scritto: > > > > On Thursday, February 25, 2016 at 5:45:57 AM UTC-8, Gael Princivalle wrote: >> >> Hello all. >> >> I use this function f

[web2py] Compute return only the last result

2016-02-25 Thread Gael Princivalle
Hello all. I use this function for resizing images for full size and thumbnails: def SMARTHUMB(image, box, fit=True, name="thumb"): #Downsample the image. #@param img: Image - an Image-object #@param box: tuple(x, y) - the bounding box of the result image #@param fit: boolean - c

[web2py] Re: web2py is giving me wrong time when I am using request.now for datetime. How to get time a/c as GMT?

2016-01-14 Thread Gael Princivalle
Tuesday, 12 January 2016 08:16:43 UTC-6, Niphlod wrote: >> >> this is not threadsafe. use utc and translate dates when presented to >> users. >> >> On Tuesday, January 12, 2016 at 12:41:44 PM UTC+1, Gael Princivalle wrote: >>> >>> You c

[web2py] Re: web2py is giving me wrong time when I am using request.now for datetime. How to get time a/c as GMT?

2016-01-12 Thread Gael Princivalle
You can set your timezone like that in your model: import os os.environ['TZ'] = 'Europe/Rome' Il giorno lunedì 11 gennaio 2016 18:50:05 UTC+1, RAGHIB R ha scritto: > > Can we do it without any plugin? If yes, how? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - h

[web2py] Re: Less or Sass?

2015-12-29 Thread Gael Princivalle
. Il giorno giovedì 24 dicembre 2015 00:20:16 UTC+1, Gael Princivalle ha scritto: > > Hello. > > I've used only CSS for templates, without Less or Sass. > I'm planning to take this template that use Less: > https://wrapbootstrap.com/theme/the-project-multipurpose-template

[web2py] Less or Sass?

2015-12-23 Thread Gael Princivalle
Hello. I've used only CSS for templates, without Less or Sass. I'm planning to take this template that use Less: https://wrapbootstrap.com/theme/the-project-multipurpose-template-WB0F82581 Or this one that use Sass: https://wrapbootstrap.com/theme/assan-multi-purpose-8-themes-in-1-WB05F069P It see

[web2py] Re: Scheduler worker name

2015-12-21 Thread Gael Princivalle
works. Il giorno lunedì 21 dicembre 2015 09:35:20 UTC+1, Niphlod ha scritto: > > there's no way .table files are created but tables aren't ... please > triple check your settings > > On Sunday, December 20, 2015 at 9:28:39 PM UTC+1, Gael Princivalle wrote: >> >

[web2py] Re: Scheduler worker name

2015-12-20 Thread Gael Princivalle
the scheduler is istantiated, unless migrations are > turned off. > > On Friday, December 18, 2015 at 4:17:48 PM UTC+1, Gael Princivalle wrote: >> >> No I don't. >> >> But now I have: >> Dropped all tables in the database folder >> Delete all schedul

[web2py] Re: Scheduler worker name

2015-12-18 Thread Gael Princivalle
able files from the databases/ folder ? > > On Friday, December 18, 2015 at 12:47:38 PM UTC+1, Gael Princivalle wrote: >> >> >scheduler tables can be dropped manually >> Done >> >> >deleting scheduler.py also. >> Done >> >> >But I still don&

[web2py] Re: Scheduler worker name

2015-12-18 Thread Gael Princivalle
not exist LINE 1: SELECT count(*) FROM "scheduler_task" WHERE ("scheduler_task... Il giorno venerdì 18 dicembre 2015 11:58:15 UTC+1, Niphlod ha scritto: > > scheduler tables can be dropped manually > deleting scheduler.py also. > But I still don't think that i

[web2py] Re: Scheduler worker name

2015-12-18 Thread Gael Princivalle
>delete what ? the istantiation ? Delete the scheduler.py file from models and all scheduler tables. How can I do it? Il giorno venerdì 18 dicembre 2015 10:48:23 UTC+1, Niphlod ha scritto: > > > > On Friday, December 18, 2015 at 10:45:22 AM UTC+1, Gael Princivalle wrote: &

[web2py] Re: Scheduler worker name

2015-12-18 Thread Gael Princivalle
uler Ko When I delete the scheduler.py file from admin web2py creates it again. How can I delete the scheduler? Thanks, regards. Il giorno giovedì 17 dicembre 2015 21:40:36 UTC+1, Gael Princivalle ha scritto: > > Thanks Niphlod. > > >So, here it is the breakdown of the possible is

Re: [web2py] Re: 2.12.1 is out

2015-12-17 Thread Gael Princivalle
> Hard to say without more context, but looks like there is no >> phplist_user_user table defined on the db_phplist DAL object. >> >> Anthony >> >> >> On Thursday, December 17, 2015 at 3:18:34 PM UTC-5, Gael Princivalle >> wrote: >>&

[web2py] Re: Scheduler worker name

2015-12-17 Thread Gael Princivalle
ASSIGNED to it gets redistributed among live workers. This in > addition to the ticker redistributing tasks every once in a while if > they're ready to be executed but not executed yet (it can, and it does > happen, that a worker is busy processing a long-running task while there > a

[web2py] Re: 2.12.1 is out

2015-12-17 Thread Gael Princivalle
Hello. I was running this script without problems with 2.9.13: def add_phplist_user(f,id): auth_user = db.auth_user(id) #add user last_id = db_phplist.phplist_user_user.insert( email = auth_user.email, confirmed = auth_user.newsletter) phplist_listuser = db_phplis

[web2py] Scheduler worker name

2015-12-17 Thread Gael Princivalle
Hello to all. I've migrate my webfaction hosting to another webfaction hosting that run CentOS 7 (before it was a previous version of CentOS). I was running web2py 2.9.12, now I have web2py 2.12.3. I've got a strange problem with the scheduler. Workers are in the db, they run, they are assigned

[web2py] Re: Non authorized file download in custom grid view

2015-12-16 Thread Gael Princivalle
; > Anthony > > On Wednesday, December 16, 2015 at 8:06:21 AM UTC-5, Gael Princivalle > wrote: >> >> Hello all. >> >> I would like in a custom grid view to add a link to a pdf file like that: >> Download PDF >> >> Controller: >> grid

[web2py] Non authorized file download in custom grid view

2015-12-16 Thread Gael Princivalle
Hello all. I would like in a custom grid view to add a link to a pdf file like that: Download PDF Controller: grid_memos = SQLFORM.grid(query=db.memos) But when the user, also after login, click on the link, main grid is displayed and web2py return "Non authorized". Someone knows how I can aut

[web2py] Re: Grid back button for custom single view

2015-12-15 Thread Gael Princivalle
t be empty - that's where > request.env.http_referer > is probably updated and start to point to form1 instead of grid1. When i > click Back button now, I'm still on the form1 page. > Could You share some hints? > Cheers! > > > On Friday, 3 January 2014 12:56:47

[web2py] Re: Can web2py app be hosted on any other host other than pythonanywhere?

2015-12-14 Thread Gael Princivalle
Hi Raghib. I think what can do the difference between all these hostings is the support. I don't have a large experience but what I can say is that webfaction have a really good support, and the new base SSD plan have a low price and is fast. Regards. Il giorno lunedì 14 dicembre 2015 19:49:2

[web2py] Re: Sitemap Question

2015-12-14 Thread Gael Princivalle
oe ha scritto: > > Hi Gael, > > That's great! Thanks very much. > > I wonder how I can then create a URL like > http://www.mydomain.com/sitemap.txt instead of > http://www.mydomain.com/init/default/sitemap.txt > > > On Tuesday, October 20, 2015 at 5:30:03 PM

[web2py] Re: Embed pdf and file download

2015-12-09 Thread Gael Princivalle
I think the best solution is to use the actual version of pdf.js, that offer more functions to the user (zoom...) and perhaps will avoid some incompatibilities. For example pdf files saved by the Windows 10 scan software are not read by the pdf.js version that have used Mark. -- Resources: - h

[web2py] Re: Retrieve record field labels in sqlform.grid custom view

2015-12-09 Thread Gael Princivalle
t; access all the usual attributes, such as grid.view_form.custom.label.code. > > Anthony > > On Sunday, November 29, 2015 at 12:52:30 PM UTC-5, Gael Princivalle wrote: >> >> Hello everybody. >> >> Is there a way in a sqlform.grid to ret

[web2py] Re: Embed pdf and file download

2015-12-09 Thread Gael Princivalle
Thanks a lot Leonel. I have integrated the pdf.js like Mark have done (thanks Mark). I've got some troubles also with pdf.js. With block center in the layout file pdf was not displayed. {{block center}} {{include}} {{end}} Without, pdf is displayed. We talk about a custom grid view. I've to

[web2py] Retrieve record field labels in sqlform.grid custom view

2015-11-29 Thread Gael Princivalle
Hello everybody. Is there a way in a sqlform.grid to retrieve record field labels in a custom view? Something like that: grid.view_form.record.code.label To retrieve: db.define_table('memos', Field('code', type='string', requires=IS_NOT_EMPTY(), label='*Codice*'), Thanks, regards. -- Reso

[web2py] Re: Embed pdf and file download

2015-11-28 Thread Gael Princivalle
Leonel, if you can send me a sample app it will be really useful, thanks a lot. Il giorno sabato 28 novembre 2015 19:58:28 UTC+1, Leonel Câmara ha scritto: > > Yes Gael I tried and that worked for me. I can provide a sample app if you > need. > -- Resources: - http://web2py.com - http://web2py

[web2py] Re: Embed pdf and file download

2015-11-28 Thread Gael Princivalle
Thanks Mark I'll try it. Il giorno sabato 28 novembre 2015 19:21:13 UTC+1, Mark Graves ha scritto: > > I would personally use pdf.js. > > Does that meet your needs? > -Mark > > On Thursday, November 26, 2015 at 3:01:50 PM UTC-6, Gael Princivalle wrote: >> >>

[web2py] Re: Embed pdf and file download

2015-11-26 Thread Gael Princivalle
Dear Leonel thanks a lot. I've tried also with stream without success. I've tried also in another website that display pdf files with absolute pdf path, to display a downloaded file without success. Have you already tried to embed a downloaded pdf file? Il giorno martedì 24 novembre 2015 16:

[web2py] Re: Embed pdf and file download

2015-11-23 Thread Gael Princivalle
Someone have an idea? Il giorno venerdì 20 novembre 2015 16:52:10 UTC+1, Gael Princivalle ha scritto: > > My doubt was also about the file name, that could give problems perhaps, > with all these dots. > But I've

[web2py] Re: Embed pdf and file download

2015-11-20 Thread Gael Princivalle
df file is downloaded from a record make fails something. Il giorno venerdì 20 novembre 2015 16:26:39 UTC+1, Gael Princivalle ha scritto: > > I've tried also with this plugin: > http://pdfobject.com/ > > without success. > > Il giorno venerdì 20 novembre 2015 10:31:27 U

[web2py] Re: Embed pdf and file download

2015-11-20 Thread Gael Princivalle
I've tried also with this plugin: http://pdfobject.com/ without success. Il giorno venerdì 20 novembre 2015 10:31:27 UTC+1, Gael Princivalle ha scritto: > > Hello all. > > I'm used to embed pdf files like that: > View: > http://www.domain1.com/pdf/file.pdf#toolbar=1

[web2py] Registration is pending approval translation

2015-11-20 Thread Gael Princivalle
Hello all. When a user try to login without the administrator registration approval, we2py send a flash message "Registration is pending approval". Is there a way to translate it? In language files it's not present. Thanks, regards. -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] String to query

2015-11-20 Thread Gael Princivalle
, Massimiliano > wrote: > >> If I’m not missing something you can you do: >> >> table = ‘memos’ >> field = ‘construction_site’ >> param1 = 1 >> param2 = 2 >> >> query = (db[table][field] == param1) >> query = query | (db[table][field] == param2)

[web2py] String to query

2015-11-20 Thread Gael Princivalle
Hello all. I need to build a query in a loop. Query is a string like: query = "db.memos.construction_site == 1" So query is a string and when I use it in a grid: grid_memos = SQLFORM.grid(query=query) It fails. 'str' object has no attribute '_db' How can I resolve it? Thanks, regards. -- Re

[web2py] Embed pdf and file download

2015-11-20 Thread Gael Princivalle
Hello all. I'm used to embed pdf files like that: View: http://www.domain1.com/pdf/file.pdf#toolbar=1&navpanes=0&scrollbar=1&page=1&view=FitH"; type="application/pdf" width="100%" height="100%"> Pdf file are uploaded by sftp. It works well. Now for another application files are uploa

[web2py] request.args and request.args[-3] == 'view':

2015-11-19 Thread Gael Princivalle
Hello all. With a grid I use a custom single record view. So in my view I have this test: if request.args and request.args[-3] == 'view': for displaying the custom single record view. But when I click on the add record button I have this error: list index out of range Is there a way to use a

[web2py] Re: Routes problem?

2015-11-11 Thread Gael Princivalle
Someone have an idea ? How can I resolve it? Il giorno martedì 10 novembre 2015 16:51:37 UTC+1, Gael Princivalle ha scritto: > > I don't know why but this button have never works in my both web2py > installations. I restart the server for reloading the routes.py file. And >

[web2py] Re: Routes problem?

2015-11-10 Thread Gael Princivalle
I don't know why but this button have never works in my both web2py installations. I restart the server for reloading the routes.py file. And yes I've done it. Il giorno martedì 10 novembre 2015 16:45:53 UTC+1, Bart van Berkel ha scritto: > > Dit you also press the button reload routes after th

[web2py] Routes problem?

2015-11-10 Thread Gael Princivalle
Hello all. All applications in the same web2py installation works fine. https://mydomain.com/myapp1 https://mydomain.com/myapp2 https://mydomain.com/myapp3 But now I don't know why all new apps goes on the welcome app. For app "myapp4" instead of https://mydomain.com/myapp4 I have: https://mydoma

[web2py] Storing the original filename using grid

2015-11-05 Thread Gael Princivalle
Hello all. Is it possible to store the original filename of an uploaded file in a table using grid for adding a record? The table: db.define_table('memos', Field('code', type='string'), Field('memo_file_name', type='string'), Field('memo_file', 'upload'), auth.signature) Thanks,

[web2py] Re: Session problem

2015-10-29 Thread Gael Princivalle
ed in the "cart" key. If you log > in, you should also see an "auth" key in the session, with the auth.user > details nested within it. > > Anthony > > On Thursday, October 29, 2015 at 9:50:38 AM UTC-4, Gael Princivalle wrote: >> >> Certainly I do

[web2py] Re: Session problem

2015-10-29 Thread Gael Princivalle
29 ottobre 2015 13:26:36 UTC+1, Anthony ha scritto: > > Have you confirmed that the session actually *is* empty (e.g., add > response.toolbar() to every page and check the content of the session on > every request)? > > On Thursday, October 29, 2015 at 7:54:14 AM UTC-4, Gael P

[web2py] Re: Session problem

2015-10-29 Thread Gael Princivalle
Well, thank you for your help. I cannot understand why you can't reproduce the problem. I've tried from Chrome and Firefox from Apple and Windows systems on 5 different computers, problem still the same. Yes I can see the session_id_mompala_negozio_bio_torino cookie, before and after trying to a

[web2py] Re: Session problem

2015-10-29 Thread Gael Princivalle
For login it's mario at email.com Il giorno giovedì 29 ottobre 2015 09:49:04 UTC+1, Gael Princivalle ha scritto: > > No, I'm not saying that the user needs to login. I'm just saying that user > login use session, and like all other functionalities that use session, i

[web2py] Re: Session problem

2015-10-29 Thread Gael Princivalle
gt; e.g. : user logs in, then clicks on the campaign, then the session is > checked for "cart items presence" , etc etc. > > > > On Thursday, October 29, 2015 at 9:20:07 AM UTC+1, Gael Princivalle wrote: >> >> Yes I can understand that it's unbelievable. >

Re: [web2py] Re: Session problem

2015-10-29 Thread Gael Princivalle
e.g. : user logs in, then clicks on the campaign, then the session is > checked for "cart items presence" , etc etc. > > > > On Thursday, October 29, 2015 at 9:20:07 AM UTC+1, Gael Princivalle wrote: >> >> Yes I can understand that it's unbelievable. >&g

[web2py] Re: Session problem

2015-10-29 Thread Gael Princivalle
Yes I can understand that it's unbelievable. If you want to experience it you can make me a favor. Website link to a product: http://www.mompala.it/prodotti?product_id=37 You can login: User: ma...@email.com Password: pofmario And it works. If you add this string after the URL: &utm_source=emai

[web2py] Re: Session problem

2015-10-29 Thread Gael Princivalle
; Is the session cookie getting passed back and forth? > > On Wednesday, October 28, 2015 at 4:29:47 PM UTC-4, Gael Princivalle wrote: >> >> I'm running 2.9.12. >> Anyway the problem is that I don't have any new session. All applications >> functions that use

[web2py] Re: Session problem

2015-10-28 Thread Gael Princivalle
a user logs in / logs out for security reasons ? > > On Wednesday, October 28, 2015 at 5:10:57 PM UTC+1, Gael Princivalle wrote: >> >> Hello all. >> >> I've got a strange problem with session. >> I use PHPlist for mailing. >> When the user cl

[web2py] Session problem

2015-10-28 Thread Gael Princivalle
Hello all. I've got a strange problem with session. I use PHPlist for mailing. When the user click on a link in a PHPlist mail the URL is URL + some variables like &utm_source=emailcampaign6&utm_medium=phpList&utm_content=HTMLemail&utm_campaign=Newsletter+dell%27Azienda+Agricola+Mompal%C3%A0+-+

[web2py] Re: Replace 'Log in' text in auth.navbar by 'User'

2015-10-21 Thread Gael Princivalle
>but this is an extremely unimportant and minor enhancement I agree with you, but it's also an extremely easy enhancement to apply. And I've saw a lot of users don't understanding why when they click on "Log in" the website don't display the login form, but a dropdown menu with the ultimate com

[web2py] Re: Running function after an auth db modification

2015-10-20 Thread Gael Princivalle
dy has the proper signature, there is no reason > to wrap it in a lambda. Also, your callbacks do not have to return an empty > dictionary (they are not controller actions). > > Anthony > > On Tuesday, October 20, 2015 at 9:19:20 AM UTC-4, Gael Princivalle wrote: >> >>

[web2py] Re: Running function after an auth db modification

2015-10-20 Thread Gael Princivalle
rtedì 20 ottobre 2015 11:53:42 UTC+2, Niphlod ha scritto: > > see the manual about database callbacks. > > > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#callbacks-on-record-insert--delete-and-update > > On Tuesday, October 20, 2015 at 11:49:02 AM

[web2py] Running function after an auth db modification

2015-10-20 Thread Gael Princivalle
Hello all. I would like to run a function everytime there is a modification in auth. something like: auth.settings.onchange = lambda: myfunction() Or only if a specific field change: auth.settings.myfield.onchange = lambda: myfunction() Is it possible? I need it for changing a field value in a

[web2py] Re: Sitemap Question

2015-10-20 Thread Gael Princivalle
Hello Joe. I use the Scheduler for that, for making every day a new updated sitemap. I use txt sitemaps because I've saw that if an XML sitemap is too long Google don't take care of it. In txt yes. Here is an example: def sitemap_txt_auto(): import os from gluon.myregex import regex_exp

[web2py] Re: Replace 'Log in' text in auth.navbar by 'User'

2015-10-20 Thread Gael Princivalle
Someone knows how I can do it? Il giorno martedì 13 ottobre 2015 16:27:41 UTC+2, Gael Princivalle ha scritto: > > Hello all. > > It seems that some users the first time they want to login expect that > it's just necessary click on the first level menu 'Log in'.

[web2py] Re: Insert/update user record in 2 db

2015-10-20 Thread Gael Princivalle
e, a DAL line is all you need. If you want to leverage fancy > syntax over an Abstraction (where the A in DAL comes from), you kinda > need to define the Abstraction. Which, boiled down, means defining table > models you want to interact with. > > > > On Tuesday, October 13, 201

[web2py] Replace 'Log in' text in auth.navbar by 'User'

2015-10-13 Thread Gael Princivalle
Hello all. It seems that some users the first time they want to login expect that it's just necessary click on the first level menu 'Log in'. But it's not like that, they have to look at the dropdown menu second level 'Log in' voice. How can I change the first level 'Log in' text by 'User' in a

[web2py] Insert/update user record in 2 db

2015-10-13 Thread Gael Princivalle
Hello all. In a web2py application I would like to insert/update user records in 2 db. The first one is the application db, a postgres db: db = DAL('postgres://user:pass@localhost:5432/my_web2py_app_db', check_reserved=['all'], pool_size=1, entity_quoting=True, bigint_id=True, migrate=True) Th

[web2py] Pack all by scheduler

2015-10-05 Thread Gael Princivalle
Hello. I would like to save an application in the scheduler doing it like a "Pack all". Is it possible? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Iss

[web2py] Re: Relation "table" does not exist

2015-09-14 Thread Gael Princivalle
Monday, September 14, 2015 at 6:56:54 AM UTC-4, Gael Princivalle wrote: >> >> Hello. >> >> I've already read about this message error anyway I don't reach to find >> the solution. >> >> Here here my db string: >> >> db = DAL(

Re: [web2py] Relation "table" does not exist

2015-09-14 Thread Gael Princivalle
http://itjp.net.b <http://itjp.net.br>r > *Ovidio Marinho Falcao Neto* > ovid...@gmail.com > Brasil > > > 2015-09-14 9:06 GMT-03:00 Gael Princivalle >: > >> Thanks Ovidio but the error still here also with mi

Re: [web2py] Relation "table" does not exist

2015-09-14 Thread Gael Princivalle
lcao Neto* > ovid...@gmail.com > Brasil > > > 2015-09-14 7:56 GMT-03:00 Gael Princivalle >: > >> Hello. >> >> I've already read about this message error anyway I don't reach to find >> the

[web2py] Relation "table" does not exist

2015-09-14 Thread Gael Princivalle
Hello. I've already read about this message error anyway I don't reach to find the solution. Here here my db string: db = DAL('postgres://user:pass@localhost:5432/my_db', check_reserved=['all'], pool_size=1, entity_quoting=True, bigint_id=True, migrate=True) In db.py I've add some tables wit

[web2py] Re: Many to many to many?

2015-08-23 Thread Gael Princivalle
e_codes.override_code== > db.override_code.id)) > > override_code = override[k].override_code.code1 > > > On Saturday, 22 August 2015 07:41:35 UTC-5, Gael Princivalle wrote: >> >> Hello. >> >> I've make a many to many to many relationship but I've go

[web2py] Many to many to many?

2015-08-22 Thread Gael Princivalle
Hello. I've make a many to many to many relationship but I've got problems on select results. Is it the correct way to do it? My DB: db.define_table('ceo_schemes', Field('name', type='string', requires=IS_NOT_EMPTY()), format='%(name)s') db.define_table('overrides'

[web2py] Re: Ajax callback with current select value

2015-08-17 Thread Gael Princivalle
Thank's a lot Val. Debugging is a pain. I use just '[name]' and now it works because... I've take off {{=BEAUTIFY(response._vars)}} from the view, that seems to have problems with ajax calls. Il giorno martedì 18 agosto 2015 07:07:02 UTC+2, Val K ha scritto: > > Hi, Gael! I think in ajax call mu

[web2py] Re: Ajax callback with current select value

2015-08-17 Thread Gael Princivalle
ans=DIV(_id='answer') > > return dict(sel1=sel1, sel2=sel2, ans=ans) > > > > After thought I've came to conclusion that In fact, there is no bug, but > just some hard to understand: JQuery treats '[name]' - as all *inputs* > which have a *n

[web2py] Re: Ajax callback with current select value

2015-08-12 Thread Gael Princivalle
;get_options_for_dropdown2')}}', ['any_name_1, any_name_2, ...' > ], 'dropdown2');"> > To get it in the controller: > get_options_for_dropdown2.vars.any_name_1 > > > > On Tuesday, August 11, 2015 at 6:43:59 PM UTC+3, Gael Princi

[web2py] Ajax callback with current select value

2015-08-11 Thread Gael Princivalle
Hello. I'm still making a form like in this post: https://groups.google.com/forum/#!searchin/web2py/jquery$20db/web2py/tvfncYsLrQs/MRHG5MWOMlAJ How is it possible to pass like a var the current select option value to the ajax call? With something like that? data: {value: $('#sel

Re: [web2py] Is it possible to translate data in SQLFORM.grid?

2015-07-30 Thread Gael Princivalle
b.cake) > > > On Thu, Jul 30, 2015 at 8:55 AM, Gael Princivalle > wrote: > >> Hello all. >> >> Is it possible to translate data in SQLFORM.grid? >> >> MODEL: >> db.define_table('fruits', >> Field(&#

[web2py] Is it possible to translate data in SQLFORM.grid?

2015-07-29 Thread Gael Princivalle
Hello all. Is it possible to translate data in SQLFORM.grid? MODEL: db.define_table('fruits', Field('name', type='string'), format='%(name)s') db.define_table('cake', Field('name', type='string'), Field('fruit', 'reference fruits',

[web2py] Header name in grid single record view

2015-07-29 Thread Gael Princivalle
Hello all. Is there a way to retrieve an header name in a grid single record view? I've tried with .header without success. {{if request.args and request.args[-3] == 'view':}} {{=P(grid.view_form.record.field_name.header)}}: {{=P(grid.view_form. record.field_name)}} {{else:}} {{=grid}} {{p

[web2py] Dynamic drop down menu

2015-07-02 Thread Gael Princivalle
Hello all. I've to set a dynamic drop down menu with 5 different fields. I would like to check which is today the best web2py way to do it. This plugin seems interesting: http://dev.s-cubism.com/plugin_lazy_options_widget Is there also an Ajax solution? Thanks, regards. -- Resources: - http:

[web2py] Re: Insert record in foreign DB

2015-05-28 Thread Gael Princivalle
Thanks Niphlod, it resolve the error. Il giorno lunedì 25 maggio 2015 17:40:08 UTC+2, Niphlod ha scritto: > > just define it with migrate=False and web2py won't issue any ddl statement. > > On Monday, May 25, 2015 at 2:21:21 PM UTC+2, Gael Princivalle wrote: >> >>

[web2py] Insert record in foreign DB

2015-05-25 Thread Gael Princivalle
Hello all. I use a PHP opensource application called PHPList for newsletter management. It use a Mysql db that we can call 'phplistdb'. User table is 'phplist_user_user'. I would like to add a user in 'phplistdb' from web2py. If I try something like that: def insert_phplist_user(): email = '

Re: [web2py] Re: 'exposes' and 'edit views' order in editor

2015-05-08 Thread Gael Princivalle
Well for my personal advice, alphabetic order is the universal way to organize informations. I use only view links, so for my personal use only views, but I think it's useful having also functions in alphabetic order. -- Gael Princivalle 2015-05-08 21:43 GMT+02:00 Ni

[web2py] Re: 'exposes' and 'edit views' order in editor

2015-05-08 Thread Gael Princivalle
Is it possible in new web2py versions to change it to alphabetical? Il giorno venerdì 8 maggio 2015 17:07:10 UTC+2, Niphlod ha scritto: > > the order comes from glob.glob() . from what I recalled, it returned > alphabetically sorted results. > Seems instead - checking the docs - that "The list i

[web2py] Re: 'exposes' and 'edit views' order in editor

2015-05-08 Thread Gael Princivalle
, prodotti, brands I have two web2py 2.9.12 installations, both with five applications, and the view order is the same. Il giorno venerdì 8 maggio 2015 15:08:57 UTC+2, Niphlod ha scritto: > > views are alphabetical. > > On Friday, May 8, 2015 at 2:49:47 PM UTC+2, Gael Princivalle wrote:

Re: [web2py] Re: 'exposes' and 'edit views' order in editor

2015-05-08 Thread Gael Princivalle
, prodotti, brands I have two web2py 2.9.12 installations, both with five applications, and the view order is the same. -- Gael Princivalle 2015-05-08 15:08 GMT+02:00 Niphlod : > views are alphabetical. > > > On Friday, May 8, 2015 at 2:49:47 PM UTC+2, Gael Princ

[web2py] Re: 'exposes' and 'edit views' order in editor

2015-05-08 Thread Gael Princivalle
e :P > > On Friday, May 8, 2015 at 10:07:50 AM UTC+2, Gael Princivalle wrote: >> >> Hello. >> >> When I open in the editor a controller, at the top controller functions >> are listed in 'exposes' and 'edit views'. >> I don't unde

[web2py] 'exposes' and 'edit views' order in editor

2015-05-08 Thread Gael Princivalle
Hello. When I open in the editor a controller, at the top controller functions are listed in 'exposes' and 'edit views'. I don't understand which is the order criteria for these lists. brands, user, news, index Is there a way to have these lists in an alphabetic order? brands, index, news, user

[web2py] Postgresql problems with 2 tabs

2015-05-07 Thread Gael Princivalle
Hello all. I've moved a db from sqlite to postgresql, but I've got a strange problem. With only one tab, ok. If I have two tabs with the same application, it seems that data's are mixed. For example in tab 1 I have a grid, in tab 2 a page. When I save from tab 1 grid I see some data's from tab 2.

[web2py] Re: Email auth settings

2015-04-28 Thread Gael Princivalle
.. form.vars.first_name ... > > Anthony > > On Monday, April 27, 2015 at 4:35:55 PM UTC-4, Gael Princivalle wrote: >> >> Thanks a lot Anthony. >> >> However I don't understand how using form.vars.field_name in >> auth.settings.register_onaccept. >&

[web2py] Re: Email auth settings

2015-04-27 Thread Gael Princivalle
e='First name of the new user: ' + form.vars.first_name + '') This give me an error, global name form is not defined. Il giorno lunedì 27 aprile 2015 01:23:02 UTC+2, Anthony ha scritto: > > On Sunday, April 26, 2015 at 4:07:40 PM UTC-4, Gael Princivalle wrote: >&g

[web2py] Email auth settings

2015-04-26 Thread Gael Princivalle
Hi all. I would like to customize emails that web2py send to the user for email verification and password change. For example now I have for email verification: Welcome myem...@mydomain.com! Click on the link http... to verify your email How can I do it? Another thing, how is it possible to hav

Re: [web2py] Thumbnails

2015-04-14 Thread Gael Princivalle
ers, PLEASE don't concatenate paths as strings and use a proper > os.path.join call > > On Tuesday, April 14, 2015 at 4:53:14 PM UTC+2, Gael Princivalle wrote: >> >> Hi. >> >> If I click on the file link I obtain: >> >> https://my_domain.com/

Re: [web2py] Thumbnails

2015-04-14 Thread Gael Princivalle
Hi. If I click on the file link I obtain: https://my_domain.com/my_app/appadmin/download/db/%5BErrno%202%5D%20No%20such%20file%20or%20directory:%20%27/home/my_folder/webapps/w2p_2_9_12_dev/web2py/applications/my_app/static/uploads/my_table.my_image.844c80079e794fbd.62726f777361626c655f636174616c6f

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-08 Thread Gael Princivalle
Thanks for jumping in - had missed the message. > > On 08/04/15 10:10, Johann Spies wrote: > > On 2 April 2015 at 13:00, Gael Princivalle > > <mailto:gaelpri...@gmail.com >> wrote: > > > > Using UUIDs make the db slower right? > > > &

[web2py] Best way to manage a cart

2015-04-06 Thread Gael Princivalle
Hello all. I've to make a cart. I would like to let the user add products to the cart without login. Login will be done at checkout. I would like to save all carts, so when a user will add the first product, I'll add a record in my cart table. I'm wondering about how can I manage the fact that I

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-02 Thread Gael Princivalle
Hi Philip. Using UUIDs make the db slower right? http://simononsoftware.com/how-to-store-uuids-in-postgresql/ And you can't store a record like that: my_record = db.my_table(1) Il giorno giovedì 2 aprile 2015 10:52:20 UTC+2, Philip Kilner ha scritto: > > Hi Mirek, > > On 02/04/15 09:35, Mirek Zv

Re: [web2py] Re: Cloning SQLlite into PostgreSQL

2015-04-02 Thread Gael Princivalle
Well it's always a shame to see that the answer was in the web2py book. So shame on me, and thanks to all. CSV all tables at once works perfectly. Il giorno giovedì 2 aprile 2015 08:39:42 UTC+2, Mirek Zvolský ha scritto: > > >> export the whole database to csv and import it through web2py, the >

[web2py] Re: Cloning SQLlite into PostgreSQL

2015-03-31 Thread Gael Princivalle
UTC+2, Willoughby ha scritto: > > Well it has a bunch of log statements, were all of those OK? > > On Tuesday, March 31, 2015 at 2:19:41 PM UTC-4, Gael Princivalle wrote: >> >> Thanks Ron but:with CSV export: >> auth_user_iduser >> 3

[web2py] Re: Cloning SQLlite into PostgreSQL

2015-03-31 Thread Gael Princivalle
e the csv > option. > > On Tuesday, March 31, 2015 at 4:11:18 AM UTC-4, Gael Princivalle wrote: >> >> Hello. >> >> Like a lot of users I need to clone an existing SQLlite db to new >> PostgreSQL db. >> I've read this post in web2py-developers by A

[web2py] Cloning SQLlite into PostgreSQL

2015-03-31 Thread Gael Princivalle
Hello. Like a lot of users I need to clone an existing SQLlite db to new PostgreSQL db. I've read this post in web2py-developers by Alan Etkin: https://groups.google.com/forum/#!searchin/web2py-developers/sqlite$20postgres/web2py-developers/QxeJNByj6qc/cpBHsa1ymUkJ However I've tried to use this

[web2py] Re: Cancel vars in request.vars

2015-03-26 Thread Gael Princivalle
Thanks Anthony. Il giorno mercoledì 25 marzo 2015 22:05:14 UTC+1, Anthony ha scritto: > > It works like a dictionary, so: > > del request.vars.mynewvar > > To clear all values: > > request.vars.clear() > > Anthony > > On Wednesday, March 25, 2015 at 4:58

[web2py] Cancel vars in request.vars

2015-03-25 Thread Gael Princivalle
Hello. I've found in google groups how I can add some vars to request.vars: request.vars.mynewvar = 'value' But how can I cancel all existing vars, or only one of these? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sourc

Re: [web2py] uwsgi question

2015-03-25 Thread Gael Princivalle
Hello Peter. I've got also a problem with scheduler/sqlite, "OperationalError: database is locked". Have you found a solution? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/i

[web2py] Re: Absolute URL for downloaded image

2015-03-23 Thread Gael Princivalle
>is the image is viewable on browser when you use that link? > http://server/myapp/admin/download/news.image_file.9b935275a22c6075.68333632362e6a7067.jpg Yes. So I just have to use that URL. Perfect, I was thinking that the alphanumeric code was not always the same depending of the session. Thank

<    1   2   3   4   >