Re: [web2py] Re: database locking web2py vs. "external" access...

2012-06-22 Thread Doug Philips
On Wed, Jun 20, 2012 at 9:06 PM, Anthony wrote: >> Sooo Have I misunderstood the SQLite locking description? > > > I believe so. The shared lock does not last forever -- only as long as it > takes to execute the select. Once the data have been read, the shared lock > (for that particular selec

Re: [web2py] Re: database locking web2py vs. "external" access...

2012-06-22 Thread Doug Philips
On Wed, Jun 20, 2012 at 7:04 PM, Niphlod wrote: > You're forgetting another "layer".  DAL leverages on DBAPI implementation of > sql drivers. Well, that's not exactly good news for transparency and ease of documentation. > A little more complicated: get on an infinite loop inserting 10 rows, > w

[web2py] Re: How to remove 'default' from all URLs?

2012-06-22 Thread Annet
Hi Alec, I had a routes related problem a few weeks ago. Jonathan and Anthony helped me solve it. The routes.py file that works i.e. remove default from the url reads like: # -*- coding: utf-8 -*- routers = dict( BASE = dict( default_application = 'init', applications = '

[web2py] Re: How to remove 'default' from all URLs?

2012-06-22 Thread Annet
Hi Alec, I had a routes related problem a few weeks ago. Jonathan and Anthony helped me solve it. The routes.py file that works i.e. remove default from the url reads like: # -*- coding: utf-8 -*- routers = dict( BASE = dict( default_application = 'init', applications = '

[web2py] Re: bootstrap carousel web2py Nightly build

2012-06-22 Thread LightDot
Hi Paolo, you're quite right about the amount of work needed to spot and properly resolve such css collisions. There are quite a few left too... I'm working on several projects using Bootstrap and dev web2py, so I needed a tool to let me anticipate possible problems. I made a simple plugin out

[web2py] Using admin interface on GAE, getting errors on update or insert

2012-06-22 Thread mike haberman
New to web2py and GAE. But with a very simple example, I am unable to use web2py admin interface to modify the database Using the admin interface for an application, I can navigate to 'Administrative Interface' --> Applications --> (blog) Edit --> Models --> database administration I can upda

[web2py] Cygwin directory problem and plugin.wiki install

2012-06-22 Thread weldja
Hi I am trying to install plugin_wiki (add-on) but have a problem. The plugin is downloaded to my Windows laptop c:/tmp/web2py.plugin.wiki.w2p When I try to upload the plugin to my web2py http://127.0.0.1:8000/admin/default/design/myapp | edit | plugins, browse to c:/tmp/web2py.plugin.wiki.w2p

[web2py] Web2py and pyjamas - redirecting controller to pyjamas html file

2012-06-22 Thread Daniel Gonzalez
Hi there, Just starting in web2py, I hope I am getting things right. My setup is slightly complicated for a newbie, so I am running into tons of issues. I am serving a pyjamas application with web2py. The backend will be in web2py, the frontent in pyjamas. I have found this nice article on how

[web2py] Web2py and pyjamas - redirecting controller to pyjamas html

2012-06-22 Thread Daniel Gonzalez
Hi there, I am starting with web2by, and my first project is a bit convoluted, so I am running into lots of different problems. My goal is to have a web application with web2py for the backend operations, interfacing with a pyjamas frontend, via JSONRPC. There is a nice article describing this

[web2py] Re: unique field with case insensitivity

2012-06-22 Thread Corey Marques
OK, maybe this is a better question. How to I specify that the column is NOCASE using the DAL? On Wednesday, June 20, 2012 4:33:55 PM UTC-4, Corey Marques wrote: > > Howdy, > > I'm trying to put together a quick proof of concept to use this framework > for porting our desktop application to the

Re: [web2py] DAL performance vs executesql

2012-06-22 Thread pbreit
Interesting, I'll try that out. I can see a million rows being slow but seems 5,000 should move pretty well. With the increasing usage of Javascript frameworks, it seems like more data is being retrieved for manipulating on the front-end. But in that case you just need JSON, I think with minima

Re: [web2py] DAL performance vs executesql

2012-06-22 Thread Niphlod
BTW, 1) is quite achievable if not selecting from multiple tables (i.e. no print db.dogs.name, db.person.name) in a breeze: from gluon.storage import Storage raw_rowset = db.executesql("thequery", as_dict=True) myrowset = [Storage(row) for row in raw_rowset] No time to patch DAL's executesql and

