[web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-11 Thread Anthony
As I mentioned, you cannot leave your call_print function as it is -- it must be written like a typical web2py action. If your view includes an {{=i}} variable, then your function must return a dictionary with "i" as one of its keys. Hard to say what's wrong without seeing the current version o

Re: [web2py] Re: Uploading multiple images in web2py

2016-07-11 Thread Michele Comitini
@fabio using dropzone.js helps, it can upload in parallel many files using the same SQLFORM, so it is not uploading in a single POST call, but many in parallel: one for each uploaded file. The best way to do it is to write a specific action that handles just the file upload, independently from the

Re: [web2py] Case sensitivity in PostgreSQL Table and Field names

2016-07-11 Thread Michele Comitini
Try using rname and/or quoting http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#rname--Record-representation http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Database-quoting-and-case-settings--entity_quoting--ignore_field- 2016-07-11 17:05

[web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-11 Thread Chetan Jain
Hi Anthony, Still i'm not very clear about usage. i created call_print.load - i : {{=i}} - call_print.html contains- -- {{=LOAD('default','call_print.load',ajax=True,timeout=2*60,

[web2py] Re: DAl connection through a mysql socket

2016-07-11 Thread Paulo
Massimo Di Pierro writes: > > > Good catch!On Tuesday, 30 October 2012 18:50:31 UTC-5, pbreit wrote: > Apparently this works: > db = DAL('mysql://localhost/web2py', driver_args={'unix_socket':'/opt/local/var/run/mysql51/mysqld.sock'}) > > > On Tuesday, October 30, 2012 11:10:16 AM UTC-7, Jul

Re: [web2py] Re: URL based internationalization and pattern router

2016-07-11 Thread Ron Chatterjee
Alternatively you can also look at this: http://www.web2pyref.com/example/routespy-url-rewrite-with-pattern-based-system-used-by-web2pyref-snippet-1 On Monday, July 11, 2016 at 12:19:18 PM UTC-4, Anthony wrote: > > Alternatively, you can see if the parameter-based rewrite system will suit > yo

Re: [web2py] Re: URL based internationalization and pattern router

2016-07-11 Thread Anthony
Alternatively, you can see if the parameter-based rewrite system will suit your needs, as it includes built-in support for language in the URL. Or you can track the user's chosen language via a cookie rather than the URL (doesn't help with bookmarking, though). Anthony On Monday, July 11, 2016

Re: [web2py] Re: URL based internationalization and pattern router

2016-07-11 Thread Anthony
On Monday, July 11, 2016 at 11:46:54 AM UTC-4, Carlos Cesar Caballero wrote: > > And he can't?? wait, I am lost. > > I need from some url like that: > > www.mysite.com/lang/ > or > www.mysite.com/lang/blog > or > www.mysite.com/lang/category > > to get 'lang' > and do something like: > var = get_l

Re: [web2py] Re: URL based internationalization and pattern router

2016-07-11 Thread Carlos Cesar Caballero Díaz
And he can't?? wait, I am lost. I need from some url like that: www.mysite.com/lang/ or www.mysite.com/lang/blog or www.mysite.com/lang/category to get 'lang' and do something like: var = get_lang() and late do: T.force(var) But how can I get lang? PD: i can't even make the pattern-bassed rou

[web2py] Re: web2py traceback is not clear to tell the error

2016-07-11 Thread 黄祥
yes, you have a nice trick on your code, thanks so much massimo e.g. # -*- coding: utf-8 -*- # index def index(): filename = os.path.join(request.folder, 'databases', 'idx_tables.index') if not os.path.exists(filename): # create index : auth_user db.executesql('CREATE INDEX idx_auth_user ON auth_u

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-07-11 Thread Anthony
The built-in flash mechanism involves the following: 1. Setting response.flash in the server-side code. 2. Insertion of {{=response.flash}} somewhere in the view. 3. Embedding {{=response.flash}} in a div with class "flash". 4. CSS rules defining how the "flash" class is displayed (def

[web2py] Case sensitivity in PostgreSQL Table and Field names

2016-07-11 Thread David Orme
Hello, I've got an application with a PostgreSQL backend that shares a small subset of tables with another application. At the moment, I have Web2Py defining all the tables and the expectation is that the other application just read information from the tables (and does what it likes with any

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-07-11 Thread rajjmatthur
On that note, how do we customize the flash? For example, lets say we want a much larger and brighter flash with css rule (brighter color), or have to display as soon as user log in on the center of the screen as an advertisement? On Monday, July 11, 2016 at 4:49:08 AM UTC-4, Massimiliano wrote

Re: [web2py] Re: save the original value of one field in another field

2016-07-11 Thread Andrew Ziem
Anthony, The _before_insert works perfectly. Thank you. Andrew On Sun, Jul 10, 2016 at 9:53 PM, Anthony wrote: > Here's a potentially better option that will work even in appadmin and > doesn't require an extra callback if you need to do an insert followed by an > update in the same request: >

Re: [web2py] Re: URL based internationalization and pattern router

2016-07-11 Thread Anthony
On Monday, July 11, 2016 at 8:55:52 AM UTC-4, Carlos Cesar Caballero wrote: > > Thanks Anthony, I'll work in that, in my opinion the router is a very > important feature. > Note, I think the grid would preserve a URL var, and you could explicitly configure it to preserve a URL arg as well. I su

[web2py] Re: How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-11 Thread Anthony
If you want to update some content on a web page every 30 minutes, the easiest approach is to use Ajax -- set a timer and make the Ajax call every 30 minutes. The easiest way to do that in web2py is via an Ajax component (see http://web2py.com/books/default/chapter/29/12/components-and-plugins#

[web2py] Re: web2py traceback is not clear to tell the error

2016-07-11 Thread 黄祥
thanks so much for the nice trick, create the file on web2py databases folder after execute 'CREATE INDEX' pardon, i think it's not efficient, pls imagine if there are a lot of tables, and execute the controllers/install.py to have a lot of conditional check for each file for each table that hav

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Marlysson Silva
Any thing ,you talk with me by the Google Talk , for no to pollute here with conversations and attempts. Em segunda-feira, 11 de julho de 2016 09:40:44 UTC-3, Jeff Riley escreveu: > > I have tried to get to the index page and I have gone to admin and then > the database tab so I can setup the

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Jeff Riley
Yes I do. I am not that advanced to be able to handle more than one lol. I will make that change. Thank you, Jeff Riley > On Jul 11, 2016, at 7:48 AM, Marlysson Silva wrote: > > You use just one model.py? > if yes, change this line: > > IS_DATETIME(format=("%m-%d-%Y %H:%H), timezone = pytz.ti

Re: [web2py] Re: Identifyng Relationship

2016-07-11 Thread Carlos Cesar Caballero Díaz
Thanks Anthony, I will try with the database (mysql) and see what happen... Greetings. El 08/07/16 a las 10:47, Anthony escribió: On Friday, July 8, 2016 at 8:39:01 AM UTC-4, Carlos Cesar Caballero wrote: Thanks Anthony for your time and answers, I will use another tool for this proje

[web2py] Re: web2py to generate html/xml/any file from template

2016-07-11 Thread Anthony
As requested here , please provide some more detail. On Monday, July 11, 2016 at 2:11:38 AM UTC-4, RS wrote: > > Hi Guys, > My first question he

[web2py] Re: How to implement token based restful api in web2py

2016-07-11 Thread Anthony
On Monday, July 11, 2016 at 8:43:13 AM UTC-4, Marlysson Silva wrote: > > Without to use DBAPI but still it would be possible to build API Rest with > web2py using @restful? > > Managering dal mannual > Please read the documentation suggested: http://web2py.com/books/default/chapter/29/10/service

[web2py] Re: update_or_insert and composite key

2016-07-11 Thread Anthony
If you submit an issue, be sure to submit it on the pydal repository, not the web2py framework repository. On Monday, July 11, 2016 at 9:02:02 AM UTC-4, Anthony wrote: > > As noted in the documentation >

[web2py] Re: update_or_insert and composite key

2016-07-11 Thread Anthony
As noted in the documentation , the .update_record method is not available on rows of keyed tables, so you will therefore also not be able to use the built-in .update_or_insert metho

Re: [web2py] Re: URL based internationalization and pattern router

2016-07-11 Thread Carlos Cesar Caballero Díaz
Thanks Anthony, I'll work in that, in my opinion the router is a very important feature. Greetings. El 07/07/16 a las 11:59, Anthony escribió: For incoming URLs, you could map the language to a URL arg or query string variable. For outgoing URLs, you could either set that same URL arg or var

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Marlysson Silva
You use just one model.py? if yes, change this line: IS_DATETIME(format=("%m-%d-%Y %H:%H), timezone = pytz.timezone(timezone_user) ) to IS_DATETIME(format=("%m-%d-%Y %H:%H), timezone = timezone(timezone_user) ) Em segunda-feira, 11 de julho de 2016 09:40:44 UTC-3, Jeff Riley escreveu: > > I h

[web2py] Re: web2py traceback is not clear to tell the error

2016-07-11 Thread Massimo Di Pierro
OK than you want something like: filename = os.path.join(request.folder, 'databases', 'idx_auth_user.index') if not os.path.exist(filename) db.executesql('CREATE INDEX idx_auth_user ON auth_user (id, first_name, last_name, email, username);') open(filename).write(da

[web2py] Re: How to implement token based restful api in web2py

2016-07-11 Thread Marlysson Silva
Without to use DBAPI but still it would be possible to build API Rest with web2py using @restful? Managering dal mannualy Em segunda-feira, 11 de julho de 2016 09:38:36 UTC-3, Massimo Di Pierro escreveu: > > This is what the manual has to say about it: > > > http://web2py.com/books/default

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Jeff Riley
I have tried to get to the index page and I have gone to admin and then the database tab so I can setup the authorized user. Both give me the same error Thank you, Jeff Riley > On Jul 11, 2016, at 7:38 AM, Marlysson Silva wrote: > > Might put on github , but dont I can access them now > > I w

[web2py] Re: Anyone ever done a braintree integration with web2py?

2016-07-11 Thread Massimo Di Pierro
https://github.com/web2py/web2py/blob/master/gluon/contrib/stripe.py On Monday, 11 July 2016 01:11:38 UTC-5, Jeff Lipkowitz wrote: > > No, but I wonder how you would do an integration for payment. > > On Friday, 30 May 2014 03:19:20 UTC-5, Mark Graves wrote: >> >> Hey everyone, >> >> Using braint

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Marlysson Silva
Might put on github , but dont I can access them now I will analyse your code by here , by while. Later I will access github. In error page, which file show the error? Em segunda-feira, 11 de julho de 2016 09:31:04 UTC-3, Jeff Riley escreveu: > > Let me attach the new code or are you able to se

[web2py] Re: How to implement token based restful api in web2py

2016-07-11 Thread Massimo Di Pierro
This is what the manual has to say about it: http://web2py.com/books/default/chapter/29/10/services?search=restful#Restful-Web-Services If you are willing to try something more beading edge: http://experts4solutions.com/collection2/default/examples The latter is experimental, requires

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Marlysson Silva
Might put on github , but dont I can access them now I will analyse your code by here , by while. Later I will access github. In error page, which file show the error? Em segunda-feira, 11 de julho de 2016 09:31:04 UTC-3, Jeff Riley escreveu: > > Let me attach the new code or are you able to se

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Jeff Riley
here is the new db.py, default.py, and index.html since that is the opening page. On Monday, July 11, 2016 at 7:31:04 AM UTC-5, Jeff Riley wrote: > > Let me attach the new code or are you able to see the git hub. If so I > will push to that. > > Thank you, > Jeff Riley > > On Jul 11, 2016, at 7:

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Jeff Riley
Let me attach the new code or are you able to see the git hub. If so I will push to that. Thank you, Jeff Riley > On Jul 11, 2016, at 7:29 AM, Marlysson Silva wrote: > > I think that I know where are missing pytz.. you put library in controller > define_timezone() .. > > Em segunda-feira, 11

[web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Marlysson Silva
I think that I know where are missing pytz.. you put library in controller define_timezone() .. Em segunda-feira, 11 de julho de 2016 09:19:21 UTC-3, Jeff Riley escreveu: > > Hello Marlysson. I am getting the following error. I have removed the > module pytx_timezone, and I have verified that

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Jeff Riley
The plugin Thank you, Jeff Riley > On Jul 11, 2016, at 7:25 AM, Marlysson Silva wrote: > > Hm, in which file? > > You removed the pytz library or a plugin that already was in your code > previously? > > > 2016-07-11 9:19 GMT-03:00 Jeff Riley : >> Hello Marlysson. I am getting the following

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Marlysson Silva
Hm, in which file? You removed the pytz library or a plugin that already was in your code previously? 2016-07-11 9:19 GMT-03:00 Jeff Riley : > Hello Marlysson. I am getting the following error. I have removed the > module pytx_timezone, and I have verified that I have pip installed pytz. > No

[web2py] Re: Pythonanywhere Timezone

2016-07-11 Thread Jeff Riley
Hello Marlysson. I am getting the following error. I have removed the module pytx_timezone, and I have verified that I have pip installed pytz. Not sure what else to dheck. No module named pytz On Sunday, July 10, 2016 at 4:39:30 PM UTC-5, Marlysson Silva wrote: > > You try to make this: >

[web2py] Re: web2py traceback is not clear to tell the error

2016-07-11 Thread 黄祥
thanks all, that can do, but CREATE INDEX IF NOT EXISTS, it's not work in mysql (pls correct me if i'm wrong), so i use the universal code that can cover all of it, of course i think i can create conditional for check for the database connection base on environment. in my environment are - devel

Re: [web2py] Re: Support graph database pyDAL.

2016-07-11 Thread Marlysson Silva
Ok,great idea, same the thought about no-sql databases it schemaless, while relational databases have thought in tables? Just a doubt. 2016-07-11 3:03 GMT-03:00 Massimo Di Pierro : > No planning to at this time. They are too specific to be work the SQL like > syntax of dal. > Frankly I am more i

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-07-11 Thread Massimiliano
Hi Jim, I’m doing it in this way: Edit static/web2py.js search for /*helper for flash messages*/ and add this command: setTimeout(‘jQuery(".flash").fadeOut("slow")',5000); just after: if (flash.html()) flash.append(' × ').slideDown(); Adjust 5000 that stands for 5 secods to your needs. On T

Re: [web2py] web2py to generate html/xml/any file from template

2016-07-11 Thread Kiran Subbaraman
The documentation has this: "|response.render(view, vars)|: a method used to call the view explicitly inside the controller. |view| is an optional parameter which is the name of the view file, |vars| is a dictionary of named values passed to the view." .. http://web2py.com/books/default/chapte

[web2py] Re: Uploading multiple images in web2py

2016-07-11 Thread Fabio Ceccarani
Thanks Massimo. Il giorno lunedì 11 luglio 2016 08:06:01 UTC+2, Massimo Di Pierro ha scritto: > > At this time there is not. > > On Friday, 8 July 2016 17:42:35 UTC-5, Fabio Ceccarani wrote: >> >> Thanks Ron. >> Thanks Massimo, I have 6 upload fields (img01, img02,...img06); there is >> way to u

Re: [web2py] database updation error

2016-07-11 Thread Kiran Subbaraman
Are you inserting values into the database from within the python / ipython console? If so, perform a db.commit() after the update. If you are inserting values into the db, while running within the web application, then it will be good to see the code that you use to do this. The db.commit() is

Re: [web2py] How install pillow in web2by - Window xp

2016-07-11 Thread Kiran Subbaraman
Did you download the "For Windows" version of web2py? It comes with its own copy of python. I suggest you download the 'src' version of web2py (http://www.web2py.com/examples/static/web2py_src.zip). And then install pillow (via pip). This should make pillow available within your web2py applicat

Re: [web2py] How active and 'professional' is web2py?

2016-07-11 Thread Kiran Subbaraman
Active, based on 'activity' - based on code contribution and forums activity, you can see that for yourself. Check the github sites (https://github.com/web2py/web2py, and https://github.com/web2py/pydal), and also the forum postings. The code commits, issues being addressed are all recent ones.