[web2py] block problem in 1.81.5

2010-07-30 Thread BearXu
report block is not defined

[web2py] Re: Getting Eclipse / Pydev running

2010-07-30 Thread Rob
I have no issues with eclipse/pydev - sounds like from your initial message that maybe your eclipse/pydev install is broken - maybe try to redownload? Do you have something else running on that port? netstat -atun | grep 51530 Good luck! On Jul 30, 9:18 pm, pabloest wrote: > well, I guess I wi

[web2py] Re: Getting Eclipse / Pydev running

2010-07-30 Thread pabloest
well, I guess I will go with Wing, as it seems something is wrong with my method or setup... pablo On Jul 29, 2:08 pm, pabloest wrote: > Thanks, Christopher. > > At some point it may make sense for me to contribute my learnings to > the wiki. However, for now I'm just trying to get off the groun

[web2py] Re: Final Day for WAE Submissions!

2010-07-30 Thread Iceberg
On Jul 31, 2:12 am, NetAdmin wrote: > Web2py Application Exhibition > > Submissions must be e-mailed before > 12:59pm pm CST July 30, 2010 > > Do you have a Web2py app that you'd like to show the world? > If so, you may be interested in the Web2py Application Exhibition. > > The WAE is a way to...

Re: [web2py] Re: fun with metaclasses

2010-07-30 Thread Bruno Rocha
I completelly agree with Jonathan, I also want to have a deeper explanation on DAL backgrounds. web2py is Agile enough for me and for my development team, but, sometimes we spent more time trying to figure out "how to" to some things, and testing alternatives than developing real solutions. The b

Re: [web2py] Re: plugin_wiki - how to define the target to an external link?

2010-07-30 Thread Bruno Rocha
As i really didn't figure out how to implement what you propose, I decided to do it in the wrong way: in meta-code I defined: def elink(text,url,target='_blank'): """ >>>elink('Google','http://google.com') 'Google' >>>elink('Google','http://google.com','_self') 'Google' ""

Re: [web2py] Re: fun with metaclasses

2010-07-30 Thread Jonathan Lundell
On Jul 30, 2010, at 7:22 PM, Iceberg wrote: > On Jul 31, 1:15 am, Jonathan Lundell wrote: >> On Jul 30, 2010, at 9:19 AM, VP wrote: >>> On Jul 30, 9:35 am, mdipierro wrote: http://gluonframework.wordpress.com/2010/07/30/web2py-and-metaclasses/ >> >>> This is really nice. Please do more of

[web2py] Re: fun with metaclasses

2010-07-30 Thread Iceberg
On Jul 31, 1:15 am, Jonathan Lundell wrote: > On Jul 30, 2010, at 9:19 AM, VP wrote: > > On Jul 30, 9:35 am, mdipierro wrote: > >>http://gluonframework.wordpress.com/2010/07/30/web2py-and-metaclasses/ > > > This is really nice.  Please do more of this. > > My initial reaction is the opposite. The

[web2py] Re: "Why I hate Django" by Cal Henderson

2010-07-30 Thread Scott
I do not agree with item 1. Session data should never be stored client-side as it opens a rather large attack vector. The only thing which should be stored client-side is the session token in a secure, HTTPOnly cookie (which web2py currently supports). If cookies are disabled, a hidden POST fiel

Re: [web2py] What's the best way to get code completion / tooltip information ?

2010-07-30 Thread Stef Mientki
On 30-07-2010 05:17, Thadeus Burgess wrote: thanks Thadeus I think that whatt I'm looking for, have to try some options, as for instance importing 'globals' crashes my IDE. cheers, Stef > gluon. > > Look in gluon/compileapp.py in build_environment. You could use that > as a template for the autoco

Re: [web2py] Re: What's the best way to get code completion / tooltip information ?

2010-07-30 Thread Stef Mientki
thanks Massimo, but I want to use a Scintilla editor, so I think the answer of Thadeus comes closer. cheers, Stef On 29-07-2010 23:06, mdipierro wrote: > Edit this file: > > applications/admin/models/0.py > > and change > > TEXT_EDITOR = 'edit_area' or 'amy' > > into > > TEXT_EDITOR = 'amy' > >

[web2py] Final Day for WAE Submissions!

2010-07-30 Thread NetAdmin
Web2py Application Exhibition Submissions must be e-mailed before 12:59pm pm CST July 30, 2010 Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Sha

Re: [web2py] Re: Last Week for WAE ( Web2py Application Exhibition )

