Re: [web2py] Set up of db.py takes too long time

2013-01-15 Thread Paolo valleri
Try to add lazy_tables=True to DAL. Like: db = DAL('sqlite://storage.sqlite', migrate=False, lazy_tables=True) Paolo On Tuesday, January 15, 2013 10:06:03 AM UTC+1, Daniel Gonzalez wrote: > > No imports in the code-area profiled. Also, I am testing some requests, > but the time I am measuring i

[web2py] Re: Auth with migrate=False

2013-01-15 Thread Paolo valleri
orno martedì 15 gennaio 2013 11:07:49 UTC+1, Paolo valleri ha scritto: >> >> Hi all, I tried something odd. >> I pulled a fresh copy of my code from git and I connected the app to an >> already 'working' database. 'working' in the meaning that both tables

Re: [web2py] Re: Auth with migrate=False

2013-01-15 Thread Paolo valleri
x27; ), auth.signature, on_define = lambda table: [ table.route_id.set_attributes(readable = False, writable = False), ] ) Paolo On Tuesday, January 15, 2013 3:10:32 PM UTC+1, Anthony wrote: > > Good point. Even better, use lazy_tables. You should also compile the app. >

[web2py] auth.wiki menu

2013-01-15 Thread Paolo valleri
Hi all, I started using the wiki. I created my pages, and I edited the wiki-menu page as I like. Now I want to have response.menu populated with the wiki pages too in every page I have, is there a way to populate it calling somehow auth.wiki or I have to do that by hand, updating each time men

[web2py] Re: How "experimental" is postgis?

2013-01-17 Thread Paolo valleri
Hi, I've tried few examples in last weeks. Gis support is getting better, I don't think is far from being stable but right now I don't have the possibility to say it is stable, i.e., a few functions are available only for postgis (i.e., st_x, st_y). Moreover the errors I found have been fixed,

[web2py] Re: How do you change memcache session expiry?

2013-01-18 Thread Paolo valleri
Hi all, I have just tried the solution proposed on the issue but it doen't work. This is a really annoying bug not only because I have to login several times in a day but also because I can lose my edits if I don't save my changes in time (i.e, editing a wiki page). It might be better to remove

[web2py] problems with wiki create

2013-01-20 Thread Paolo valleri
Hi all, I've just updated web2py to trunk and it seems that wiki _create is broken. I got this ticket: Traceback (most recent call last): File "/home/paolo/Dropbox/git/web2py/gluon/restricted.py", line 212, in restricted exec ccode in environment File "/home/paolo/Dropbox/git/web2py/app

[web2py] Re: SQLFORM.factory and uploaded files. where is the link?

2013-01-23 Thread Paolo valleri
add upload=URL('default', 'download') should solve the problem. Paolo On Thursday, January 24, 2013 12:11:33 AM UTC+1, Ramos wrote: > > Hello > I dont know how to show the link to the uploaded files using > SQLFORM.factory > > > my code > > > form=SQLFORM.factory(db.trabalhador,db.t_docs, >

[web2py] auth.wiki how to format all fields

2013-01-25 Thread Paolo valleri
Dear all, I've just came across the fact that with the following code: def wiki(): return auth.wiki(render='html') and visiting something like app/controller/wiki/about in the view I will get only the 'content' field without any other useful wiki's field such as Title, modified_on just to name

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-25 Thread Paolo valleri
I am using memcached for caching cache.ram and cache.disk, the configuration is really easy, this is mine: if not request.is_local: from gluon.contrib.memcache import MemcacheClient memcache_servers = ['127.0.0.1:11211'] cache.memcache = MemcacheClient(request, memcache_servers) ca

[web2py] Re: auth.wiki how to format all fields

2013-01-27 Thread Paolo valleri
to keep track of that, I have opened an issue http://code.google.com/p/web2py/issues/detail?id=1303 On Friday, January 25, 2013 3:32:55 PM UTC+1, Paolo valleri wrote: > > Dear all, I've just came across the fact that with the following code: > def wiki(): > return auth.

[web2py] Re: auth.wiki how to format all fields

2013-01-27 Thread Paolo valleri
post more code as an example? > > On Friday, 25 January 2013 08:32:55 UTC-6, Paolo valleri wrote: >> >> Dear all, I've just came across the fact that with the following code: >> def wiki(): >> return auth.wiki(render='html') >> and visiting some

[web2py] Re: Howto Multi file uploader

2013-01-30 Thread Paolo valleri
I don't think you will find something out-of-the-box. However, I advice you to start from here: http://malsup.com/jquery/form/ On Wednesday, January 30, 2013 10:48:57 AM UTC+1, Ramos wrote: > > Hello, what is the best way to add multi file upload functionality. > > This is very important for me.

[web2py] wiki: how to cache media files?

2013-01-31 Thread Paolo valleri
Hi all, today I discovered that wiki media, actually they are all images, they are always requested to the server and never cached by the client. In other words, even if I have already visited the page I do a get to download all the images instead of using those in the browser cache as commonly

[web2py] Re: login by ajax

2013-02-18 Thread Paolo valleri
+1 for auth,ajax_login() paolo On Monday, February 18, 2013 4:50:20 AM UTC+1, Massimo Di Pierro wrote: > > Should we offer something like {{=auth.ajax_login()}} helper which submits > to /user/login? If would not be difficult to write. > How should it work? > > > > > On Sunday, 17 February 2013

[web2py] Re: [Newbee] - Error message with plugin_Wiki : 'auth' not defined

2013-02-20 Thread Paolo valleri
Hi Pibol, plugin_wiki is now deprecated, use auth.wiki() instead. http://web2py.com/books/default/chapter/29/03?search=auth.wiki#The-built-in-web2py-wiki paolo On Wednesday, February 20, 2013 3:17:42 PM UTC+1, open...@gmail.com wrote: > > Hi all, > > I am beginner in Web2Py and I like it much. I

Re: [web2py] Re: Scheduler: new plugin cs_plugin_monitor

2013-02-25 Thread Paolo valleri
Really nice job, +1 for shipping this with web2py. paolo On Sunday, February 24, 2013 3:34:03 PM UTC+1, Massimo Di Pierro wrote: > > I think this plugin should ship with web2py. ;-) > > On Sunday, 24 February 2013 07:28:11 UTC-6, Niphlod wrote: >> >> spoilers here >> https://www.dropbox.com/sh/gyn

