[web2py] Re: * PYTILS *

2012-02-25 Thread cyber
... but if I use web2py in MS Windows from the box? I have no ideas of how to use additional modules to be able to import required pieces of code from them. On 25 фев, 02:05, howesc how...@umich.edu wrote: no experience with this package, but if you are on a traditional server just install the

[web2py] Re: using existing DB connection inside module/class

2012-02-25 Thread JaapP
On Feb 24, 6:38 pm, Anthony abasta...@gmail.com wrote: On Friday, February 24, 2012 12:24:03 PM UTC-5, JaapP wrote: Hi Wikus, Thanks a lot! Adding a db.commit() after an insert causes the database to be updated. The db.commit() shouldn't be needed. Can you show some code? Anthony

[web2py] Re: Photo Gallery

2012-02-25 Thread Adriano Almeida
sorry for not posting any code before. I had my code at home. So.. I have a layout.html with the following code: ... !-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements feature detects -- script src={{=URL('static','js/modernizr.custom.js')}}/ script

[web2py] Re: Photo Gallery

2012-02-25 Thread Adriano Almeida
I have used the Firebug to see if I could get the error I was having. It gave me effect is not defined I've googled it and it was about a file called effectS.js. When uploading the file using the admin interface, to copy the file to the js dir, I had to rename to js/effects.js. The problem is

[web2py] Re: Slow queries or how to determine if cache is working?

2012-02-25 Thread Ray (a.k.a. Iceberg)
You only apply cache to your last query. You might need to cache the other two queries to gain full cache boost. Besides, you can add some profiling checkpoint inside your code to know which part is time consuming. Regards, Ray On Feb 25, 3:53 pm, pbreit pbreitenb...@gmail.com wrote: I'm

[web2py] Re: using existing DB connection inside module/class