2010-07-30 Thread Mr admin
Sorry for the slow response. You can send he app as an attachment to mr.netadmin at gmail.com Thanks and good luck! On Wed, Jul 28, 2010 at 11:30 AM, Martin.Mulone wrote: > I make an application, that i developed in last two weeks. Where i > submit or mail to anyone? > > On Jul 22, 12:28 pm, N

Re: [web2py] Re: fun with metaclasses

2010-07-30 Thread Jonathan Lundell
On Jul 30, 2010, at 9:19 AM, VP wrote: > This is really nice. Please do more of this. > > On Jul 30, 9:35 am, mdipierro wrote: >> http://gluonframework.wordpress.com/2010/07/30/web2py-and-metaclasses/ My initial reaction is the opposite. The result might be more readable, but it doesn't strik

Re: [web2py] rewrite url using routes.py

2010-07-30 Thread Vasile Ermicioi
rename routes.example.py to routes.py

[web2py] Re: fun with metaclasses

2010-07-30 Thread mikech
Very nice - Dzoned http://www.dzone.com/links/r/web2py_and_metaclasses.html Mike On Jul 30, 7:35 am, mdipierro wrote: > http://gluonframework.wordpress.com/2010/07/30/web2py-and-metaclasses/

Re: [web2py] Re: fun with metaclasses

2010-07-30 Thread Michele Comitini
:D 2010/7/30 VP > This is really nice. Please do more of this. > > On Jul 30, 9:35 am, mdipierro wrote: > > http://gluonframework.wordpress.com/2010/07/30/web2py-and-metaclasses/ >

[web2py] Re: fun with metaclasses

2010-07-30 Thread VP
This is really nice. Please do more of this. On Jul 30, 9:35 am, mdipierro wrote: > http://gluonframework.wordpress.com/2010/07/30/web2py-and-metaclasses/

[web2py] rewrite url using routes.py

2010-07-30 Thread tandnk50
HI, can I rewrite url using routes.py? where, url repesented by domain name. I tried to follow routes.example.py but it didn't work routes_in = (('.*:/favicon.ico', '/examples/static/favicon.ico'), ('.*:/robots.txt', '/examples/static/robots.txt'), (('http://www.mydomain.

Re: [web2py] Re: encrypt source code

2010-07-30 Thread Jonathan Lundell
On Jul 30, 2010, at 8:32 AM, Michele Comitini wrote: > This is not possible in general. > If you do not want anyone to copy something than do not show it. > Think of writing a book that no one can read... Right. It's worth making a distinction, too, about how an application gets distributed. I

[web2py] Re: FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread mwolfe02
Massimo, Per your first post: If I run the query using DAL, I get a Decimal type back for both environments. Of course, there is no way for web2py to make that coercion for fields returned from .executesql. Since that minimizes the pain greatly for me, I think I will just go ahead with explicit

Re: [web2py] Re: encrypt source code

2010-07-30 Thread Michele Comitini
This is not possible in general. If you do not want anyone to copy something than do not show it. Think of writing a book that no one can read... Maybe copyright could be the right way to protect you work? 2010/7/29 ilovesss2004 > Now I know the web app will work just with the pyc files, and ot

Re: [web2py] Re: FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread Michael Wolfe
Touché! Point taken on the commercial software :) As a fall-back plan, there is an acceptable workaround. I can explicitly convert the floats I receive into Decimals. Based on Massimo's post, it looks like this will only be an issue for money fields returned from a .executesql statement. F

[web2py] Re: Webfaction deployment

2010-07-30 Thread mdipierro
of course ;-) appadmin sets session.secure() which turns the session cookie into a secure cookie and it cannot go over http, only https. You can disable this by commenting session.secure() in appadmin.py Massimo On Jul 30, 10:14 am, Iceberg wrote: > webfaction day2: the auto-logout probl

[web2py] Re: Webfaction deployment

2010-07-30 Thread Iceberg
webfaction day2: the auto-logout problem and why Many coincidence lead to the "auto-logout (lost session)" problem. Here is a how-to which you shall not follow. :-) Problem: Even the web2py welcome app on webfaction tends to ask me to re-login often, due to so

Re: [web2py] Re: FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread Michele Comitini
2010/7/30 mwolfe02 > Ideally, I'd like to avoid having to purchase a commercial product. > Alas you are using a commercial product. indeed this is what you should look at: http://www.egenix.com/products/python/mxODBCConnect/ That said it could be just a problem with the python adapter of freetd

Re: [web2py] Re: question/suggestion about URL, controller