[web2py] Re: [newbee] Wiki_plugin - WidgetBuilder-jqgrid : How to link data from db to jqgrid

2013-02-26 Thread Paolo valleri
Hi Bruno, plugin_wiki is deprecated and it has been replaced by auth.wiki, have a look here: http://web2py.com/books/default/chapter/29/03?search=auth.wiki#The-built-in-web2py-wiki Paolo On Tuesday, February 26, 2013 5:09:06 PM UTC+1, open...@gmail.com wrote: > > Hi, > > I am new on Web2py and I

[web2py] Re: SQLFORM in Bootstrap modal

2013-02-26 Thread Paolo valleri
Hi Vincenzo, I came across to the same problem with sqlform and modal. As far as I remember there is nothing 'automatic' to solve the problem. However, so far I fixed the duplicate submit buttons by hiding the 'original' one, namely the one belonging to the sqlform, and then adding just a few j

[web2py] Re: Optimising caching and enabling gzip for web2py on heroku?

2013-03-03 Thread Paolo valleri
Hi Alec, if I were you I would remove the 'inline' parameter from both response.optimize_css response.optimize_js, just to keep the page lighter and to leverage on the browser cache for the external resources. Moreover, +1 for having something 'automatic' for using somehow the browser cache, in

[web2py] Re: web2py 2.4.2 is OUT

2013-03-03 Thread Paolo valleri
Good works, I will try it later today. I don't know if you have already discussed about that, just in case, I would suggest to start the use of git tags so it will be easier to update web2py and keep track of the different releases. Paolo On Monday, March 4, 2013 7:58:19 AM UTC+1, Massimo Di Pi

[web2py] Re: Slow DAL initialization

2013-03-14 Thread Paolo valleri
I am wondering why the pool_size is set to 0 by default http://web2py.com/books/default/chapter/29/06#Connection-pooling Which are the side effect of having something greater than 0? Is not worth to have it set for example as 5 by default? paolo On Thursday, March 14, 2013 2:47:56 PM UTC+1, Nip

Re: [web2py] Re: Scheduler: new plugin cs_plugin_monitor

2013-03-15 Thread Paolo valleri
Hi, I have in plan to use it in a future project, today a started a very easy app but I ended up in the error: 'database is locked'. The tests were done by using sqlite. What is wrong in my app? Please find attached the example test The ticket: Traceback (most recent call last): File "/home/p

Re: [web2py] Re: Scheduler: new plugin cs_plugin_monitor

2013-03-16 Thread Paolo valleri
orefresh off ? > Did you try increasing the cache time ? > and setting GROUPING_MODE to python instead of database ? > > PS: you did not used this as a model, right ? it queues a new task at > every request in that case.... > > On Friday, March 15, 2013 11:14:46 AM UTC+1,

[web2py] Cache performance with computed columns

2013-03-25 Thread Paolo valleri
Dear all, I want to share with you some results. I implemented a query in two different ways. Given the following common code: start = db.record.with_alias('start_point') end = db.record.with_alias('end_point') elapsed_time = end.gathered_on.epoch() - start.gathered_on.epoch() The first query is