[web2py] Need DISTINCT query for combo box

2012-06-22 Thread Keith Edmunds
I have a combo box on a form to select a company name. The list of valid company names is derived from a query, q, and so I have: t = db.t_tasks c = db.t_companies t.f_company.requires = IS_EMPTY_OR(IS_IN_DB( db(q), c.id, '%(f_name)s', zero="All")) That works, but the query

Re: [web2py] DAL performance vs executesql

2012-06-22 Thread Niphlod
@pbreit : if I'm not mistaken, the "parse()" function in DAL handles a lot ... basically read just any value returned from the database to the correct type (blob, integer, double, datetime, list:*, just to say a few), handles virtualfields and prepares the Rows object making the Storage()

[web2py] Re: Web2py hanging with no errors in the log

2012-06-22 Thread Derek
You should look in the error logs. http://127.0.0.1:8000/admin/default/errors/examples where "examples" is the name of your app that was crashing. On Friday, June 22, 2012 1:34:35 PM UTC-7, magoo wrote: > > Hi all, > > I have a web2py hea

Re: [web2py] DAL performance vs executesql

2012-06-22 Thread pbreit
I'd be interested to understand what processing all goes on. It's definitely very pleasant working with DAL rows but in this case, not viable. --

[web2py] Re: Image uploads to different server, mongodb with grid

2012-06-22 Thread Niphlod
I can only answer for the first one: if you're willing to store image on the database the fix is right that: all images in one server. If you're looking to store uploaded files into one and only server and one and only folder, you have to share the folder via NFS or samba on the central server

[web2py] Web2py hanging with no errors in the log

2012-06-22 Thread magoo
Hi all, I have a web2py healthcheck monitoring application. Basically the only thing the application does is make database queries to find healthcheck data and make REST api calls to a separate web2py application for information on the environment. Recently the application has been "crashing

[web2py] Image uploads to different server, mongodb with grid

2012-06-22 Thread Bruce Wade
Hi, I have 2 questions: First what is the process of having images uploaded from 1 or more servers to be stored on a single server using web2py upload field? Second is it yet possible to use SQLFORM.grid with mongodb? If so what is the process for it or is it the same regardless of the db backen

Re: [web2py] import module fails