2010-07-30 Thread Jonathan Lundell
On Jul 30, 2010, at 12:05 AM, mdipierro wrote: > You are right but it only breaks backward compatibility in a case > where things would be misleading. Here are some example: > > # old syntax that still works > URL('a','c','f') > URL(a='a',c='c',f='f') > URL(f='f',r=request) > > #new syntax that

[web2py] Re: FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread mdipierro
can you insert with db.table.insert(decimalfield=decimal(...))? On Jul 30, 9:43 am, mwolfe02 wrote: > I'm using .executesql.  I added a line to sql.py for debugging > purposes.  It returns the second column of the first row of results (a > SUM of a SQL Server money column): > > diff --git a/gluon

[web2py] Re: FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread mwolfe02
Massimo, I realize I didn't address your question about connecting to the same database. In my original post it did show that I was connecting to different databases (although the dev database is just a restore of the production database backup). However, I changed those lines to connect to the e

[web2py] Re: FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread mwolfe02
I'm using .executesql. I added a line to sql.py for debugging purposes. It returns the second column of the first row of results (a SUM of a SQL Server money column): diff --git a/gluon/sql.py b/gluon/sql.py --- a/gluon/sql.py +++ b/gluon/sql.py @@ -1389,6 +1389,7 @@ data = self._cu

[web2py] fun with metaclasses

2010-07-30 Thread mdipierro
http://gluonframework.wordpress.com/2010/07/30/web2py-and-metaclasses/

[web2py] Re: FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread mdipierro
Are they both connecting to the same database? Can you provide an example of how you insert and how you extract data? This is to understand the issue better. In fact gluon/sql.py contains the following code: ... elif field.type[:7] == 'decimal' and value != None: decimals = [

[web2py] Re: FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread mwolfe02
Ideally, I'd like to avoid having to purchase a commercial product. Plus, I don't think it would work. mxODBC appears to be a replacement for pyodbc. It looks like mxODBC uses FreeTDS just like pyodbc. The problem appears to be with FreeTDS, so mxODBC doesn't look like it would be a fix for my p

Re: [web2py] FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread Michele Comitini
you can try with mxodbc http://www.egenix.com/products/python/mxODBC/ 2010/7/30 mwolfe02 > For background, refer to related questions on SO: > http://stackoverflow.com/questions/3364699/ > http://stackoverflow.com/questions/3371795/ > > I'm developing my app on Windows, but will be deploying it

[web2py] FreeTDS returns MS SQL money type as Python float, not Decimal

2010-07-30 Thread mwolfe02
For background, refer to related questions on SO: http://stackoverflow.com/questions/3364699/ http://stackoverflow.com/questions/3371795/ I'm developing my app on Windows, but will be deploying it on a Linux server. The following lines are from the top of my db.py: if os.name=='posix': #Ubuntu

[web2py] Re: keepvalues per field?

2010-07-30 Thread mdipierro
a, has, current, please=db.define_table, Field, request.vars, crud the_thing=a('thing', has('name'), has('category')) my_things = db(thing.id>0) def index(): the_thing.category.default = current.category form = please.create(the_thing) things = my_things.select() return dict(

Re: [web2py] Re: keepvalues per field?

2010-07-30 Thread Johann Spies
On 26 July 2010 13:44, mdipierro wrote: > You can use > > db.table.field.default=previous_form.vars.field > > to propagate the values forward.. Where do I do this? I suppose the controller is the correct place, but do I do it in the same environment where I would use keepvalues? I don't want th

Re: [web2py] Re: question/suggestion about URL, controller

2010-07-30 Thread Michele Comitini
yes 2010/7/30 rochacbruno > I have a lot of code wrote in this sintax, But, ig its wrong, no problem to > replace. > > Will this still works? > > _href=URL(request.application,'plugin_wiki','page',args=[row,]) > > Sent from my iPhone > > On 30/07/2010, at 04:05, mdipierro wrote: > > You are ri

[web2py] Re: question/suggestion about URL, controller

2010-07-30 Thread mdipierro
Yes. Your example will work. The only case in where you would get wrong behaviour if you do: URL('otherapp',r=request) (*) or URL('otherapp','othercontroller',r=request) (**) I.e. if you say the URL is in the current request (r=request) and stil you specify the 'otherapp' and/or the 'othercontro

Re: [web2py] Re: question/suggestion about URL, controller

2010-07-30 Thread rochacbruno
I have a lot of code wrote in this sintax, But, ig its wrong, no problem to replace. Will this still works? _href=URL(request.application,'plugin_wiki','page',args=[row,]) Sent from my iPhone On 30/07/2010, at 04:05, mdipierro wrote: > You are right but it only breaks backward compatibility

[web2py] [Feature Request] js mimifier

2010-07-30 Thread Michele Comitini
1) it is nice to have the ability to debug javascript that comes with web2py. 2) it is a waste of bandwith to send full script. You can partially solve 2) if you work behind web server capable of sending compressed/gzip contents to clients willing to accept it, so that you can put all your jscrip