Re: [web2py] Re: Cache performance with computed columns

2013-03-25 Thread Paolo valleri
the query (on the > first implementation needs to add the "elapsed time" part) . Just to be > sure, try timing > > def Q1(): > your first implementation, without cache > def Q2(): > your second implementation, without cache, without the check in python >

[web2py] scheduler sincronization

2013-03-25 Thread Paolo valleri
Dear all, I started to use scheduler. I've created a simple starting example task: https://github.com/ilvalle/scapp/blob/master/models/scheduler.py and with the great niphlod's plugin cs_monitor_plugin I created an initial repetitive task. However, although I set repeats: 0 and period: 300, task

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread Paolo valleri
e you sure that the worker is not killed/restarted by any chance > (see the worker_name in the scheduler_run table) > > On Tuesday, March 26, 2013 11:33:53 AM UTC+1, Paolo valleri wrote: >> >> I executed again demo1, I run it several times, I got even in this case >

Re: [web2py] Re: scheduler sincronization

2013-03-26 Thread Paolo valleri
> I find hard to believe that with a single worker, with that function that > basically just prints something and an execution every 300 seconds the > problem lies into a lock, unless the SQLite library available on your > system is reallly old. > > On Tuesday, March 26, 2013 2

Re: [web2py] geodal

2013-01-05 Thread Paolo valleri
Hi Massimo, I have just tried a few examples but there is a bug in the getPoint function, please find attached a simple patch to fix it. Paolo On Monday, December 24, 2012 7:21:12 PM UTC+1, Massimo Di Pierro wrote: > > Thank you Denes. Would you please check my changes. I do not think I broke >

Re: [web2py] geodal

2013-01-06 Thread Paolo valleri
lps, Paolo On Sunday, January 6, 2013 1:46:00 AM UTC+1, Massimo Di Pierro wrote: > > If something still fails, can you place post the result of print db(...) > _select(...) > > On Saturday, 5 January 2013 18:45:26 UTC-6, Massimo Di Pierro wrote: >> >> I made some chang

Re: [web2py] geodal

2013-01-06 Thread Paolo valleri
well done! All the former tests worked. I will investigate more the others functions as soon as possible. Paolo On Sunday, January 6, 2013 4:28:13 PM UTC+1, Massimo Di Pierro wrote: > > One more try please. > > On Sunday, 6 January 2013 02:11:09 UTC-6, Paolo valleri wrote: >

[web2py] self join on postgres

2013-01-07 Thread Paolo valleri
Hi all, I've problems on defining self join queries on postgres, the query, works on sqlite, is defined as follows: start = db.record.with_alias('start') end = db.record.with_alias('end') query = ((start.station_id == 11) & (end.station_id == 12)) rows = db( query ).select(start.gathered

[web2py] Re: self join on postgres

2013-01-07 Thread Paolo valleri
quot;end" as aliases ? > while "start" on postgresql isn't reserved ( but is a reserved keyword for > t-sql:2003 and t-sql:1999), "end" is reserved even for postgresql. > > On Monday, January 7, 2013 1:21:27 PM UTC+1, Paolo valleri wrote: >> >> Hi

Re: [web2py] geodal

2013-01-08 Thread Paolo valleri
,-0.127683 POINT(41.901514 12.460774),41.901514,12.460774 POINT(40.851775 14.268124),40.851775,14.268124 The geometry field MUST contain only point otherwise it raises an error. Hope it helps Paolo On Sunday, January 6, 2013 5:29:52 PM UTC+1, Paolo valleri wrote: > > Hi Massimo, I found

Re: [web2py] geodal

2013-01-08 Thread Paolo valleri
field *name_p* and *location_p* respectively Paolo On Tuesday, January 8, 2013 3:48:56 PM UTC+1, Massimo Di Pierro wrote: > > In trunk. How about the previous issue? Is that still open? If so, can you > please open a ticket? Thanks. > > On Tuesday, 8 January 2013 05:31:28 U

[web2py] Re: @cache decorator

2013-04-18 Thread Paolo valleri
Basically it stores the output of the function, in your case the output is the rendered view. For more info about cache, have a look here: http://web2py.com/books/default/chapter/29/04#cache Paolo On Thursday, April 18, 2013 6:17:36 PM UTC+2, BlueShadow wrote: > > Hi I got a site which calls so

[web2py] Re: db select with rows

2013-04-21 Thread Paolo valleri
You get the last element simply because in the loop you have an assignment. So that you will get only the last element of the loop. What about that: rows = db(db.tableA. id_b==db.tableB.id ).select(db.tableB.ALL) or temp = [] for row in rowsA: temp.app

