[web2py] Re: Audit for all tables, independent of CRUD; and transaction rollback.

2012-07-13 Thread DJ
Thanks. Will check that out. On Friday, July 13, 2012 7:10:49 PM UTC-4, Massimo Di Pierro wrote: > > You need web2py trunk. > > > On Friday, 13 July 2012 16:07:18 UTC-5, DJ wrote: >> >> Hello, >> >> I have been trying to get auditing to work but run into the error below. >> W2P version: 1.99.7 /

[web2py] Re: Audit for all tables, independent of CRUD; and transaction rollback.

2012-07-13 Thread Massimo Di Pierro
You need web2py trunk. On Friday, 13 July 2012 16:07:18 UTC-5, DJ wrote: > > Hello, > > I have been trying to get auditing to work but run into the error below. > W2P version: 1.99.7 / Mysql 5.0 > > Any recommendations on how to fix this? > > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > > Traceback (m

[web2py] Re: Working with custom form

2012-07-13 Thread Massimo Di Pierro
I applied your line to auth_user: db.auth_user.password.requires = [IS_NOT_EMPTY(error_message='Password needed!'),IS_STRONG(min=7, special=0, upper=0, number=0), CRYPT()] and I cannot reproduce your problem. :-( There is something else in the logic that is passing a non-string to IS_STRONG()(

Re: [web2py] Re: query using groupby and distinct count

2012-07-13 Thread Massimo Di Pierro
In trunk: >>> db()._select(db.t.a.count(db.t.a)) 'SELECT COUNT(DISTINCT t.a) FROM t;' >>> db()._select(db.t.a.count()) 'SELECT COUNT() FROM t;' >>> db()._select(db.t.a.count(True)) 'SELECT COUNT(DISTINCT t.a) FROM t;' Thank nihlod. On Friday, 13 July 2012 15:09:01 UTC-5, Niphlod wrote: > > oo

[web2py] Re: Web2py using json

2012-07-13 Thread howesc
for GET/POST/PUT/DELETE/HEAD etc description perhaps start with http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods :) On Friday, July 13, 2012 1:34:41 AM UTC-7, Akash Kakkar wrote: > > Thanks Vinicius, > > Wish I had read your hint earlier, a GET did the job for me, for a n

[web2py] Help! IOErrors

2012-07-13 Thread Brian M
I'm having ongoing problems with IOErrors from one of my web2py apps deployed on Windows with Apache & mod_wsgi. Looks to me like the error maybe happening at a lower level before it even gets to my app code? Traceback (most recent call last): File "C:\\dashboard\\web2py\\gluon\\main.py", line

[web2py] Re: error pages with proper status code

2012-07-13 Thread Yarin
See this slice for custom error routing with correct status codes On Thursday, October 20, 2011 8:05:39 AM UTC-4, Grzegorz Śliwiński wrote: > > Currently it's quite impossible to maintain custom error pages for > HTTP 404 and sti

[web2py] Re: hi

2012-07-13 Thread Anthony
> > Alright, nobody has come out and said it - no, there are not a lot of > employers posting job offers for "Web2py". It seems in the python > frameworks space, I see most of them wanting "Django". > Yes, more jobs specifically for Django than web2py, but if maximum job postings is the main g

Re: [web2py] How to update the cached value?

2012-07-13 Thread Anthony
> > Right, you are using a ram cache, so you would have to explicitly > invalidate the cached items if you want to update them. I would not rely on > the time_expire to handle that for you, unless you are really not too > concerned about it. To be clear, the cached value will reliably get upd

[web2py] Re: Audit for all tables, independent of CRUD; and transaction rollback.

2012-07-13 Thread DJ
Hello, I have been trying to get auditing to work but run into the error below. W2P version: 1.99.7 / Mysql 5.0 Any recommendations on how to fix this? 1. 2. 3. 4. 5. 6. 7. Traceback (most recent call last): File "/home/www-data/web2py/gluon/restricted.py", line 205, in restricted exe

Re: [web2py] Re: new plugin - web2py Form Wizard - PowerFormWizard

2012-07-13 Thread Christian Espinoza
Hello Bruno, I did download the example app to test it, but i get this error: 'PowerFormWizard' object has no attribute 'readonly' do you know what can be the problem? Thanks in advance Christian. El jueves, 30 de junio de 2011 08:44:42 UTC-4, rochacbruno escribió: > > Even without client si

[web2py] Re: Custom 404 page with no 404 status

2012-07-13 Thread Yarin
See this slice for custom error handling with correct status codes On Tuesday, October 5, 2010 4:52:09 AM UTC-4, zdzana wrote: > > I created my own error pages for 400/404 using routes_onerror. This > works well, but the problem

[web2py] Re: error pages with proper status code

2012-07-13 Thread Yarin
See this slicefor custom error handling with correct status codes On Thursday, October 20, 2011 8:05:39 AM UTC-4, Grzegorz Śliwiński wrote: > > Currently it's quite impossible to maintain custom error pages for > HTTP 404 and st

[web2py] Re: Working with custom form

2012-07-13 Thread Chris
> I really need to see the models where you set IS_STRONG. > Somehow the value passed to the validator is not a string so the validator > chokes. This can be fixed in IS_STRONG.__call__ by setting value = > str(value) but I would like to understand why it is happening. Sure, this is the rele

Re: [web2py] Re: query using groupby and distinct count

2012-07-13 Thread Niphlod
key, I finally got it (I guess). Men, sometimes reading through lines of posts without examples is hard! @all: we're circling around here because no distinctions were properly made in this thread for count() as a method attached to the Field vs the count() method attached to the table. @Fa

Re: [web2py] How to update the cached value?

2012-07-13 Thread Derek
Right, you are using a ram cache, so you would have to explicitly invalidate the cached items if you want to update them. I would not rely on the time_expire to handle that for you, unless you are really not too concerned about it. The idea of caching is so that expensively computable objects,

Re: [web2py] Re: query using groupby and distinct count

2012-07-13 Thread Fabiano Faver
My example is written in a previous post. Last one before today. What is in book and what im trying to do. Em 13/07/2012 14:26, "Massimo Di Pierro" escreveu: > What need to be distinct? can you provide an example of data? > > On Friday, 9 March 2012 13:51:25 UTC-6, Fabiano Faver wrote: >> >> I'm

[web2py] Re: hi

2012-07-13 Thread Derek
Alright, nobody has come out and said it - no, there are not a lot of employers posting job offers for "Web2py". It seems in the python frameworks space, I see most of them wanting "Django". On Thursday, July 12, 2012 2:52:26 AM UTC-7, ahmad wrote: > > please anyone can tell me about the web2py

[web2py] Re: Problems with using downloaded layouts

2012-07-13 Thread Christian Espinoza
I'm newbie too, but I know that all layout's are only a html skeleton, you can modify it freely or create your own layout plugin If you want you can uninstall this layout plugin without problems from the admin interface. Good Luck Christian. El lunes, 18 de junio de 2012 07:24:09 UTC-4, rahul

Re: [web2py] Re: Connection timed out - mysql

2012-07-13 Thread Marcello Parra
No. I'll do that. Thanks again. On Fri, Jul 13, 2012 at 3:20 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > No but this should be reported to the pysqldb folks. > Would you mind opening an issue there? > > massimo > > > On Friday, 13 July 2012 13:10:14 UTC-5, Marcello wrote: >> >>

Re: [web2py] Re: Connection timed out - mysql

2012-07-13 Thread Massimo Di Pierro
No but this should be reported to the pysqldb folks. Would you mind opening an issue there? massimo On Friday, 13 July 2012 13:10:14 UTC-5, Marcello wrote: > > Massimo, > > Yes. You are right. > With mysqldb worked fine. > > Is there any problem to use mysqldb ?? > > > > On Fri, Jul 13, 2012 at

Re: [web2py] Re: Connection timed out - mysql

2012-07-13 Thread Marcello Parra
Massimo, Yes. You are right. With mysqldb worked fine. Is there any problem to use mysqldb ?? On Fri, Jul 13, 2012 at 12:52 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > To narrow down the problem. Django uses mysqldb, not pymysql. Could you > try switch to mysqldb with web2py?

[web2py] Re: query using groupby and distinct count

2012-07-13 Thread Massimo Di Pierro
What need to be distinct? can you provide an example of data? On Friday, 9 March 2012 13:51:25 UTC-6, Fabiano Faver wrote: > > I'm tryng to do something similar to what i saw at web2py book but i need > them to be distinct > > Book: > http://web2py.com/books/default/chapter/29/6#Grouping-and-coun

[web2py] trunk 2012-06-17 smartgrid ignoring linked table - can't figure out why

2012-07-13 Thread Cliff Kachinske
Does anybody have a clue about what's going on? Here is the list of linked tables. linked_tables = ['user_preference', 'auth_membership',], Smartgrid makes a link to auth_membership, but ignores user_preference. This is the model for user_preference. db.define_table('user_prefe

[web2py] Re: query using groupby and distinct count

2012-07-13 Thread Fabiano Faver
I still don't know how manage this. Anyone? Em quinta-feira, 8 de março de 2012 11h20min17s UTC-3, Fabiano Faver escreveu: > > I`m trying to select distinct printers used in each day but i`m not > managing to use the distinct argument > > count = db.contadores.id_impressora.count() > for row in

[web2py] Re: Scheduler: help us test it while learning

2012-07-13 Thread Massimo Di Pierro
I guess you could create a task that checks for recent failed tasks and sends an email about them. On Friday, 13 July 2012 03:01:31 UTC-5, David Marko wrote: > > Just tested on latest web2py from trunk and Pythzon 2.7.3 on Win7. >> Everything seems to working as expected. > > > One question: is

[web2py] Re: Working with custom form

2012-07-13 Thread Massimo Di Pierro
I really need to see the models where you set IS_STRONG. Somehow the value passed to the validator is not a string so the validator chokes. This can be fixed in IS_STRONG.__call__ by setting value = str(value) but I would like to understand why it is happening. On Friday, 13 July 2012 11:06:29

[web2py] Re: displaying errors for list:string types

2012-07-13 Thread joe
Thanks! On Friday, July 13, 2012 9:54:30 AM UTC-5, Niphlod wrote: > > uhm, I tested your on trunk, and also switched some things because I don't > have db.raw_material and db.run_as_rm, but > > def add_composition(): > form = SQLFORM.factory( > Field('dog_id', requires = IS_EMPTY_OR(I

[web2py] Re: Working with custom form

2012-07-13 Thread Chris
Any further suggestion to what causes the error I'm seeing? Thanks!

Re: [web2py] Re: Connection timed out - mysql

2012-07-13 Thread Massimo Di Pierro
To narrow down the problem. Django uses mysqldb, not pymysql. Could you try switch to mysqldb with web2py? import mysqldb from gluon.dal import MySQLAdapter MySQLAdapter.driver = mysqldb db=DAL('mysql://') Anyway, it is hard to know for sure without looking at your code. For example web2py

[web2py] Re: Using MARKMIN helper causes HELPER.elements() function to produce wrong output

2012-07-13 Thread Massimo Di Pierro
Just to clarify to other readers. that is a representation issue. Not really a functional one. In fact: >>> test = DIV(MARKMIN('**a**'), SPAN('b')) >>> print str(test) ab which is what is expected. On Friday, 13 July 2012 04:20:19 UTC-5, Liam wrote: > > Unless this is expected behaviour... > >

[web2py] Re: Cython and gluon/html.py

2012-07-13 Thread Massimo Di Pierro
we are discussing your email on web2py-devalopers. Please joins us. On Friday, 13 July 2012 08:05:13 UTC-5, marius.v.niekerk wrote: > > At present a cython compiled version of html.py is not possible due to > http://trac.cython.org/cython_trac/ticket/639 > > This means that you can't have funct

[web2py] Re: web2py 2.0: New in National Languages Support Subsystem (was: en to en - Can I do this with T?)

2012-07-13 Thread Massimo Di Pierro
+1 On Friday, 13 July 2012 07:19:21 UTC-5, dbdeveloper wrote: > > web2py 2.0: New in National Languages Support SubsystemUse default.py (new > future, now in trunk): > > New in National Languages Support Subsystem: 1. Improved Algorithm For > Selecting Appropriate Translation Language From Exist

Re: [web2py] Re: Connection timed out - mysql

2012-07-13 Thread Marcello Parra
My "Connection timed out" problem continues with trunk also. I also testes the same queries using Django. No problem. I tested many times. On Thu, Jul 12, 2012 at 9:25 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > The Assertion error comes from pymysql which ships with web2py. I

[web2py] Re: displaying errors for list:string types

2012-07-13 Thread Niphlod
uhm, I tested your on trunk, and also switched some things because I don't have db.raw_material and db.run_as_rm, but def add_composition(): form = SQLFORM.factory( Field('dog_id', requires = IS_EMPTY_OR(IS_IN_SET(['a','b','c']))), Field('cat_id', requires = IS_EMPTY_OR(IS_IN_

[web2py] Re: displaying errors for list:string types

2012-07-13 Thread joe
Just a note, this seems to fail in other situations as well My code: def add_composition(): form = SQLFORM.factory( Field('dog_id', requires = IS_EMPTY_OR(IS_IN_DB(db, db.raw_material))), Field('cat_id', requires = IS_EMPTY_OR(IS_IN_DB(db, db.run_as_rm))), Field('numb

Re: [web2py] Re: hi

2012-07-13 Thread Bruce Wade
As for finding a job over the past few years I have learned if you want work as a programming and that is your primary goal, learning only one framework is not going to help much. The reason is simple when you want a job you have to programming in, most of the time what the company wants. For exam

[web2py] Re: Using MARKMIN helper causes HELPER.elements() function to produce wrong output

2012-07-13 Thread Liam
Thanks for the quick reply Anthony. For now I'll use a workaround. On Friday, July 13, 2012 2:53:41 PM UTC+2, Anthony wrote: > > At least for now, that does appear to be intentional: > http://code.google.com/p/web2py/source/browse/gluon/html.py#2380 (note, > an alternative is suggested in the co

[web2py] Re: How to update the cached value?

2012-07-13 Thread Anthony
> >I am new to web2py these 2 days, while i am confused about how to > update the cached value when i read the manual, the below section. >as it explains: >*the value "Hello" will be retrieved from the cache, and it will not > be updated with "Goodbye"*. >Does it means the second

Re: [web2py] How to update the cached value?

2012-07-13 Thread Richard Vézina
Hello, If you have some concern about when the cached value will be update in order to make sure your users get the latest correct information you can just clear cache where in your code you want that the value to be caching get "re-cache" (or update) Here how to do it : "This is a good point. F

[web2py] Cython and gluon/html.py

2012-07-13 Thread marius.v.niekerk
At present a cython compiled version of html.py is not possible due to http://trac.cython.org/cython_trac/ticket/639 This means that you can't have functions with attributes. in html.py the after the function definition for URL() is closely followed by URL.verify = verifyURL This leads to a

[web2py] Re: No handlers could be found for logger web2py

2012-07-13 Thread adohertyd
Ok managed to sort it. Uninstalled python and pywin32. Reinstalled 32 bit version of python and ran pywin32 installer in compatibility mode after seeing someone posting an issue in a different forum. Problem solved On Friday, 13 July 2012 13:18:06 UTC+1, adohertyd wrote: > > I had initially inst

[web2py] Re: Using MARKMIN helper causes HELPER.elements() function to produce wrong output

2012-07-13 Thread Anthony
At least for now, that does appear to be intentional: http://code.google.com/p/web2py/source/browse/gluon/html.py#2380 (note, an alternative is suggested in the comment). Anthony On Friday, July 13, 2012 5:20:19 AM UTC-4, Liam wrote: > > Unless this is expected behaviour... > > In the example b

[web2py] How to update the cached value?

2012-07-13 Thread david xiao
Hi, I am new to web2py these 2 days, while i am confused about how to update the cached value when i read the manual, the below section. as it explains: *the value "Hello" will be retrieved from the cache, and it will not be updated with "Goodbye"*. Does it means the second statement

[web2py] web2py 2.0: New in National Languages Support Subsystem (was: en to en - Can I do this with T?)

2012-07-13 Thread dbdeveloper
web2py 2.0: New in National Languages Support SubsystemUse default.py (new future, now in trunk): New in National Languages Support Subsystem: 1. Improved Algorithm For Selecting Appropriate Translation Language From Existing In "languages/" Directory Previously it was necessary to exactly indi

[web2py] No handlers could be found for logger web2py

2012-07-13 Thread adohertyd
I had initially installed the binary version of web2py with Python version 2.5 built in. I needed 2 or 3 modules that were only compatible with version 2.7 so I installed the source version of web2py instead and downloaded the 64 bit version of pywin32. All was working fine. I then needed to in

[web2py] Using MARKMIN helper causes HELPER.elements() function to produce wrong output

2012-07-13 Thread Liam
Unless this is expected behaviour... In the example below, I expected one DIV, one SPAN and maybe one P when using the .elements() function. However, the MARKMIN input always gets included as a raw string, even when passing 'span' as an argument. >>> test = DIV(MARKMIN('**a**'), SPAN('b')) >>> t

[web2py] Re: Web2py using json

2012-07-13 Thread Akash Kakkar
Thanks Vinicius, Wish I had read your hint earlier, a GET did the job for me, for a newbie GET and POST can be confusing. Infact a little description on GET / POST and when to use would have helped. On Saturday, 7 July 2012 11:17:32 UTC+5:30, Akash Kakkar wrote: > > Hi, > > I want to send st

[web2py] Re: hi

2012-07-13 Thread Akash Kakkar
Finding a Job depends on your capabilities and experience. Learning Web2py and developing an application would help you learn how to develop Web applications fast, in the process you will learn a little about python and your MVC concepts will get better. Showcasing your capabilities thereafter

[web2py] Re: 'best' way to include a JavaScript file

2012-07-13 Thread Akash Kakkar
I use this in my view : This works, Anyone please correct me if I am not right. On Friday, 13 July 2012 08:19:44 UTC+5:30, MichaelF wrote: > > I want to include a JavaScript file, but only for certain views. What's > the best way to include it? Do I have the controller append it to the > resp

[web2py] Re: Scheduler: help us test it while learning

2012-07-13 Thread David Marko
> > Just tested on latest web2py from trunk and Pythzon 2.7.3 on Win7. > Everything seems to working as expected. One question: is there a way how to define function that is run when task failes? I mean situation I would like to add some mail notification on fail or something? e.g. onFailure