[web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-05 Thread Massimo Di Pierro
It is LGPL not GPL. very different. ;-) On Jun 6, 12:36 am, Karel Antonio Verdecia Ortiz wrote: > Hi, > > I've been using the web2py template engine for a while. I don't remember > if I had to make some change to the template.py module nor the version > of the web2py this module comes from so I a

Re: [web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-05 Thread Karel Antonio Verdecia Ortiz
Hi, I've been using the web2py template engine for a while. I don't remember if I had to make some change to the template.py module nor the version of the web2py this module comes from so I attach it in this email. This was the way I could make it work (there is probably a simpler one):

[web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-05 Thread Ryan Seto
Thanks! That does solve the import restricted dependency. The import globals for the Response() object is still an issue. I tried fiddling with my copy to build a mock Response() object if we can't import globals. This is what I have so far: gluon/template.py | line 867 ~ # Here to avoi

[web2py] Re: How to Choose the Best Web Hosting Service

2011-06-05 Thread pbreit
Go with Webfaction or cloud (Amazon, Rackspace or Linode).

[web2py] Re: problem with upload field

2011-06-05 Thread pbreit
Not quite sure what you are asking. Are you not able to use Web2py's file uploading features? http://web2py.com/book/default/chapter/03#An-Image-Blog

[web2py] problem with upload field

2011-06-05 Thread cabildocl
Dear I need a help regarding a problem: I have an application in web2py, which manages a database in mysql, and I have an upload area to upload some audio files. Need from other applications also upload files to this table but not working. This function uses only one sql. SQL statement used herein

Re: [web2py] Re: still with problems at 1.96.3: is_active column not found

2011-06-05 Thread danto
2011/6/5 Massimo Di Pierro > You have migrations set to False. web2py needs to create a field > called is_active. Before it was called active and that created > problems. > > but my app is not that old... :3 I developed the application little time ago (1.94~95) and the is_active column of auth.si

[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2

2011-06-05 Thread Pepe Araya
Quoting Jonathan Lundell: It should be* IOError* (capital E) --- with that change it works.

Re: [web2py] 1.96.3 is OUT

2011-06-05 Thread Pepe Araya
With that change it works. open('/dev/urandom','wb').write(''.join(chr(t) for t in ctokens)) except IOError: # works anyway thanks!

[web2py] Possible regression selecting all from keyed tables

2011-06-05 Thread Kevin Ivarsen
Hi folks, At some point between 1.94 and 1.96, the DAL seems to have lost the (presumably supported) ability to select all entries from a keyed table. Consider the following test: db = DAL(None) db.define_table('mytable', Field('foo'), Field('bar'), primarykey=['foo']) db(db.mytable).selec

[web2py] How to not show the "delete file" checkbox

2011-06-05 Thread Luis Goncalves
Is there a way to avoid showing the "delete" file checkbox in a form? Thanks, Luis.

[web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-05 Thread Massimo Di Pierro
check trunk. I removed it. I am sure we can do better. On Jun 5, 2011, at 9:26 PM, Ryan Seto wrote: > Thank you very much for your prompt response. > > It looks like the file gluon/template.py does pull in some extra > dependencies, however. > > It tries to import restricted on line 20 and impo

[web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-05 Thread Ryan Seto
Thank you very much for your prompt response. It looks like the file gluon/template.py does pull in some extra dependencies, however. It tries to import restricted on line 20 and import globals on line 863. The restricted module dependency may be easy to remove, since it appears that it only use

Re: [web2py] 1.96.3 is OUT

2011-06-05 Thread Jonathan Lundell
On Jun 5, 2011, at 7:11 PM, Pepe Araya wrote: > Sorry, that is a duplicate message of this: > https://groups.google.com/d/msg/web2py/f3l_IOcx560/wNLyIfvSj6wJ > > After your recommendation, I added that line to utils.py and it works but > now, after a fresh install with the version in trunk other

Re: [web2py] 1.96.3 is OUT

2011-06-05 Thread Pepe Araya
Sorry, that is a duplicate message of this: https://groups.google.com/d/msg/web2py/f3l_IOcx560/wNLyIfvSj6wJ After your recommendation, I added that line to utils.py and it works but now, after a fresh install with the version in trunk other error appear : (posted here: https://groups.google.c

Re: [web2py] Re: Field reference type and notnull parameter

2011-06-05 Thread Stifan Kristi
a, i c, pardon me and thank you so much for correcting me, anthony. On Mon, Jun 6, 2011 at 9:00 AM, Anthony wrote: > On Sunday, June 5, 2011 9:52:23 PM UTC-4, 黄祥 wrote: >> >> i think notnull = TRUE is same like requires = IS_NOT_EMPTY() >> > > Not exactly -- notnull=True is enforced by the datab

Re: [web2py] Re: Field reference type and notnull parameter

2011-06-05 Thread Anthony
On Sunday, June 5, 2011 9:52:23 PM UTC-4, 黄祥 wrote: > > i think notnull = TRUE is same like requires = IS_NOT_EMPTY() > Not exactly -- notnull=True is enforced by the database, whereas requires=IS_NOT_EMPTY() is a validator that is enforced by web2py forms (as well as the DAL validate_and_inse

Re: [web2py] Re: App-generating wizard crashes

2011-06-05 Thread Jonathan Lundell
On Jun 5, 2011, at 5:28 PM, Massimo Di Pierro wrote: > > Can you help us debug this? > > In applications/admin/wizard.py > >if not > app_create(app,request,force=True,key=params['security_key']): >session.flash = 'Failure to create application' >redirect(URL('step6')) > >

Re: [web2py] 1.96.3 is OUT

2011-06-05 Thread Jonathan Lundell
On Jun 4, 2011, at 6:50 PM, Pepe Araya wrote: > In webfaction, I did a fresh install using their install script > (https://wiki.webfaction.com/wiki/Web2py-LatestSource) and I get this error: > > Traceback (most recent call last): > File "web2py.py", line 16, in > import gluon.widget > Fi

Re: [web2py] Re: Field reference type and notnull parameter

2011-06-05 Thread Stifan Kristi
i think notnull = TRUE is same like requires = IS_NOT_EMPTY()

[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2

2011-06-05 Thread Pepe Araya
Massimo, I did a fresh install with the new trunk and this is the traceback: Traceback (most recent call last): File "web2py.py", line 16, in import gluon.widget File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/__init__.py", line 15, in from globals import current File "/h

[web2py] Re: Small toolbar bug in 1.96.3

2011-06-05 Thread Massimo Di Pierro
I agree. Fixing in trunk! On Jun 5, 6:45 pm, Anthony wrote: > I agree -- I was confused at first when I noticed sometimes the generic html > view showed the request, response, and session buttons and sometimes it > didn't. Unless there's a good reason to only show the toolbar with multiple > resp

[web2py] Re: still with problems at 1.96.3: is_active column not found

2011-06-05 Thread Massimo Di Pierro
You have migrations set to False. web2py needs to create a field called is_active. Before it was called active and that created problems. On Jun 5, 6:26 pm, danto wrote: > bump > > 2011/6/5 danto > > > > > > > > > 2011/6/5 danto > > >> I'm still can get up my site after upgrading from 1.95.1. A

[web2py] Re: web2py 1.96.1 is OUT

2011-06-05 Thread Massimo Di Pierro
If this s the problem, I have a possible fix in trunk.Please give it a try. Yet I am not convinced this is the problem. On Jun 4, 5:20 pm, Pierre Thibault wrote: > 2011/6/3 Alessandro Iob > > > > > > > > > > > I have tried the new modules import feature (from mymodule import *, looks > > for mym

[web2py] Re: Get last inserted field value

2011-06-05 Thread Massimo Di Pierro
Also no-transactions (except for explicit record level transactions), no OR in joins, not joins, not select(distinct=True), no select(having=...). These are all GAE limitations. On Jun 5, 4:47 am, Phyo Arkar wrote: > Finally Here is what i found after an hr of digging web2py group: > > fmax=db.ta

[web2py] Re: 1.96.3 is OUT

2011-06-05 Thread Massimo Di Pierro
I need more information. Do you have a traceback? On Jun 5, 3:08 am, danto wrote: > 2011/6/4 Pepe Araya > > > now it works ok! > > > thanks!! > > it works for me too (also after reinstalling with webfaction's script), but > now in tables where I have auth.signature it does not recognize the > 'i

[web2py] Re: 1.96.3 is OUT

2011-06-05 Thread Massimo Di Pierro
This should now be fixed in trunk. Will report 1.96.4 as soon as confirmed. On Jun 4, 9:35 pm, Pepe Araya wrote: > In webfaction, I did a fresh install using their install script but i get > this error: > > Traceback (most recent call last): >   File "web2py.py", line 16, in >     import gluon.w

[web2py] Re: webfaction: Internal Server Error after upgrade to 1.96.2

2011-06-05 Thread Massimo Di Pierro
can you check the new trunk? If ok, I will post 1.96.4 On Jun 4, 5:45 pm, Pepe Araya wrote: > Massimo, bad news :( it not work > this is the log: > > [Sat Jun 04 17:41:31 2011] [error] [client 127.0.0.1]   File > "/home/pepearaya/webapps/crewcatalyst/web2py/gluon/html.py", line 29, in > > [Sat

[web2py] Re: App-generating wizard crashes

2011-06-05 Thread Massimo Di Pierro
Can you help us debug this? In applications/admin/wizard.py if not app_create(app,request,force=True,key=params['security_key']): session.flash = 'Failure to create application' redirect(URL('step6')) ### save metadata in newapp/ wizard.metadata meta = os.path.join(re

[web2py] Using web2py's view/template engine in a standalone application

2011-06-05 Thread Ryan Seto
I really like how elegant and simple it is to create views in web2py. Would it be possible to use the view/template engine in a standalone application? I'm writing a desktop application to view formatted text, like markdown, using PyQT's QtWebKit to render the generated html, and I would like to i

Re: [web2py] 1.96.3 is OUT

2011-06-05 Thread Pepe Araya
In webfaction, I did a fresh install using their install script ( https://wiki.webfaction.com/wiki/Web2py-LatestSource) and I get this error: Traceback (most recent call last): File "web2py.py", line 16, in import gluon.widget File "/home/pepearaya/webapps/crewcatalyst2/web2py/gluon/__ini

[web2py] How to Choose the Best Web Hosting Service

2011-06-05 Thread ebraheeem
some advices to guide you to choose the best host service through this link http://besthostservice.blogspot.com/ Be Happy and you can see some of the best host service for free on this link http://besthostservice.blogspot.com/

[web2py] Re: Small toolbar bug in 1.96.3

2011-06-05 Thread Anthony
I agree -- I was confused at first when I noticed sometimes the generic html view showed the request, response, and session buttons and sometimes it didn't. Unless there's a good reason to only show the toolbar with multiple response._vars, maybe we should change the behavior (particularly now t

[web2py] Re: response.js on regular requests.

2011-06-05 Thread Anthony
Can't you just include the relevant JS directly in the view template for the page, or maybe include the JS string in the dict returned by the controller, and insert it as a variable in the view? On Sunday, June 5, 2011 6:22:13 PM UTC-4, David J wrote: > How do I inject javascript in my controll

[web2py] Re: bug in dal.py with multicolumn primary keys

2011-06-05 Thread Kevin Ivarsen
Oops - looks like the fix already made its way into 1.96.2 or 1.96.3. Great! Kevin On Jun 2, 2:34 pm, Massimo Di Pierro wrote: > will fix this tonight. > > On Jun 2, 1:00 pm, Loren McGinnis wrote: > > > > > > > > > I'm bumping this message, because the bug still hasn't been fixed in > > the new

[web2py] Re: bug in dal.py with multicolumn primary keys

2011-06-05 Thread Kevin Ivarsen
I ran into this awhile back, and the following fix worked for me. There might be a cleaner way to do it, but I'll offer it here: if hasattr(table,'_primarykey'): fields = [(field.name, value) for field, value in fields] fields = dict(fields) return dict( [ (k,fields[k]) for k in table._prima

[web2py] Re: Small toolbar bug in 1.96.3

2011-06-05 Thread Kevin Ivarsen
I see - guess I hadn't noticed that behavior previously. For what it's worth, I found it to be surprising behavior today when I was testing it out. Kevin On Jun 5, 7:21 pm, Anthony wrote: > On Sunday, June 5, 2011 6:42:20 PM UTC-4, Kevin Ivarsen wrote: > > > I downloaded the new 1.96 release tod

[web2py] Re: still with problems at 1.96.3: is_active column not found

2011-06-05 Thread danto
bump 2011/6/5 danto > 2011/6/5 danto > >> I'm still can get up my site after upgrading from 1.95.1. After solving >> the problem with logging (importing it as J. Lundell said in another >> message) i'm running with another issue: after reinstalling with >> webfaction's script and uploading the

[web2py] Re: Small toolbar bug in 1.96.3

2011-06-05 Thread Anthony
On Sunday, June 5, 2011 6:42:20 PM UTC-4, Kevin Ivarsen wrote: > > I downloaded the new 1.96 release today to try out. I spotted one > small bug in generic.html - the toolbar is not shown if there is only > one variable sent to the template. Actually, I believe that is the intended behavior.

[web2py] Small toolbar bug in 1.96.3

2011-06-05 Thread Kevin Ivarsen
I downloaded the new 1.96 release today to try out. I spotted one small bug in generic.html - the toolbar is not shown if there is only one variable sent to the template. For example, given this controller: def test(): return dict(foo=1, bar=2) the toolbar shows up, but in: def test(): r

[web2py] response.js on regular requests.

2011-06-05 Thread David J.
How do I inject javascript in my controller from a regular web request? I read the docs it syas response.js is executed only in a component; so I have a form and I would like to add JS validators. so I try adding to the response.js = '$("myfield").validate("digits");' Of course this only works

[web2py] Re: Field reference type and notnull parameter

2011-06-05 Thread howesc
i'm not sure the official position on this, but my understanding is that notnull is for DB level restrictions, and requires is for CRUD and form validations. it's best to be explicit in my opinion, so setting notnull and the proper requires seems fine to me. cfh

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-05 Thread Alessandro Iob
If I'll find some free time I'll have a look at the code. Thank you very much for the help! On 5/6/11 19:51 , Pierre Thibault wrote: 2011/6/5 Alessandro Iob mailto:alessandro@gmail.com>> Hi Pierre, this is the output of the code from the web2py application shell: web2py Shel

[web2py] Re: still with problems at 1.96.3: is_active column not found

2011-06-05 Thread danto
2011/6/5 danto > I'm still can get up my site after upgrading from 1.95.1. After solving the > problem with logging (importing it as J. Lundell said in another message) > i'm running with another issue: after reinstalling with webfaction's script > and uploading the .w2p, tables where I have auth

Re: [web2py] Re: single virtual field definition for multiple table

2011-06-05 Thread Manuele Pesenti
cool! thanks a lot Manuele On 03/06/2011 16:05, Massimo Di Pierro wrote: db.define_table('itemx', Field('unit_price','double'), Field('quantity','integer'), db.define_table('itemy', Field('unit_price','double'), Field('quantity','integer'), clas

[web2py] still with problems at 1.96.3: is_active column not found

2011-06-05 Thread danto
I'm still can get up my site after upgrading from 1.95.1. After solving the problem with logging (importing it as J. Lundell said in another message) i'm running with another issue: after reinstalling with webfaction's script and uploading the .w2p, tables where I have auth.signature does not recog

[web2py] Re: Markmin nested list

2011-06-05 Thread snapy666
Ok, thanks. Can someone please add this? (Perhaps the initial developer, which is probably you, massimo xD) On 1 Jun., 00:36, Massimo Di Pierro wrote: > Not supported but should be. > > On May 31, 2:31 pm, snapy666 wrote: > > > > > > > > > Hello, > > > how can I make nested lists with markmin? W

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-05 Thread Pierre Thibault
2011/6/5 Alessandro Iob > Hi Pierre, > > this is the output of the code from the web2py application shell: > > web2py Shell Version 1.96.2 (2011-06-03 16:11:39) > In [1] : from selfgroup.castalia import config > > Traceback (most recent call last): > File "gluon/contrib/shell.py", line 233, in

[web2py] Re: web2py 1.96.1 is OUT

2011-06-05 Thread weheh
I already had from gluon.tools import * # the new way auth=Auth(db) # this causes error # the old way auth=Auth(globals(),db) # still works On Jun 5, 11:12 am, pbreit wrote: > I have this: > > from gluon.tools import Auth > auth = Auth(db)

[web2py] Re: Field reference type and notnull parameter

2011-06-05 Thread Marek Mollin
thanks, but I kinda answered myself. I mean it can be in database so is_not_in_db doesnt help at all... Its just -> it can be in database but it also can be null... On 5 Cze, 17:31, pbreit wrote: > Try something like this: > > db.person.name.requires = [IS_NOT_EMPTY >

[web2py] Re: Field reference type and notnull parameter

2011-06-05 Thread pbreit
Try something like this: db.person.name.requires = [IS_NOT_EMPTY (), IS_NOT_IN_DB (db, 'person.name')]

[web2py] Re: web2py 1.96.1 is OUT

2011-06-05 Thread pbreit
I have this: from gluon.tools import Auth auth = Auth(db)

Re: [web2py] Aw: Re: Web2py DAL way to find max value of a field?

2011-06-05 Thread Vasile Ermicioi
field = db.email_data.TimeStamp.max() row = db(db.email_data).select(field) print row[field]

[web2py] Re: web2py 1.96.1 is OUT

2011-06-05 Thread weheh
Amazing release! Congrats to all who helped. I came across some stuff while testing: - If I change auth=Auth(globals(),db) to auth=Auth(db) I get a ticket: Traceback (most recent call last): File "N:\web2py\gluon\restricted.py", line 188, in restricted exec ccode in environment File "N:/w

Re: [web2py] web2py 1.96.2 is OUT & security warning

2011-06-05 Thread Alexandre Andrade
the error in \var\log\apache2\error.log Traceback (most recent call last): File "", line 1, in File "gluon/__init__.py", line 15, in from globals import current File "gluon/globals.py", line 21, in from html import xmlescape, TABLE, TR, PRE File "gluon/html.py", line 29, in

Re: [web2py] web2py 1.96.2 is OUT & security warning

2011-06-05 Thread Alexandre Andrade
.I updated the new versions (1.96.1 and 196.2) and get a error of misconfiguration. the new versions use \dev\urandom but even but give a error in apache error log about permissions. Even chmod 777 or chown www-data:www-data in \dev\urandom can make it work in ubuntu 10.04 and ubuntu 11.04. Ale

[web2py] Aw: Re: Web2py DAL way to find max value of a field?

2011-06-05 Thread stephanl
Field has a max() method. Here is how to use with select(): https://groups.google.com/d/topic/web2py/NDspZcnhUaY/discussion

Re: [web2py] Re: Get last inserted field value

2011-06-05 Thread Phyo Arkar
Finally Here is what i found after an hr of digging web2py group: fmax=db.table.field.max(), fmin=db.table.field.min() fcount=db.table.field.count() fsum=db.table.field.sum()) rows = db(query).select(fmax,fmin,fcount,fsum) vmax=rows[0][fmax] vmin=rows[0][fmin] vavg=rows[0][fsum]/(rows[0][fcount] o

Re: [web2py] Re: Get last inserted field value

2011-06-05 Thread Phyo Arkar
I am also needing to find out max value of a field , seems like it is undocumented. Is it exist? Where in api doc should i look for. On 4/4/11, Anthony wrote: > On Monday, April 4, 2011 9:39:31 AM UTC-4, Neveen Adel wrote: >> >> Thanks a lot Massimo :) >> >> The problem with this solution is th

[web2py] Re: Web2py DAL way to find max value of a field?

2011-06-05 Thread Phyo Arkar
I mean , in SQL , can easily queried as 'Select MAX(TimeStamp) as "MaxTS" from email_data;' How should i do with Web2py's DAL? On 6/5/11, Phyo Arkar wrote: > I have not keep in touch with new features of web2py DAL since web2py > 1.7x , Can you guys list me a few shortcuts? i dont know where t

[web2py] Re: Field reference type and notnull parameter

2011-06-05 Thread Marek Mollin
I figured that I need two validators IS_NULL_OR(IS_IN_DB()) However I find it is a glitch, I will have a look in the source. I think if a field has notnull set to false it should accept null no matter what type it is... On 5 Cze, 00:53, Marek Mollin wrote: > Hello, > I ran into small problem. Whe

[web2py] Web2py DAL way to find max value of a field?

2011-06-05 Thread Phyo Arkar
I have not keep in touch with new features of web2py DAL since web2py 1.7x , Can you guys list me a few shortcuts? i dont know where to find in book too. I need to finx Max value of a field , sorting by desc and getting first result is easy but i do not want to repeat what is already there. is t

Re: [web2py] 1.96.3 is OUT

2011-06-05 Thread danto
2011/6/5 danto > 2011/6/4 Pepe Araya > >> now it works ok! >> >> thanks!! >> > > it works for me too (also after reinstalling with webfaction's script), but > now in tables where I have auth.signature it does not recognize the > 'is_active' column > I forgot to say that when I go through the sh

Re: [web2py] 1.96.3 is OUT

2011-06-05 Thread danto
2011/6/4 Pepe Araya > now it works ok! > > thanks!! > it works for me too (also after reinstalling with webfaction's script), but now in tables where I have auth.signature it does not recognize the 'is_active' column

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-05 Thread Alessandro Iob
Hi Pierre, this is the output of the code from the web2py application shell: web2py Shell Version 1.96.2 (2011-06-03 16:11:39) In [1] : from selfgroup.castalia import config Traceback (most recent call last): File "gluon/contrib/shell.py", line 233, in run File "", line 1, in File "gluon/