[web2py:15035] Re: Error with response.menu

2009-01-15 Thread Fran
On Jan 16, 4:55 am, Oscar wrote: > B.T.W. there is a way to modify login and registration form called by > t2 functions? The Views can be amended either by creating files called views/ login.html & views/register.html or else having in your controller functons defintions for these: response.view

[web2py:15034] Re: Unable to run web2py in a git workspace

2009-01-15 Thread ceej
BigBaaadBob, I can do what Robin suggested and have the blank dirs there using that code, so that won't be a problem from now on. Also the GIT repo is kept up by me so none of the other repos will have .gitignore :) On Jan 15, 9:14 pm, BigBaaadBob wrote: > Ceej is right, and I realized it right

[web2py:15033] Re: Unable to run web2py in a git workspace

2009-01-15 Thread BigBaaadBob
Ceej is right, and I realized it right after I posted. Git can't version empty directories. There is a long thread about it here, with Linux weighing in. http://kerneltrap.org/mailarchive/git/2007/7/17/251902. I don't know if anything has been done in Git to change this behavior. I'm not sure I

[web2py:15032] Re: Error with response.menu

2009-01-15 Thread Oscar
So... Thank you very much. what a dumb. B.T.W. there is a way to modify login and registration form called by t2 functions? Regards, Oscar. On 16 ene, 21:04, mdipierro wrote: > response.menu=[ >              [T('Main'),False,t2.action('index')], >              [T('Login'),False,t2.action('

[web2py:15031] Re: Error with response.menu

2009-01-15 Thread mdipierro
response.menu=[ [T('Main'),False,t2.action('index')], [T('Login'),False,t2.action('entrar')], [T('Register'),False,t2.action('registrarse')] ] the = is missing Massimo On Jan 15, 7:57 pm, Oscar wrote: > Hi, > > I'm just following the tutorial as

[web2py:15030] Error with response.menu

2009-01-15 Thread Oscar
Hi, I'm just following the tutorial as a base for concept app, i'm using response.menu for get a menu in my page but i getting the following error: Error traceback Traceback (most recent call last): File "/Users/ra/codigo_fuente/web2py/gluon/restricted.py", line 62, in restricted exec cco

[web2py:15029] Re: Unable to run web2py in a git workspace

2009-01-15 Thread Robin B
Better yet, add at .gitignore, since that directory should be ignored. Here is a on liner that recursively adds .gitignore to empty directories, so git will track the dir but not the contents. find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec touch {}/.gitignore \; Robin On Ja

[web2py:15028] Re: SELECT AS in web2py ?

2009-01-15 Thread Hector Paterno
Terrific, thank you ! On Thu, Jan 15, 2009 at 4:08 PM, mdipierro wrote: > > You can use as but only to rename tables. > > You need to do this the web2py way: > > counter=db.tickets.estado.count() > estados=db(db.tickets.estado==db.estados.id).select > (couner,db.estados.nombre,groupby=db.estados

[web2py:15027] Re: Unable to run web2py in a git workspace

2009-01-15 Thread ceej
The reason is it's missing the cache folder under admin/welcome/ example, the reason is GIT doesn't store emtpy folders in it. So any other empty folder will be missing also. I could add an __init__.py file to each folder which would fix this issue. What does everyone think? On Jan 15, 3:28 pm, m

[web2py:15026] Re: Unable to run web2py in a git workspace

2009-01-15 Thread mdipierro
I guess something is messed up in the GIT repository. Somebody should do a diff. I do not use GIT, can only guaranteed the Google and Launchpad repositories. Massimo On Jan 15, 12:57 pm, BigBaaadBob wrote: > If I do a SVN checkout from Google and then run web2py, everthing > works fine. > > If

[web2py:15025] Re: DRY field definitions - great but want more & in T2 :)

2009-01-15 Thread Fran
On Jan 15, 11:04 pm, Fran wrote: > I guess this is replaced by .represent, however that tracesback on me > even with the simplified example of represent=lambda value: H2(value) >  SQLField('feature',db.gis_feature,requires=IS_NULL_OR(IS_IN_DB > (db,'gis_feature.id','gis_feature.name')),represent=

[web2py:15024] DRY field definitions - great but want more & in T2 :)

2009-01-15 Thread Fran
Looking at this post, I defined my commonly-used fields once & then reuse more simply: http://groups.google.com/group/web2py/browse_thread/thread/fbd060364ab6227b timestamp (as per example) uuidstamp=SQLTable(None,'uuidstamp', SQLField('uuid',length=64, writab

[web2py:15023] Jytho 2.5b1 - Working almost

2009-01-15 Thread Phyo Arkar
We have tried to get Web2py running on Jython and so far we have get it running , Without DB Support. Jython do no have support for CPython Databases , so we have to use zxJDBC. We will need some help from someone who going to write zxJDBC supported DAL and i guess it wont be hard. To get Web2py

[web2py:15022] Re: What scripts are beeing reloaded under application directory

2009-01-15 Thread David Marko
Sorry I found this http://groups.google.com/group/web2py/browse_thread/thread/5383d7d8298c650a/7a4e535e682ec3bc?lnk=gst&q=modules#7a4e535e682ec3bc David On 15 Led, 22:46, David Marko wrote: > In my app in db.py I import function from script stored in 'modules' > directory in my application. But

[web2py:15021] What scripts are beeing reloaded under application directory

2009-01-15 Thread David Marko
In my app in db.py I import function from script stored in 'modules' directory in my application. But I have to restart web2py to see changes made in my script from modules directory. How the scripts are beeing reloaded in web2py app? db, controllers etc. are reloaded after any change. Does 'modul

[web2py:15020] Re: predefined label and SQLTABLE header

2009-01-15 Thread vince
i guess we can just do the straight forward one and simply output "Name, Name" and let the headers array overwrite the default label if it's a join table. -vince On Jan 16, 12:24 am, mdipierro wrote: > I was about to do this when I encountered a logical problem... > > db.define_table('table1',S

[web2py:15019] Editing in Chrome, Opera and IE8 Beta

2009-01-15 Thread mikech
When editing in Chrome and Opera, no line numbers show. In IE8 beta only 2 lines of the editor show, always numbered 1 & 2. When I enter on line 2 the text scrolls up but the numbers don't change Mike --~--~-~--~~~---~--~~ You received this message because you ar

[web2py:15018] Unable to run web2py in a git workspace

2009-01-15 Thread BigBaaadBob
If I do a SVN checkout from Google and then run web2py, everthing works fine. If I do the same thing using git, I get this: $ ./web2py.py default applications appear to be installed already web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2008 Version 1.55 (2009-01-0

[web2py:15017] Re: SELECT AS in web2py ?

2009-01-15 Thread mdipierro
You can use as but only to rename tables. You need to do this the web2py way: counter=db.tickets.estado.count() estados=db(db.tickets.estado==db.estados.id).select (couner,db.estados.nombre,groupby=db.estados.nombre) for row in rows: print row.estados.nombre, row._extra[counter] Massimo On Ja

[web2py:15016] SELECT AS in web2py ?

2009-01-15 Thread apaterno
Hi, I'm in a verry simple situation here with web2py estados=db(db.tickets.estado==db.estados.id).select('count (tickets.estado) AS counter', db.estados.nombre, groupby=db.estados.nombre) I'm trying to get the column name counter using the AS keyword query, the query works perfect but I got: "c

[web2py:15015] Re: predefined label and SQLTABLE header

2009-01-15 Thread mdipierro
I was about to do this when I encountered a logical problem... db.define_table('table1',SQLField('name',label='Name')) db.define_table('table2',SQLField('name',label='Name'),SQLField ('other_id',db.table1)) {{=db(db.table1.id==db.table2.other_id).select()}} this makes a JOIN so the table header

[web2py:15014] Re: Handling Sessions

2009-01-15 Thread mdipierro
you'll never be laughed at here. we do need better documentation. thanks for using web2py. Massimo On Jan 15, 8:35 am, LB22 wrote: > Hi again, > > Thanks for all the help. I was concerned I'd get laughed away. I think > somewhere along the line I got my wires crossed. I saw the counter > exampl

[web2py:15013] Re: datetime.date is not JSON serializable

2009-01-15 Thread Timothy Farrell
3) Good point. Currently all of our customers are (should be) in the same timezone. That may need some adjustment in the future. achipa wrote: > Yes, I've taken a brief look > > 1) agreed > 2) I got the impression the 'new Date..' is stored as string in the > JSON object, and thus it would be

[web2py:15012] Re: datetime.date is not JSON serializable

2009-01-15 Thread achipa
Yes, I've taken a brief look 1) agreed 2) I got the impression the 'new Date..' is stored as string in the JSON object, and thus it would be indistinguishable from a regular string field with the same content, but if it's just for eval-ing, it works (although I always get goosebumps when I see co

[web2py:15011] Re: Web2py manual

2009-01-15 Thread Timothy Farrell
So I googled "crop a pdf" and found this: http://www.pdfill.com/pdf_tools_free.html If you would like to crop down your manual, I used the measurements: Left: 0.35" Right: 1.55" Bottom: 1.45" Top: 0.45" It's not resized to a standard size but it still prints out very nicely for me. -tim Joel

[web2py:15010] Re: Handling Sessions

2009-01-15 Thread LB22
Hi again, Thanks for all the help. I was concerned I'd get laughed away. I think somewhere along the line I got my wires crossed. I saw the counter example in the (very draft) manual, but surely missed the point. I then found myself trying to use session.connect(...) in conjunction with session."

[web2py:15009] Re: Web2py manual

2009-01-15 Thread Joel Merrick
Yea, I was thinking along those lines, but wondered if it was some kind of flag within the PDF itself (for the crop marks) The resizing isn't an issue, just getting rid of those damn lines :) On Thu, Jan 15, 2009 at 2:13 PM, Timothy Farrell wrote: > > You could use imagemagick's convert command

[web2py:15008] Re: DAL subset supported by GAE

2009-01-15 Thread Robin B
> Using a composite key like this means a user's events are guaranteed to be > serialized. Guaranteed to be serialized should be: Fully scalable and serialized as much possible given the limitations of non-ascending ids, and clock skew in the distributed system. Robin On Jan 15, 8:10 am, Robi

[web2py:15007] Re: jQuery 1.3 released :)

2009-01-15 Thread mdipierro
Markus is right. We can include it. On Jan 15, 8:04 am, Timothy Farrell wrote: > That is true, Massimo will have to make that call. > > > > Markus Gritsch wrote: > > On Thu, Jan 15, 2009 at 2:47 PM, Timothy Farrell wrote: > > >> Negative.  web2py will (for the foreseeable future) maintain backw

[web2py:15006] Re: Web2py manual

2009-01-15 Thread Timothy Farrell
You could use imagemagick's convert command. But that is a very technical endevour into the bowels of command-line processing. (Notice none of us have done it yet.) -tim Coalescence wrote: > Hey guys, > > I bought the web2py manual a while back and was wanting to print it > out. > > Unfortun

[web2py:15005] Re: Handling Sessions

2009-01-15 Thread mdipierro
try this simple complete program (without session.connect(...)) def index(): if not session.c: session.c=0 session.c+=1 return dict(counter=session.c) when you reload the index page does it increment the counter? It not you ma have cookies disabled. By default sessions are handled f

[web2py:15004] Re: DAL subset supported by GAE

2009-01-15 Thread Robin B
Transactions and list properties are also not supported, until transactions are officially added to web2py, you can still do transactions this way: from google.appengine.ext import db as google_db def mytxn(db,id): record = db(db.table.id==id).select()[0] record.update_record(count=record.cou

[web2py:15003] Re: Handling Sessions

2009-01-15 Thread Timothy Farrell
See my comments below: Fran wrote: > On Jan 15, 7:10 am, LB22 wrote: > > > Session variables don't get stored within the DB, but purely with the > session global variable. > That's not totally correct. Sessions are (by default) stored in web2py/applications/appname/sessions/... as files

[web2py:15002] Re: DAL subset supported by GAE

2009-01-15 Thread Markus Gritsch
On Thu, Jan 15, 2009 at 3:05 PM, mdipierro wrote: > > db(db.table.id==id) and db(db.db.table.id>0) are in fact implemented > in web2py in a special way. Aha, interesting. I already wondered why I could use id in such a way, but not for sorting. Markus --~--~-~--~~~

[web2py:15001] Re: DAL subset supported by GAE

2009-01-15 Thread mdipierro
on GAE the record ID is not a column and cannot be used for sorting or in queries. db(db.table.id==id) and db(db.db.table.id>0) are in fact implemented in web2py in a special way. I agree we need better documentation. Robin is the master on this topic. Perhaps he can help us. Massimo On Jan 15

[web2py:15000] Re: jQuery 1.3 released :)

2009-01-15 Thread Timothy Farrell
That is true, Massimo will have to make that call. Markus Gritsch wrote: > On Thu, Jan 15, 2009 at 2:47 PM, Timothy Farrell wrote: > >> Negative. web2py will (for the foreseeable future) maintain backward >> compatibility. If a new version of a library (jQuery in this case) >> breaks softwa

[web2py:14999] Re: predefined label and SQLTABLE header

2009-01-15 Thread mdipierro
I agree. In 1.56. On Jan 15, 5:10 am, vince wrote: > i think SQLTABLE header should read the predefined label as well as > SQLFORM > > -vince --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" gr

[web2py:14998] Re: jQuery 1.3 released :)

2009-01-15 Thread Markus Gritsch
On Thu, Jan 15, 2009 at 2:47 PM, Timothy Farrell wrote: > > Negative. web2py will (for the foreseeable future) maintain backward > compatibility. If a new version of a library (jQuery in this case) > breaks software that is already out for web2py, that's breaking backward > compatibility. Feel

[web2py:14997] Re: datetime.date is not JSON serializable

2009-01-15 Thread Timothy Farrell
Did you look at my implementation? 1) Yes, this is a problem, but we can't get around it when we still need a solution. My solution works for Python 2.5 and 2.6 and the dates are supported in all major, modern browsers. 2) My implementation doesn't use strings in a JSON object. It relies on

[web2py:14996] Re: jQuery 1.3 released :)