2012-06-22 Thread wdtatenh
Thanks. I do but I still get the same problem. It's interesting that I have another 3rd party module that I added and it works but mine which just has some functions test functions in it does not. I created that file under the module folder through the web2py web interface. --

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 11:57 AM, Alec Taylor wrote: > In my models/db.py I have this line: > > auth.settings.login_next = URL(f='profile') You might want to explicitly set the controller on that line, unless you have only one controller. As a practical matter it may not be an issue, since it's qui

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
In my models/db.py I have this line: auth.settings.login_next = URL(f='profile') The profile function is defined in controllers/default.py On Sat, Jun 23, 2012 at 4:46 AM, Jonathan Lundell wrote: > On Jun 22, 2012, at 11:00 AM, Alec Taylor wrote: >> >> (just tried that, didn't work) - Looking f

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 11:00 AM, Alec Taylor wrote: > > (just tried that, didn't work) - Looking forward to when you get the > chance to pass it through unit-tests :) OK, I tried it and it seemed to work OK. Here's my test case: router = dict( BASE = dict( default_

Re: [web2py] Re: Nightly Build (for testers) for windows

2012-06-22 Thread Javier Pepe
Thanks I expect the final version On Fri, Jun 22, 2012 at 3:20 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > There are some known issue with the windows nightly build because we are > moving from python 2.5 to 2.7. He hope to resolve them soon. > > > On Friday, 22 June 2012 11:53

[web2py] Re: Nightly Build (for testers) for windows

2012-06-22 Thread Massimo Di Pierro
There are some known issue with the windows nightly build because we are moving from python 2.5 to 2.7. He hope to resolve them soon. On Friday, 22 June 2012 11:53:42 UTC-5, Javier wrote: > > Hello > > I'm trying to use de lastest binary version and get the follow error: > > Traceback (most recen

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
(just tried that, didn't work) - Looking forward to when you get the chance to pass it through unit-tests :) On Sat, Jun 23, 2012 at 3:06 AM, Jonathan Lundell wrote: > On Jun 22, 2012, at 10:02 AM, Alec Taylor wrote: >> >> I got a syntax error on your last code modification (pointing out the >> =

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 10:02 AM, Alec Taylor wrote: > > I got a syntax error on your last code modification (pointing out the > = on social=). My dumb mistake; you need a comma after the BASE dict: routers = dict( BASE=dict( default_application='social', ), social=dict( functions

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
I got a syntax error on your last code modification (pointing out the = on social=). And yes, I have restarted the server. (I even rebooted my machine [for an unrelated reason]) Still being directed to http://brian.com/default/profile#_=_ rather than http://brian.com/profile On Sat, Jun 23, 2012

[web2py] Nightly Build (for testers) for windows

2012-06-22 Thread Javier Pepe
Hello I'm trying to use de lastest binary version and get the follow error: Traceback (most recent call last): File "web2pypy", line 16, in zipimport.ZipImportError: can't find module 'gluon' I need use this version to use scheduler. Thanks --

[web2py] Standalone DAL leaves mysql connections opened

2012-06-22 Thread demetrio
Hi everyone, I have connected WebDAV and SVN auth with a wsgi script. I needed to use a standalone DAL. When you do a dav petition with the navigator it makes a lot of petitions. Well, the thing is that always there is a connection opened (i can see them with PhpMyAdmin) if self.db: self

Re: [web2py] DAL performance vs executesql

2012-06-22 Thread Anthony
> > I wish it was possible to use other time-saving tools like SQLFORM.grid > with db.executesql(). > > At the moment most of the representation tools like SQLTABLE and > plugin_wiki's jqgrid suppose DAL usage. > Maybe it would be possible to convert the results of executesql() to a pseudo-Row

[web2py] Re: Parsing python from db fields?

2012-06-22 Thread Anthony
How about replacing context=response._vars with context=globals()? Anthony On Friday, June 22, 2012 10:46:31 AM UTC-4, RKS wrote: > > Okay, so that works on everything except href="{{=URL('something')}} it > returns the error "URL is not defined." I'm going to try the other anchor > method avai

Re: [web2py] Parsing python from db fields?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 7:46 AM, RKS wrote: > Okay, so that works on everything except href="{{=URL('something')}} it > returns the error "URL is not defined." I'm going to try the other anchor > method available and see if that works. > > The {{=blog.title}} and {{include 'postviews3.html'}} works

[web2py] Re: DAL IMAP errors

2012-06-22 Thread Alan Etkin
I've sent a possible patch here: http://code.google.com/p/web2py/issues/detail?id=644#c7 Seems that will solve the issue (there were no errors with the last trunk version) --

[web2py] Re: Parsing python from db fields?

2012-06-22 Thread RKS
Okay, so that works on everything except href="{{=URL('something')}} it returns the error "URL is not defined." I'm going to try the other anchor method available and see if that works. The {{=blog.title}} and {{include 'postviews3.html'}} works fine with this solution. --

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 7:29 AM, Alec Taylor wrote: > > I modified the route.py as you suggested: > > routers = dict( >BASE=dict( >default_application='social', >functions = ['index', 'profile', 'user'], >) > ) > > Yet the URL continues to present at: http://brian.com/default

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
(brian.com is an entry in my /etc/hosts pointing to 127.0.0.1 as a workaround for localhost with Facebook OAuth2) On Sat, Jun 23, 2012 at 12:29 AM, Alec Taylor wrote: > I modified the route.py as you suggested: > > routers = dict( >    BASE=dict( >        default_application='social', >        fu

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
I modified the route.py as you suggested: routers = dict( BASE=dict( default_application='social', functions = ['index', 'profile', 'user'], ) ) Yet the URL continues to present at: http://brian.com/default/profile#_=_ On Sat, Jun 23, 2012 at 12:15 AM, Jonathan Lundell w

[web2py] Re: Auto-generate PUT and DELETE methods

2012-06-22 Thread Massimo Di Pierro
wow. done that. On Thursday, 21 June 2012 18:04:04 UTC-5, Anthony wrote: > > Using my new Google Groups super > powers, > I have edited your original post, so if you'd like, you can delete this > correction and we can pretend this

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 7:06 AM, Alec Taylor wrote: > Just tried that, it's still prepending the URL with "default". > > E.g.: http://localhost/default/profile rather than http://localhost/profile If you want the router to omit the default controller when you specify a non-default function, then you

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
Just tried that, it's still prepending the URL with "default". E.g.: http://localhost/default/profile rather than http://localhost/profile On Fri, Jun 22, 2012 at 10:57 PM, Jonathan Lundell wrote: > On Jun 22, 2012, at 3:08 AM, Alec Taylor wrote: >> >> My web2py\routes.py: >> >> routers = dict(

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

2012-06-22 Thread Paolo Caruccio
Try to apply on label this css rule: white-space: pre-wrap; The white-space property is supported in all major browsers. ( http://www.w3schools.com/cssref/pr_text_white-space.asp) Il giorno venerdì 22 giugno 2012 15:35:18 UTC+2, Marco Prosperi ha scritto: > > > hi all, I would like to limit the

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

Re: [web2py] Re: Email form contents after submission

2012-06-22 Thread Anthony
> > thanks a lot for that. But I think I made a mistake in asking the > question. What i want to know more than just this is how to set up a mail > server... or how to set up the mail 'mailer' object... and how should i > configure it. > Setting up the web2py mailer is covered in the book: ht

Re: [web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Jonathan Lundell
On Jun 22, 2012, at 3:08 AM, Alec Taylor wrote: > > My web2py\routes.py: > > routers = dict( BASE=dict( default_application='social', > default_controller='default', default_function='index' ) ) > myapps = ['social'] > routes_in = [ > ('/admin/$anything', '/admin/$anything'), > ] > for app in my

Re: [web2py] Re: Email form contents after submission

2012-06-22 Thread Omar Technologies
Anthony, thanks a lot for that. But I think I made a mistake in asking the question. What i want to know more than just this is how to set up a mail server... or how to set up the mail 'mailer' object... and how should i configure it. Is that something I can learn from these forums... But thanks

[web2py] Jeditable and SQLTables

2012-06-22 Thread Simon Ashley
Does anyone have any native python/ web2py code for a jeditable call in a table that they are willing to share i.e. a web2py version of save.php? --

[web2py] Re: how to write on the wall of Facebook Friends?

2012-06-22 Thread Alec Taylor
Use the Python Facebook SDK (was official, now community maintained): https://github.com/pythonforfacebook/facebook-sdk On Friday, June 22, 2012 4:47:56 PM UTC+10, Amit wrote: > > > Hi, > I have to develop one web2py application which can write on the wall of > Facebook friends and send mail a

Re: [web2py] DAL performance vs executesql

2012-06-22 Thread Johann Spies
On 22 June 2012 10:21, Michele Comitini wrote: > The DAL is a pure python implementation so it is slower than a C > implementation. > With large datasets the overhead is high so it is better to use executesql. > Often there's no other way than pulling all the records at once, but > sometimes a la

[web2py] How to remove 'default' from all URLs?

2012-06-22 Thread Alec Taylor
My web2py\routes.py: routers = dict( BASE=dict( default_application='social', default_controller='default', default_function='index' ) ) myapps = ['social'] routes_in = [ ('/admin/$anything', '/admin/$anything'), ] for app in myapps: routes_in += [ ('/%s/static/$anything' % app, '/%s/static/

Re: [web2py] DAL performance vs executesql

2012-06-22 Thread Michele Comitini
The DAL is a pure python implementation so it is slower than a C implementation. With large datasets the overhead is high so it is better to use executesql. Often there's no other way than pulling all the records at once, but sometimes a lazy approach to data extraction with the use of limitby can

[web2py] Re: menu.append() more than one argument

2012-06-22 Thread Annet
Hi Anthony, Thanks for your reply. This works, so problem solved. response.site_submenu = [] if session.vcardsettings: response.site_submenu += [ ['Logo',request.function=='uploadLogo',URL('uploadLogo')], ['Tagline',request.function=='tagline',URL('tagline')], ['Text',request.fu

Re: [web2py] DAL performance vs executesql

2012-06-22 Thread Alec Taylor
>From what I understand people use DAL or ORM layers for abstraction purposes. So a struct with pointer to functions in C will have less overhead than a class with member functions in C++. However working at this higher level of abstraction allows for some fancy time-saving mechanisms such as mult