[web2py] Re: Bulk insert: how to improve performances?

2013-05-20 Thread Paolo valleri
I didn't know that as well, Is there a limit in the number of dicts passed to the bulk_insert? Paolo On Monday, May 20, 2013 11:18:51 AM UTC+2, Niphlod wrote: > > there's a bulk_insert method too. > > http://web2py.com/books/default/chapter/29/06?search=bulk > > Il giorno lunedì 20 maggio 2013 1

[web2py] Re: Bulk insert: how to improve performances?

2013-05-20 Thread Paolo valleri
At least with sqlite wrapping a list of insert by adding respectively at the beginning and at the end BEGIN TRANSACTION/END TRANSACTION allows to speed up the performance, see: http://stackoverflow.com/questions/1711631/how-do-i-improve-the-performance-of-sqlite could we do something like that in

[web2py] Re: Scaling + performance tips to prepare for launch

2013-05-21 Thread Paolo valleri
It is worth to check this too https://developers.google.com/speed/pagespeed/insights Paolo On Tuesday, May 21, 2013 8:40:20 PM UTC+2, Niphlod wrote: > > the session.forget(response) will render all session related features > useless. Use wisely. > I'd add lazy_tables=True to your points, as wel

[web2py] Re: Postgres users beware auth.signature is_active; bad problem, easy to fix

2013-05-24 Thread Paolo valleri
I agree, it would be nice to have is_active as a real boolean although I don't know how difficult could be its implementation without breaking the backward compatibility. Furthermore, I've just checked my instance and is_active is saved as 'T' with postgres 9.1 Paolo On Friday, May 24, 2013 5:

[web2py] Re: DAL Select constant field

2013-05-30 Thread Paolo valleri
Hi, actually, I couldn't see the reason of that :-P but anyway this seems to work q=db( db.clients.id > 0).select( db.clients.clientuuid, '%s' % 1) Paolo On Thursday, May 30, 2013 5:23:34 PM UTC+2, Zach wrote: > > Hi guys, > > I am trying to run something in the form of : > > select clientuuid,

[web2py] Re: web2py 2.4.7 admin Recent Tweets not loaded

2013-05-31 Thread Paolo valleri
Hi, now it seems to work but it is different than the former implementation, namely the current shows only tweets posted by the user web2py, however the most recent one is more than two months old. As is I don't see this so useful, actually It is a matter of communication and which information

[web2py] admin access password file

2013-06-11 Thread Paolo valleri
Hi all, I have to migrate a web2py app to a centos server. It has python 2.6.6, uwsgi 1.9.12. admin fails saying: "admin disabled because unable to access password file" the file (parameters_443.py) is there. I tried to debug the failure and I discover that, despite the fact that I use https,

[web2py] Re: Save rendered .html views to file system

2013-06-12 Thread Paolo valleri
Hi, you could use cache.ram or cache.disc. Start by replacing the {{include 'footer.html' }} with something like: {{=response.render('footer.html', {your dict} )}} and then wrap that like {{=cache.ram( YOUR_KEY, lambda: response.render('footer.html', {your dict} ) , time_expire=YOUR_TIME_EXPIRE)}}

[web2py] Re: Spammers on web2pyslices.com

2013-06-15 Thread Paolo valleri
Personally I don't like captcha image, before delving into the implementation of whatever like that it is worth to try the honeypot mechanism namely a 'hidden field'. A field that if filled out allow you to distinguish between user and robots requests. The field it is hidden by css properties r

Re: [web2py] Re: admin access password file

2013-06-17 Thread Paolo valleri
heme; > > you must add > > uwsgi_param HTTP_X_FORWARDED_PROTO https; > > > > On Wednesday, 12 June 2013 09:09:01 UTC-5, Paolo valleri wrote: >> >> Hi Massimo, I used https. I expired the same behavior on both apache and >> nginx. >> please find attached the c

Re: [web2py] @request.restful() only works on localhost

2013-06-17 Thread Paolo valleri
that could be a problem of a generic view not correctly loaded due to the following line in db.py response.generic_patterns = ['*'] if request.is_local else [] change it to response.generic_patterns = ['*'] Paolo On Monday, June 17, 2013 9:50:58 PM UTC+2, Michele Comitini wrote: > > send exa

[web2py] Re: web2pyslice and PIL thumbnail quality

2013-06-20 Thread Paolo valleri
I am not sure but the quality option could be for jpeg only. Paolo On Thursday, June 20, 2013 5:06:06 PM UTC+2, lesssugar wrote: > > A bit of offtopic but maybe someone knows what's going on. I'm using this > thumbnail generating slice I found: > > LINK

[web2py] Re: disable left side panel in editor in 2.5>