2009-01-15 Thread Timothy Farrell
Negative. web2py will (for the foreseeable future) maintain backward compatibility. If a new version of a library (jQuery in this case) breaks software that is already out for web2py, that's breaking backward compatibility. Feel free to upgrade your own installation, but it cannot be includ

[web2py:14995] Re: web2py on dreamhost shell account?

2009-01-15 Thread Timothy Farrell
My guess would be to use a rule that looks something like: ('/path/to/site/(?P[\w\./_-]+)','/\g') Basically we want web2py to think that it is working at '/' when in fact it is working at '/path/to/site/' Try that. -tim richard.ree wrote: > For those interested I made some progress on my dre

[web2py:14994] Web2py manual

2009-01-15 Thread Coalescence
Hey guys, I bought the web2py manual a while back and was wanting to print it out. Unfortunately there's printer crop marks on all the pages.. is there any way to remove them do you know and scale the pages to A4? t.i.a. Joel --~--~-~--~~~---~--~~ You received th

[web2py:14993] Re: Handling Sessions

2009-01-15 Thread Fran
On Jan 15, 7:10 am, LB22 wrote: > I've been trying to figure out how to handle sessions but have made > little progress in the past couple of days. The manual, (and website) > states that web2py handles sessions for you... I took this to mean > that, beyond using session.connect(...) to initiate/