2012-02-25 Thread Anthony
Hmm, the following test code works for me without any db.commit: *In /controllers/default.py:* def index(): db.define_table('time', Field('time')) from mymodule import DbTest test = DbTest(db) return dict(results=db(db.time).select()) *In /views/default/index.html:* {{extend

[web2py] Re: Slow queries or how to determine if cache is working?

2012-02-25 Thread Anthony
Is there any way to tell that caching is working? appadmin should include a menu with design, db, state, and cache. The cache link leads to /appadmin/ccache, which shows objects currently in the ram and disk caches, cache hits, etc. Anthony

[web2py] Re: * PYTILS *

2012-02-25 Thread Anthony
On Saturday, February 25, 2012 3:28:39 AM UTC-5, cyber wrote: ... but if I use web2py in MS Windows from the box? I have no ideas of how to use additional modules to be able to import required pieces of code from them. Are you using the web2py Windows binary, or are your running from

[web2py] Re: web2py with Aptana - optimization required

2012-02-25 Thread haggis
When just using from gluon import * then Aptana shows me many errors (i.e. dal() and http() not found). auth = Auth(db) and service = Service() works fine, thank you! On 24 Feb., 16:20, Anthony abasta...@gmail.com wrote: 1) At default controller Aptana shows me errors at @auth... decorators

[web2py] Capitalize and end-punctuate validators' default error_message values

2012-02-25 Thread Kernc
Hi, *I propose all validators' error_message values be capitalized and end-punctuated*, so e.g. this: enter from %(min)g to %(max)g characters becomes this: Enter from %(min)g to %(max)g characters. As of now, some validators' errors are capitalized while most aren't (inconsistent).

Re: [web2py] Re: want to insert the data in database when the user will log-in first time

2012-02-25 Thread Sanjeet Kumar
Thanks Massimo On Fri, Feb 24, 2012 at 9:23 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: How about adding this at the bottom of your model: def do_something(form): auth.settings.login_onaccept = do_something On Feb 24, 3:47 am, Sanjeet Kumar sanjeet@gmail.com wrote:

[web2py] Re: * PYTILS *

2012-02-25 Thread cyber
PROBLEM SOLVED! Thank you all for your fast response! I have made a new *.py file in the model with that content: # -*- coding: utf-8 -*- from __future__ import division ZERO = ноль L_1_HE = HE = [ZERO, один, два, три, четыре, пять, шесть, семь, восемь, девять, десять, одинадцать,

[web2py] Re: Capitalize and end-punctuate validators' default error_message values

2012-02-25 Thread Anthony
I generally agree about the capitalizing, but I'm not sure all the messages deserve a period at the end (e.g., Invalid expression, Value not allowed, No Match, etc.). Anthony On Saturday, February 25, 2012 10:51:24 AM UTC-5, Kernc wrote: Hi, *I propose all validators' error_message values

[web2py] Why does this not work for mysql?

2012-02-25 Thread simon
db1 = DAL('sqlite://storage.sqlite', folder='c:/web2py/applications/ crm/databases', auto_import=True) db2 = DAL('mysql://root@localhost/opencart', auto_import=True) print(db1.tables) print(db2.tables) a=db2.executesql(show tables) print(a) This lists the tables for sqlite database; and lists the

[web2py] Re: Why does this not work for mysql?

2012-02-25 Thread Anthony
db1 = DAL('sqlite://storage.sqlite', folder='c:/web2py/applications/ crm/databases', auto_import=True) db2 = DAL('mysql://root@localhost/opencart', auto_import=True) print(db1.tables) print(db2.tables) a=db2.executesql(show tables) print(a) This lists the tables for sqlite

[web2py] type 'exceptions.TypeError' float argument required occurs when registering a user on GAE SDK

2012-02-25 Thread Peter G.
The full stack trace is as follows: Traceback (most recent call last): File /home/pyg/Development/capstonemoot/web2py/gluon/ restricted.py, line 204, in restricted exec ccode in environment File /home/pyg/Development/capstonemoot/web2py/applications/init/ controllers/default.py, line 72,

[web2py] Re: web2py with Aptana - optimization required

2012-02-25 Thread Anthony
On Saturday, February 25, 2012 10:44:55 AM UTC-5, haggis wrote: When just using from gluon import * then Aptana shows me many errors (i.e. dal() and http() not found). Where is your code calling dal() and http() -- neither of those are part of the web2py API (instead, there is DAL() and

[web2py] Re: Capitalize and end-punctuate validators' default error_message values

2012-02-25 Thread howesc
do (should) the default messages use T()? could that be used for an easier customization? i too agree with consistency. hopefully noone would object to improving our grammar. :) cfh On Saturday, February 25, 2012 12:25:53 PM UTC-8, Anthony wrote: I generally agree about the capitalizing,

[web2py] Re: BELONGS is not supported on GAE?

2012-02-25 Thread howesc
yup that happens. sometimes i will read data into a dict so i can grab more than 30 rows and perform the join myself. i just spent a bunch of time redoing one of my databases to make it more NOSQL happy. On Friday, February 24, 2012 10:48:25 PM UTC-8, Peter G. wrote: BrendanC: Thanks for

[web2py] Re: Slow queries or how to determine if cache is working?

2012-02-25 Thread pbreit
Ah, right, thanks. I missed it because I don't use the default layout. I do notice, however, that while the cache does appear to be working, Web2py is reporting the cache size as 0: Size of cache: *0* items, *0* bytes The performance seems really slow, though since it's only running through

[web2py] Re: type 'exceptions.TypeError' float argument required occurs when registering a user on GAE SDK

2012-02-25 Thread Massimo Di Pierro
That line no longer exists in trunk. Try the nightly build. On Feb 25, 4:15 pm, Peter G. pete.y@gmail.com wrote: The full stack trace is as follows: Traceback (most recent call last):   File /home/pyg/Development/capstonemoot/web2py/gluon/ restricted.py, line 204, in restricted     exec

[web2py] Re: Slow queries or how to determine if cache is working?

2012-02-25 Thread pbreit
Also, on the 3rd or 4th draw on the cache it seems to just stall indefinitely (the categories in the side bar never display, it just shows loading... indefinitely. ps: sorry about the excessive quoting. Google Groups interface is giving me all sorts of problems right now. On Saturday,

[web2py] Re: Slow queries or how to determine if cache is working?

2012-02-25 Thread Anthony
Ah, right, thanks. I missed it because I don't use the default layout. I do notice, however, that while the cache does appear to be working, Web2py is reporting the cache size as 0: Size of cache: *0* items, *0* bytes Is it an older version of appadmin? In the current version, if you

[web2py] Re: Slow queries or how to determine if cache is working?

2012-02-25 Thread pbreit
OK, the problem is not query speed, it's that LOAD(...ajax=True) is really slow. I switched that to false and the page displays instantly now. But the appadmin/ccache page is still showing the cache at 0 even though it's recording hits (and db stats is not showing the query indicating that it

[web2py] Re: Slow queries or how to determine if cache is working?

2012-02-25 Thread pbreit
I realize that LOAD(ajax=True) could introduce a bit of a slow down but it seems much larger to me than I would expect. Does anyone else notice this? I originally used a bunch of ajax=True but I am switching to False and the pages are loading much faster. On Saturday, February 25, 2012

[web2py] Re: type 'exceptions.TypeError' float argument required occurs when registering a user on GAE SDK

2012-02-25 Thread Peter G.
Thanks Massimo, I'll update to trunk in that case.

[web2py] Re: Slow queries or how to determine if cache is working?

2012-02-25 Thread Anthony
On Saturday, February 25, 2012 11:04:30 PM UTC-5, pbreit wrote: I realize that LOAD(ajax=True) could introduce a bit of a slow down but it seems much larger to me than I would expect. Does anyone else notice this? I originally used a bunch of ajax=True but I am switching to False and the

[web2py] Re: Slow queries or how to determine if cache is working?

2012-02-25 Thread Anthony
But the appadmin/ccache page is still showing the cache at 0 even though it's recording hits (and db stats is not showing the query indicating that it is getting it from cache). And that's after just updating to a current appadmin.py. You might need to update /views/appadmin.html as

Re: [web2py] Re: Single error message for radio group

2012-02-25 Thread Bruce Wade
Hi Massimo, Your suggestion doesn't seem to be working: LI( H5(self.T('What is your Age?')), INPUT( _type='radio', _name='age', _value='1', _id='age1', requires = IS_NOT_EMPTY(error_message=self.T('missing your age')),

[web2py] Obtaining URL to image blob in GAE

2012-02-25 Thread Peter G.
How would one obtain the URL to a image blob stored on GAE's datastore? A lot of the threads I've looked at were all for generating an download output for views, but I need this for the Controller since I'm returning this as a JSON element. For example, the auth_user table has a field 'avatar'

Re: [web2py] jqGrid to SmartGrid - Who's made the switch?

2012-02-25 Thread Phyo Arkar
I still prefer JQGrid many places. It is the best grid solution in existance still. But now, with the switch to qooxdoo i have to dump it and replace with qooxdoo's table coz it wont fit inside qooxdoo , in design, oo style of programming and UI. I still miss jqgrid and its remote capabilities