2013-06-24 Thread Paolo valleri
Are you looking for an hard-code option or for an easy-to-click button to reduce the whole panel? Paolo On Monday, June 24, 2013 8:31:48 PM UTC+2, Massimo Di Pierro wrote: > > Not sure but there should be. Please open a ticket and we will add it > tonight. > > On Monday, 24 June 2013 05:05:34 UT

[web2py] Re: Can page/chapter titles be added to the online book ?

2013-06-24 Thread Paolo valleri
I would add the title in the url, not only for a better seo but also for a faster in-browser url matching against visited url while typing, from: http://web2py.com/books/default/chapter/29/02 to: http://web2py.com/books/default/chapter/29/02/The database abstraction layer

[web2py] datetime operation with dal (postgres)

2013-06-28 Thread Paolo valleri
Dear all, I am trying to run simple mathematical operations with datetime and postgres as backend (http://www.postgresql.org/docs/9.0/static/functions-datetime.html) I've prepared this simple example code: from datetime import timedelta db.define_table('test_sum', Field('first_int', 'integer'),

[web2py] Re: datetime operation with dal (postgres)

2013-06-28 Thread Paolo valleri
i Pierro wrote: > > Please open a ticket about this. Expressions like date_diff were designed > to be in the query, not in the list of selected columns. I think this can > be done but need to check what breaks. > > On Friday, 28 June 2013 03:02:06 UTC-5, Paolo valleri wrote: >&

[web2py] Re: real time graph

2013-07-19 Thread Paolo Valleri
Have a look at http://www.flotcharts.org/ Paolo On Friday, July 19, 2013 12:58:54 AM UTC+2, Vera Moreira wrote: > > hi everyone, > I need some help, does anyone have examples on how to do a "real time > graph". What I need is a graph to constantly show random numbers, I´m using > matplotlib >

[web2py] Re: Google Analytics - 'analytics is not defined' error

2013-07-24 Thread Paolo Valleri
You found an issue, in the welcome app the analytics library is shiped as minified, given that the correct file name is analytics.min.jsinstead of analytics.js

Re: [web2py][share] ressources

2013-07-24 Thread Paolo Valleri
On Wednesday, July 24, 2013 4:47:37 PM UTC+2, Richard wrote: > > Hello, > > I recently discover these two lib : > > http://johnny.github.io/jquery-sortable/ (avoid jquery ui just to get > drag and drop capability) > thanks for sharing, I would try to use that with bootstrap tabs. > > http://

[web2py] Re: Err 24: too many files open

2013-07-24 Thread Paolo Valleri
dederocks, I've just tried to run lsof -p on a ubuntu server running web2py In my case, it returns 138 opened files among libraries, sockets and so on; the most opened file is /dev/zero, opened 55 times. Paolo On Thursday, July 25, 2013 8:18:32 AM UTC+2, dederocks wrote: > > Thanks a lot for

[web2py] Re: Err 24: too many files open

2013-07-25 Thread Paolo Valleri
BLISHED) > uwsgi 2128 www-data 515u IPv4 62392 0t0 TCP > localhost:56643->localhost:6379 (ESTABLISHED) > > Does someone know how to fix this? > > Le jeudi 25 juillet 2013 08:28:08 UTC+2, Paolo Valleri a écrit : >> >> dederocks, I've just tried to

[web2py] Best approach to render fragments

2013-08-27 Thread Paolo Valleri
Dear all, I am trying to understand which is the best way to render a fragment (which can be inside an other fragment and so on). Lets take a very simple example in which I render a list of comments, and by clicking the 'more' button, few other are loaded with ajax. So far I found a couple of wo

[web2py] Re: new web2py.js changes the sequence of execution

2013-08-29 Thread Paolo Valleri
Just to understand better what is going on, try to comment line 257 in web2py.js or even better the whole success block. Paolo On Thursday, August 29, 2013 3:42:29 AM UTC+2, Anthony wrote: > > Looks like this > change

[web2py] Re: Load every 5 seconds

2013-08-30 Thread Paolo Valleri
Have a look at http://web2py.com/books/default/chapter/29/12/components-and-plugins#Components Paolo On Friday, August 30, 2013 7:50:10 PM UTC+2, Javier Pepe wrote: > > Hi > > I need load SQLFOM.grid every 5 seconds, try whith autorefresh, but load > all page. > > I need help to create javascript

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Paolo Valleri
Your ticket sounds strange to me, because tells us that your gluon/tools.py doesn't have the class Config. Did you really upgrade web2py? Have you compiled your app before upgrading? If so, remove the compiled code and try again. Let us know. Paolo On Saturday, September 14, 2013 4:05:37 PM UTC

[web2py] Re: Menus do not work if i test my app with an android client browser