[web2py] New features not documented in PDF book (2 ed)

2010-07-30 Thread DenesL
New features not documented in the PDF book (2nd edition) as highlights in release order sequence (newest to oldest). If you find posts detailing the use of a specific feature in this list, email me to add them to the next revision. You can contribute by updating the online book http://web2py.com

Re: [web2py] Re: "Why I hate Django" by Cal Henderson

2010-07-30 Thread Michele Comitini
3) black magic IMHO. Would be nice to have some well defined path for the programmer to work on this, so that it could be seen as a separate layer for db configuration/tuning so that models can be left almost untouched on architectural changes. 2010/7/29 mdipierro > The speaker raises s

[web2py] Re: reset password mail as html mail

2010-07-30 Thread Rohan
Thanks Massimo, I copied the send() api to my tools.py and it worked. On Jul 30, 3:03 am, mdipierro wrote: > Please try the code in trunk. If the message is '' it > should be sent automatically in html. > > On Jul 29, 3:00 am, Rohan wrote: > > > > > I need to send reset password mail as ht

Re: [web2py] Re: Whats wrong with orderby, bug??

2010-07-30 Thread Phyo Arkar
Thanks Massimo!!! On 7/30/10, mdipierro wrote: > orderby = db.cdsdata[request.vars.sidx] > ... db( db.casedb.id > 0 ).select( orderby = orderby ): > > looks to me you are selecting db.casedb but pretend to order by > db.cddata. > > On Jul 30, 3:16 am, Phyo Arkar wrote: >> Here is my

[web2py] Re: Whats wrong with orderby, bug??

2010-07-30 Thread mdipierro
orderby = db.cdsdata[request.vars.sidx] ... db( db.casedb.id > 0 ).select( orderby = orderby ): looks to me you are selecting db.casedb but pretend to order by db.cddata. On Jul 30, 3:16 am, Phyo Arkar wrote: > Here is my function: > > in controller: > def rows(): > >     fields = ['

[web2py] Whats wrong with orderby, bug??

2010-07-30 Thread Phyo Arkar
Here is my function: in controller: def rows(): fields = ['id', 'filePath', 'fileName', 'cus', 'sentto', 'emailFrom', 'subject','cc','bcc','extracted','headers'] rows = [] page = int( request.vars.page ) max=request.vars.totalrows if max: pagesize = int(max) else:

[web2py] Re: Flash security

2010-07-30 Thread mdipierro
Thanks. From a quick read the issue is that amf callbacks should authenticate the user. The @auth.requires_login() should work for myamf callbacks although never used it myself. Massimo On Jul 30, 2:25 am, elffikk wrote: > I know that web2py aims to be secure, but if you use it with  amfrpc > s

[web2py] Flash security

2010-07-30 Thread elffikk
I know that web2py aims to be secure, but if you use it with amfrpc service that could be interesting to read http://www.ivizsecurity.com/blog/web-application-security/testing-flash-applications-pen-tester-guide/

[web2py] Re: plugin_wiki - how to define the target to an external link?

2010-07-30 Thread mdipierro
You can use the extra parameters to define behaviour yourself ``link http://``:link_target_blank extra = {'link_target_blank':lambda x: ' %s' % (x.rsplit(' ',1)[1],x.rsplit(' ',1)[0]) On Jul 29, 8:46 pm, Bruno Rocha wrote: > Any way to define the target="_blank" for  [["a link"http://so

[web2py] Re: plugin_wiki - how to define the target to an external link?

2010-07-30 Thread mdipierro
not at this time. It seems the wiki language should not assume the ability of accessing other windows. On Jul 29, 8:46 pm, Bruno Rocha wrote: > Any way to define the target="_blank" for  [["a link"http://someurl.com]] > > any way like this: [["a link"http://someurl.com"_blank";]] ??? > > -- > > h

[web2py] Re: question/suggestion about URL, controller

2010-07-30 Thread mdipierro
You are right but it only breaks backward compatibility in a case where things would be misleading. Here are some example: # old syntax that still works URL('a','c','f') URL(a='a',c='c',f='f') URL(f='f',r=request) #new syntax that resulted in an error before URL('f') URL('c','f') URL(f='f') URL(c