[web2py:14992] Re: doing a check for making a user and password

2009-01-15 Thread Fran
On Jan 15, 6:05 am, MadWalker wrote: > i trying to do a application that do a check > the table database take in user and password This is how T2 does it: if FORM.accepts(form,request.vars,session): rows=db(db.t2_person.email==form.vars.email)\ (db.t2_person.password==form.vars.pass

[web2py:14991] Re: able to set unique key column on a table?

2009-01-15 Thread notabene
On Jan 15, 7:01 am, MadWalker wrote: > hi, > > is it able to set a key column on a table to be unique > like for example; user name > if not, > is there another way to do it? > > Good day, > Madwalker in model file: db.define_table('table' db.field('name','string',unique=True)) #FORM VA

[web2py:14990] DAL subset supported by GAE

2009-01-15 Thread Markus Gritsch
Hi, is there some detailed information available on which DAL subset is available on GAE? The web2py book says that "You cannot perform complex queries on the datastore, in particular there are no JOIN, OR, LIKE, IN, and DATE/DATETIME operators". I used a query with an orderby=~db.person.id whi

[web2py:14989] Re: datetime.date is not JSON serializable

2009-01-15 Thread achipa
I believe json doesn't do this by default for at least a couple of reasons a) the solution would be programming language/version/application specific b) you can't differentiate strings from dates as json has no metadata on it's fields c) you'd have to stick to a RFC style complicated date parser

[web2py:14988] predefined label and SQLTABLE header

2009-01-15 Thread vince
i think SQLTABLE header should read the predefined label as well as SQLFORM -vince --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroup

[web2py:14987] Re: Web2py and FirebirdSQL

2009-01-15 Thread Petros Diveris
I quote from Firebird's documentation: Creating a Database You can define the default character set for a new database in the CREATE DATABASE statement: CREATE DATABASE USER PASSWORD PAGE_SIZE DEFAULT CHARACTER SET For example: CREATE DATABASE localhost:meter USER SYSDBA PASS

[web2py:14986] Re: jQuery 1.3 released :)

2009-01-15 Thread Markus Gritsch
On Thu, Jan 15, 2009 at 12:46 AM, mdipierro wrote: > > Actually I tested it earlier today. It broke KPAX. In particular the > search widget and the sortable items. So will it get included? --~--~-~--~~~---~--~~ You received this message because you are subscribed