2013-09-16 Thread Paolo Valleri
I can't reproduce it, I've just tested it and it works as expected. On Monday, September 16, 2013 1:36:11 PM UTC+2, Ramos wrote: > > hello, i tested with chrome and default browser. > > My menus code do not work > > for example my code > > response.menu += [(A(I(_class='icon-search'),' Logins',

Re: [web2py] Re: Nginx configuration reporting Internal Server Error

2013-09-17 Thread Paolo Valleri
Check if in the web2py root directory there is a file called wsgihandler.py if not move it there remember to restart uwsgi after that Paolo On Tuesday, September 17, 2013 3:58:40 PM UTC+2, viniciusban wrote: > > Thanks, Niphlod. > > I found errors in uwsgi.log. > > Probably it's referred to so

Re: [web2py] Re: web2py 2.6.3 editor is not working in firefox

2013-09-19 Thread Paolo Valleri
Yes we can! I will work on it asap in the next days :P On Thursday, September 19, 2013 5:30:55 PM UTC+2, Ramos wrote: > > Just a minor improvement. > Could you add a "create" link in the left collapsible menu when we are > editing code in the browser?. > Avoids having to go back to admin and cli

[web2py] Re: web2py welcome Performance

2013-09-30 Thread Paolo Valleri
You can wrap the index function with @cache.action(time_expire=3600, cache_model=cache.ram) More, http://web2py.com/books/default/chapter/29/04/the-core?search=cache.action#cache.action Paolo On Monday, September 30, 2013 1:37:49 PM UTC+2, damufo wrote: > > Hi, > > Gmetrix set a performance fo

[web2py] Re: Integrated IDE does not color javascript code

2013-10-17 Thread Paolo Valleri
Thanks for discovering it, we'll work on it as soon as possible. Paolo On Wednesday, October 16, 2013 5:18:10 PM UTC+2, Ramos wrote: > > hello, > javascript is not colored in the integrated ide of web2py > > Is it possible to activate some type of colors? > > Thank you > -- Resources: - http:/

[web2py] Re: web2py and tag-manager/typeahead

2013-10-17 Thread Paolo Valleri
Please, provide more information/code The link you posted doesn't work right now, please review it If can be useful, web2py uses twitter typeahead in the editor sidebar (admin app), it is worth to have a look to that code too Paolo On Thursday, October 17, 2013 3:41:38 AM UTC+2, NeelSheyal wrote

Re: [web2py] Re: 2 domains served by the same web2py

2013-10-24 Thread Paolo Valleri
I've this setup on a server: routers = dict( BASE = dict( default_application='vtraffic', default_controller='default', root_static = ['favicon.ico', 'robots.txt', 'google51a05a100c482cad.html', 'sitemap.xml'], domains = {'traffic.integreen-life.bz.it':'vtraffic', 'par

[web2py] Re: Scheduler and updating db records

2013-10-28 Thread Paolo Valleri
This is a common issue with the scheduler, you have to explicitly force a commit db.commit() Paolo On Monday, October 28, 2013 3:36:13 AM UTC+1, Ignacio Llamas Avalos Jr wrote: > > I am trying to create a task where every night the following function is > run to decrement the days left on my st

[web2py] Re: Insert Failed: Insufficient data left in message

2013-11-06 Thread Paolo Valleri
have you checked the variables content of a failure? Paolo On Thursday, November 7, 2013 8:36:52 AM UTC+1, at wrote: > > Hi, > > Occationally an error is reported stating following problem: > "/home/www-data/web2py/gluon/dal.py", line 8514, in insert\nret = > self._db._adapter.insert(self, s

[web2py] Re: Improving database performance

2013-11-08 Thread Paolo Valleri
Hi, if the index is slow with 100k dummy data you should create an index and on the other hand review your code. Create indexes on columns used by the query that generates the index; for what concerns the query, can you please post that code? Finally, be aware that for the moment you should crea

Re: [web2py] Re: web2py & pycharm...

2013-11-14 Thread Paolo Valleri
hi, I've just tried the 'community edition' and I got many Unresolved references for request, response and so on. Have you found a way to fix ? Paolo On Tuesday, October 1, 2013 2:29:49 AM UTC+2, Richard wrote: > > This suppose to be solve : > http://youtrack.jetbrains.com/issue/PY-10810 > > I h

[web2py] Re: web2py ACE editor

2013-11-18 Thread Paolo Valleri
Have a look to the code of admin app, we do the same thing in the app editor (the only difference is that we use codemirror instead of ACE) On Monday, November 18, 2013 1:10:30 PM UTC+1, Yebach wrote: > > Hello > > I got the following task > > In my home page created with web2py I need to embed A

[web2py] Re: Making the DAL orders-of-magnitude faster...

2013-11-20 Thread Paolo Valleri
How should I test 'your approach'? Would you share a patch? Please, compare the two tests with the same number of iterations. Paolo On Wednesday, November 20, 2013 12:04:35 PM UTC+1, Arnon Marcus wrote: > > I get these results: > > C:\Python26\python.exe F:/Experimental/web2py_272/web2py/test_exec

[web2py] Re: Making the DAL orders-of-magnitude faster...

2013-11-20 Thread Paolo Valleri
Hi, below my results: Times are for 100 iterations Preparing started bench speed_executesql() total=0.876057 avg=0.008761 speed_normal_rows() total=15.076992 avg=0.150770 speed_rows_with_cacheable() total=13.477355 avg=0.134774 speed_executesql_with_colnames() total=0.989993 avg=0.009900 speed_

[web2py] Re: Making the DAL orders-of-magnitude faster...

2013-11-22 Thread Paolo Valleri
+ 1 for changing dal.py:8359 in fields = colnames or [f[0] for f in columns] This will allow us to change the columns name even when as_dict=True. Example: sql = db(db.coordinate.is_active == True)._select(db.coordinate.point2d. count(), db.coordinate.point3d.count()) rows = db.executesql(sql,

[web2py] Re: app slow on pythonanywhere

2016-09-03 Thread Paolo Valleri
Have you disabled migrations? Paolo On Saturday, September 3, 2016 at 7:01:39 PM UTC+2, Scott Hunter wrote: > > I have an app which runs *much* slower than expected on pythonanywhere. > > I enabled the profiler, and one thing stood out: on pythonanywhere, the > function the most time was spent i

Re: [web2py] Re: web3py status

2016-09-07 Thread Paolo Valleri
Current master branch passes almost all unittests on python 3.5. If anyone is interested in helping with the final steps, a checklist is here https://github.com/web2py/web2py/issues/1353#issue-159010482 On Tuesday, September 6, 2016 at 5:43:55 AM UTC+2, jjs0sbw wrote: > > I agree that a better te

[web2py] Re: Help with App memory usage

2016-10-14 Thread Paolo Valleri
Which driver are you using for postgres? Are you using cache in models? Try to figure out if there are controllers using more memory than others. On Friday, October 14, 2016 at 4:03:20 AM UTC+2, Anthony wrote: > > That's a lot of code to review. You're probably going to have to do some > digging

[web2py] Re: How to cleanly pass FPDF output object to os Download/Save dialogue box

2016-10-17 Thread Paolo Valleri
With this: ... s_io = pdf.output(dest='S') response.headers['Content-Type']='application/pdf' response.headers['Content-Disposition'] = 'attachment; filename="%s"' % file_name raise HTTP(200, s_io, **response.headers) You get the same you have now with response.stream but it's cleaner. Without

[web2py] Re: 50x performance improvement for web2py in TechEmpower Web Framework Benchmarks

2016-11-18 Thread Paolo Valleri
According to the benchmark records an important optimization concerns the session logic. The results are also good because the web2py version used during the benchmark already includes all encode/decode calls introduced for py3. Paolo On Friday, November 18, 2016 at 2:40:01 PM UTC+1, JorgeH wr

[web2py] Re: Is web2py dying?

2016-11-18 Thread Paolo Valleri
Hi, On Thursday, November 17, 2016 at 9:00:38 PM UTC+1, AlighaThor wrote: > > Thanks for your quick reply. > > By the way, with 4 years of experience, why not start contributing too >> > > Exactly for that reason I asked this. I'm really thinking about request > being a contributor. I want to do

Re: [web2py] Re: switch to python 3

2016-12-06 Thread Paolo Valleri
What about https://gitlab.com/m2crypto/m2crypto/commits/python3 ? On Monday, December 5, 2016 at 9:57:19 PM UTC+1, Niphlod wrote: > > m2crypto port for py3 are available (although not strictly official). > The contrib module for x509 auth stands on it so, on py3, it MAY not work, > but it's not

[web2py] Re: [pydpdf] ('FPDF' object has no attribute 'write_html')

2016-12-07 Thread Paolo Valleri
see https://github.com/reingart/pyfpdf/blob/master/docs/reference/write_html.md for a detailed example for using write_html Paolo On Tuesday, December 6, 2016 at 10:23:46 PM UTC+1, Mamisoa Andriantafika wrote: > > Hi, > > Here is a simple controller. > > def test_fpdf(): > from gluon.contri

[web2py] Re: After upgrade to 2.8.2: foreign key constraint failed

2013-12-04 Thread Paolo Valleri
Web2py 2.8.2 comes with foreign_keys=ON enabled by default (see http://www.sqlite.org/foreignkeys.html) If you get the issue you mentioned I guess you are violating a foreign key constrain. Please post your model (or the tables definitions involved) so that we can figure out what is wrong Paolo

[web2py] new feature in trunk: TODO panel in admin editor

2013-12-08 Thread Paolo Valleri
Dear all, the online editor has got a new TODO panel in which are listed all TODO you might have in the current application. For the time being it highlights only TODO in python files, in the short future we will support other file types and special keywords, along with the keyword TODO I've see

[web2py] Re: Proposal for big but simple improvement: [add view] in IDE view

2013-12-09 Thread Paolo Valleri
It is a good idea that could speed up the initial development phase; We could start by implementing some like that: while you edit the controller test.py at the top you will get a button 'add view' that when clicked creates a file (a view actually) in the directory app/views/test; the file name

[web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-13 Thread Paolo Valleri
Please, let us know what you have changed in the last days, if today nothing work and in the early days only default.py. @devs we should try to update response.static_version for each new major release at least. Paolo On Friday, December 13, 2013 10:27:04 AM UTC+1, Richard Brown wrote: > > > An

[web2py] Re: Wappalyzer

2013-12-16 Thread Paolo Valleri
hi, we can list all apps that web2py implies, for sure python, if we check the presence of web2py.js I would also set jquery, what else (see all apps here https://github.com/ElbertF/Wappalyzer/blob/master/share/apps.json)? We could also check for the presence of either "X-Powered-By:web2py" in th

[web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-17 Thread Paolo Valleri
logs should be placed in /var/log/apache2/ and /var/log/wsgi can you also check if the string after alias_match in /etc/apache2/sites-available/default matches the one mentioned here: https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-ubuntu.sh#L148 Paolo On Tuesday, Decembe

[web2py] Re: Detecting MYSQL running status

2013-12-19 Thread Paolo Valleri
I've the same problem, I don't think DAL has this kind of ability but I leave the word to others in such cases. Are you interested in showing the 404 page for all tickets or only for those the involve the db connection? Paolo On Thursday, December 19, 2013 7:35:24 AM UTC+1, Raj Chinna wrote: > >

[web2py] Re: response.models_to_run in web2py 2.8.2

2013-12-20 Thread Paolo Valleri
I am not able to debug it a little more but as you can see here: https://github.com/web2py/web2py/commits/master/gluon/compileapp.py a few changes have been made on how models are handled, perhaps something broken backward compatibility ? Have you already tried with 2.7.4 ? Paolo On Friday, Dec

Re: [web2py] server slow down when face multiple requests

2013-12-22 Thread Paolo Valleri
what web2py version are you using? have you already had a look here: http://web2py.com/books/default/chapter/29/13/deployment-recipes#Efficiency-and-scalability ? Paolo On Sunday, December 22, 2013 1:48:56 AM UTC+1, viniciusban wrote: > > If you're using sqlite or migrations are enabled, this

[web2py] Re: Virtual field for latitude and longitude from geometry field?

2014-01-03 Thread Paolo Valleri
st_*() are db engine functions, you should query the db to get the output you are looking for. Given that, in your virtual field you should make a new query, something like that: Field.Virtual('latitude', lambda row: db(db.location.id == row.location.id). select(db.location.point.st_x()).first()

Re: [web2py] Migrating a hude database from Spring to web2py

2014-01-09 Thread Paolo Valleri
Mind that DAL should be instantiated with fake_migrate_all; run your app once, then you can set it to false. This operation will create several files (one for each defined table) in the app/databases/ directory moreover, do you need to alter the 5 tables you mentioned? Paolo On Thursday, Janu

[web2py] detect a specific device

2014-01-14 Thread Paolo Valleri
Hi all, I'd develop a web2py responsible app instead of an android app; at a first sight it seams to some extent feasible. The only issue is related to an unusual requirement, the web2py app (running on an intranet) must be accessible only from well defined devices (android tablet). If needed I

[web2py] Re: Install Web2py on Windows with Apache and Mod WSGI (using command line, *nix flavour)

2014-01-21 Thread Paolo Valleri
Well done, under scripts/setup_* there are several scripts for deployments on linux environment, it would be very nice to have something for windows too. Paolo On Tuesday, January 21, 2014 5:04:12 PM UTC+1, 黄祥 wrote: > > done, i'm sorry, forgot to tell that it tested work in windows 7 ultimate

[web2py] Re: good eBooks web2py for beginners?

2014-01-23 Thread Paolo Valleri
have you already checked http://web2py.com/book ? while a few how-to are published on web2pyslices.com regards Paolo On Thursday, January 23, 2014 1:15:56 PM UTC+1, Cristiano Araujo wrote: > > hello world, > > can u give me reference about some good books for web2py development? > -- Resources:

  1   2   3   >