On Feb 9, 6:14 am, Carlos Man wrote:
> I also thing "Fran Boone" should be spelled "Frank Boone", but I
> haven't got time now to verify that one.
Fran Boon actually ;)
So old translations not picked-up the typo corrections, eh? Easily
missed...
F
--~--~-~--~~~---~--
Thanks for that. The multiselect form for tags now works!!
On Feb 9, 5:12 pm, mdipierro wrote:
> Your example works but with two corrections discussed below:
>
> > mynewdb=SQLDB("sqlite://mynewdb.db")
> > import datetime
>
> > now = datetime.datetime.now()
>
> > mynewdb.define_table('tag',
> >
On Feb 8, 10:25 pm, mdipierro wrote:
> > > What other popular services are out there and should be supported out
> > > of the box?
>
> > full REST support might be a good one to add.
> Sorry I am slow today. can you make an example?
http://en.wikipedia.org/wiki/Representational_State_Transf
chris -
On Feb 9, 12:47 am, mdipierro wrote:
> Chris,
>
> would you fix my todo example and email it back to me? I will repost
> it.
chris, hi,
i'd like to know how that works, because there are now three
JSONRPCservice classes kicking about: one for web2py, one for django
and one for o
hello
On GAE i get 'SQLQuery' object has no attribute 'left' after adding a
few rows to table
Traceback (most recent call last):
File "/base/data/home/apps/aspekt-erp/1.331262110087268070/
applications/welcome/modules/t2.py", line 39, in t3_execute
p=xmlescape(environment['_res'])
File
It appears like it is trying to call str(query) where the query does
not have a left operator.
what happens if you change this: gql.py:591:
def __str__(self):
return str(self.left)
to this: gql.py:591:
def __str__(self):
return str(getattr(self,'left',''))
Robin
On Feb
Peter,
thanks for this I will have a go later (I'm in Dublin GMT), just one
thing
what needs to be set up to get the code to send the registration email
other wise when you enable authentication you are locking yourself out
as you can't register or login?
regards
chris
On Feb 8, 11:32 pm, Peter
While not relevant to web2py, I would like to see some example sites
that use Pyjamas. Luke, I've seen your homepage. Are there other
examples that we can see?
-tim
lkcl wrote:
> chris -
>
> On Feb 9, 12:47 am, mdipierro wrote:
>
>> Chris,
>>
>> would you fix my todo example and email it
Thanks for this wonderful framework!
There is a typo on the frontpage:
laguage should be: language
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to
thanks. fixed.
On Feb 9, 3:11 am, Rolfa wrote:
> Thanks for this wonderful framework!
>
> There is a typo on the frontpage:
> laguage should be: language
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web F
Hi Chris,
AFAIK you only need to configure the mailer as documented in the
tools.py source. There is an error in the docstring in the Mail class,
use the example code in the Auth class.
Check if you can reach the mail server that you configure by running
"telnet 25" and check that you get a conn
just emailed update but it started a new topic, sorry.
see http://groups.google.com/group/web2py/browse_thread/thread/0687f038e53a0e5c#
for update
Danny
On Feb 2, 3:37 pm, dhmorgan wrote:
> I'm currently trying to implement this. Have followed above
> instructions and it functions nearly com
Massimo, I just emailed a complete web2py app with the working code.
On Feb 8, 7:47 pm, mdipierro wrote:
> Chris,
>
> would you fix my todo example and email it back to me? I will repost
> it.
>
> I can also give access to the AlterEgo entry if you email me
> personally.
>
> Massimo
>
> On Feb 8
Here's what I ended up with on the server side (in web2py, it goes in
models/jsonrpc.py):
-
import gluon.contrib.simplejson as simplejson
import types
class JSONRPCService:
def response(self, id, result):
return simplejson.dumps({'version': '1.1', 'id':id,
Its alive!
#batch insert
>>> db.posts.insert([dict(count=i+1) for i in range(3)])
[1, 2, 3]
#batch update (with optional transactions)
>>> def inc(r): r.count+=1
>>> def dec(r): r.count-=1
>>> db.posts.update(1,[2,3],dict(count=0),dict(count=lambda v:
>>> v+2),dec,inc,count=lambda v: v-2)
3
#b
Note: this thread continues from thread of same name:
http://groups.google.com/group/web2py/browse_thread/thread/30eb9ee195b358cb/20f3cf32cfbc876e#20f3cf32cfbc876e
Additionally, I have now posted a how-to on webfaction for setting it
up there:
http://forum.webfaction.com/viewtopic.php?pi
I'm using T3 and using t2.display to list individual records.
Is there a way to remove certain fields from the display?
Specifically, when displaying the record, I can see the model
instance's id #, with this being the thing I wish to remove.
This is the code I'm using to grab the record from my
Massimo,
You are understandably cautious about using absolute urls, but sending
verification mails is one place where we really need them.
Currently, in tools.py line 646 you insert only the key into the
verification message; how about inserting the validation_url as well?
Line 360 could then b
in your db.py put:
db.tablename.exposes=['field1','field2']
only fields in [ ] will be shown
-wj
On Mon, Feb 9, 2009 at 8:41 AM, TakeTheStage wrote:
>
> I'm using T3 and using t2.display to list individual records.
> Is there a way to remove certain fields from the display?
>
> Specifically,
As mentioned before it is so the developer can put in their own messge.
-wj
On Mon, Feb 9, 2009 at 9:04 AM, Peter wrote:
>
> Massimo,
>
> You are understandably cautious about using absolute urls, but sending
> verification mails is one place where we really need them.
>
> Currently, in tools.p
from the README in the web2py 1.56.2 distribution:
#you can also define once for all
timestamp=SQLTable(None,'timestamp',
SQLField('created_on','datetime',
writable=False,
default=request.now),
SQLField('modified_on','da
> As mentioned before
I am aware that I can set message strings if I don't like them.
However, from my POV, email verification is *broken* out of the box.
Sure, a mail gets sent, but the link in that mail doesn't work. Do we
want to make it easy to use this stuff, or what? If this was discussed
b
> There's going to have to be different server classes because of the
> different api's of django, web2py, web.py. The one I posted above is
> not truly complete (it doesn't do service description for example),
> but it seems to do the basics correctly when tested with the pyjamas
> JSONRPC clien
Massimo,
I was looking through the archives and was looking to see if there was
any discussion on why file names are changed when they are upload when
the field is of type upload. I was looking at how plone does this and
it looks like it just retains the file name when you upload a file so
when
Hi Wes, on rereading --
maybe my earlier msg gave you the impression that I suggested fixing
the message string itself?? That wasn't what I meant, of course. I
referred to line 360 only to illustrate how a proposed fix would be
used.
Every verification mail will need a functioning (=absolute) lin
Hi,
thanks for the new release and all the effort you put in. Even if I am
new to web2py and not a seasoned Python programmer yet, the release
notes sound very promising and I look forward to experimenting
further.
My question:
Model files seem such a convenient location to place functionality
Welcome to Python and web2py!
There are two ways of looking at this issue.
1) "Model" refers to execution model upon which the controller is run
and view is rendered. In this view, it is entirely acceptable to put
these application-global things in a model file.
2) "Model" refers to data mod
I am for all of these. Send me a patch!
Massimo
On Feb 9, 9:17 am, Robin B wrote:
> Its alive!
>
> #batch insert>>> db.posts.insert([dict(count=i+1) for i in range(3)])
>
> [1, 2, 3]
>
> #batch update (with optional transactions)>>> def inc(r): r.count+=1
> >>> def dec(r): r.count-=1
> >>> db.p
I just looked at your code. If you're going application-wide. Why not
just put "response.menu = _menu()" in the model file. That way you
won't have to call it in the controller.
Here's an unrelated Python performance tip...try to avoid using
for-loops for building a list. The list.append()
This
> db.tablename.exposes=['field1','field2']
> only fields in [ ] will be shown
is the old T2 only notation. It still works with T2 and T3 but this is
the new way (since 1.56)
db.tablename.field1.writable=True
db.tablename.field2.writable=True
db.tablename.field3.writable=False
--~--~-
either
from gluon.sql import SQLTable
or better replace SQLTable with db.Table (since 1.56)
Massimo
On Feb 9, 10:08 am, Rolfa wrote:
> from the README in the web2py 1.56.2 distribution:
>
> #you can also define once for all
>
> timestamp=SQLTable(None,'timestamp',
> SQLField('crea
Thank you Chris.
Massimo
On Feb 9, 10:51 am, lkcl wrote:
> > There's going to have to be different server classes because of the
> > different api's of django, web2py, web.py. The one I posted above is
> > not truly complete (it doesn't do service description for example),
> > but it seems to
For 3 reasons:
1) avoid directory traversal attacks
2) avoid conflicts (two files uploaded with same name)
3) be able to identify which table and which record a file belongs to
from the file name itself.
Massimo
On Feb 9, 11:10 am, Wes James wrote:
> Massimo,
>
> I was looking through the archi
Mind that models are called in alphabetic order. I call my settings
file
0_database.py
0_googlemaps.py
0_etcetc.py
0_private.py (stuff that I do not want to go under version control)
Massimo
On Feb 9, 1:54 pm, Timothy Farrell wrote:
> I just looked at your code. If you're going application-
excellent
On Feb 9, 9:17 am, dhmorgan wrote:
> Note: this thread continues from thread of same name:
>http://groups.google.com/group/web2py/browse_thread/thread/30eb9ee195...
>
> Additionally, I have now posted a how-to on webfaction for setting it
> up there:
>http://forum.webfaction.co
Massimo,
I just downloaded web2py with svn. I installed t3 and have a field
with upload type. When I delete the file with the delete file check
box, the file does not get deleted from uploads as it has been
recently.
-wj
--~--~-~--~~~---~--~~
You received this
in http://mdp.cti.depaul.edu/examples/default/docs there is a broken
link that should point to the web2py applications with source code.
It points to http://mdp.cti.depaul.edu/applicances but it returns an
invalid function
--~--~-~--~~~---~--~~
You received this me
New feature in 1.56. You must set
db.tablename.fieldname.autodelete=True
On Feb 9, 2:14 pm, Wes James wrote:
> Massimo,
>
> I just downloaded web2py with svn. I installed t3 and have a field
> with upload type. When I delete the file with the delete file check
> box, the file does not get de
fixed. thanks.
On Feb 9, 2:16 pm, sebastian wrote:
> inhttp://mdp.cti.depaul.edu/examples/default/docsthere is a broken
> link that should point to the web2py applications with source code.
>
> It points tohttp://mdp.cti.depaul.edu/applicancesbut it returns an
> invalid function
--~--~-~
oops - that's right - need to remember some of these new changes...
-wj
On Mon, Feb 9, 2009 at 1:52 PM, mdipierro wrote:
>
> New feature in 1.56. You must set
>
> db.tablename.fieldname.autodelete=True
>
> On Feb 9, 2:14 pm, Wes James wrote:
>> Massimo,
>>
>> I just downloaded web2py with svn.
Thank you for your response, Tim. I didn't know that lists
comprehension performs better.
I assumed it to be mostly a short-hand notation inspired by a
functional programming style.
HC
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
The main benefit is for building lists (and dictionaries in Python 2.6+)
because list.append() has to allocate more memory at each call.
Using the list comprehension allows it to allocate memory just once
instead of N-times.
-tim
hcvst wrote:
> Thank you for your response, Tim. I didn't know
Hi Massimo,
is this a bug ?
the following model wont work on GAE:
db.define_table('potato',
# SQLField('size','float',default=0)
SQLField('size','double',default=0)
)
db(db.potato.id>0).delete()
if len(db(db.potato.id>0).select())==0:
db.potato.insert()
mydb=db(db.potato.id>0).select()
Correct me if I am wrong but I think
form.vars.field='value'
used to work whether or not the field was shown in the form or not.
It doesn't seem to work in 1.56.2 .
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"w
double is correct.
Currently you cannot insert an empty record
db.potato.insert()
even if fields have a default. I can change it.
On Feb 9, 4:08 pm, "Sebastian E. Ovide"
wrote:
> Hi Massimo,
>
> is this a bug ?
>
> the following model wont work on GAE:
>
> db.define_table('potato',
> # S
I just tried and it works for me. Can you show me your model?
Massimo
On Feb 9, 4:36 pm, DenesL wrote:
> Correct me if I am wrong but I think
>
> form.vars.field='value'
>
> used to work whether or not the field was shown in the form or not.
> It doesn't seem to work in 1.56.2 .
--~--~-
correction. You can insert an empty records if at least one field has
a default value. From your email it there seems to be a problem on
GAE.
@Robin. Can you double check this one?
Massimo
On Feb 9, 4:40 pm, mdipierro wrote:
> double is correct.
>
> Currently you cannot insert an empty record
Anyone else seeing "None" to the right of fields while editing data in
a form or editing models, settings, etc in Manage menu?
This is using t3
-wj
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framew
on created pages with forms "None" is too :D
On 10 Lut, 00:21, Wes James wrote:
> Anyone else seeing "None" to the right of fields while editing data in
> a form or editing models, settings, etc in Manage menu?
>
> This is using t3
>
> -wj
--~--~-~--~~~---~--~~
Yo
I think you are misunderstanding the error message.
BadValueError: Property size must be a float
The error message is saying you must pass in a 'float'ing point
number, and 0 is not a floating point number.
# This does not work
gdb = GQLDB()
gdb.define_table('potato',gdb.Field('size','double',d
the strange thing is that it works with SQLLITE ...
On Mon, Feb 9, 2009 at 10:05 PM, Robin B wrote:
>
> I think you are misunderstanding the error message.
>
> BadValueError: Property size must be a float
>
> The error message is saying you must pass in a 'float'ing point
> number, and 0 is not
"crappy...expensive...not confidence inspiring"
you're not being very constructive.
Phyo's offering a free web2py enabled hosting service and has an
advertisement for web2py on the front page - that's fantastic!
On Feb 8, 8:35 pm, Tokyo Dan wrote:
> I wonder when *Nix is going to correct the li
I will look into this for now:
for field in db.table.fields: db.table[fields].comment=''
On Feb 9, 5:56 pm, ANDROSoft wrote:
> on created pages with forms "None" is too :D
>
> On 10 Lut, 00:21, Wes James wrote:
>
> > Anyone else seeing "None" to the right of fields while editing data in
> > a
thank you Massimo :)
On Feb 9, 10:03 am, mdipierro wrote:
> I just wanted to acknowledge and thank Bill, Robin, Douglas, Fran, Wes
> and Luke for all the patches they sent me these days (averaging at
> more than 10 per day).
>
> I apologize if I have been slow in keeping up but I am also reviewi
Yes it is fantastic!
Massimo
On Feb 9, 6:23 pm, Baron wrote:
> Phyo's offering a free web2py enabled hosting service and has an
> advertisement for web2py on the front page - that's fantastic!
>
> On Feb 8, 8:35 pm, Tokyo Dan wrote:
>
> > I wonder when *Nix is going to correct the link
> > on
Yes. SQLDB does not always convert types. Robin, can you fix this else
I can do it.
Massimo
On Feb 9, 6:18 pm, "Sebastian E. Ovide"
wrote:
> the strange thing is that it works with SQLLITE ...
>
> On Mon, Feb 9, 2009 at 10:05 PM, Robin B wrote:
>
> > I think you are misunderstanding the error
db.define_table('calls',
SQLField('number','integer'),
SQLField('created','datetime')
)
def indexC():
return dict()
def updateC():
rows=db(db.calls.id==1).select()
form1=SQLFORM(db.calls,rows[0])
form1.vars.number=5
if form1.accepts(request.vars):
session.flash='form accepted!
Hello Massimo,
Any solution for this problem?
Thanks
ionel
On Feb 1, 9:26 am, mdipierro wrote:
> Let me try this
>
> On Feb 1, 9:41 am, ionel wrote:
>
> > I already did that:
>
> > 1) db.book.title.requires=IS_UPPER()
> > db.book.author.requires=IS_UPPER()
> > db.book.author.requires=IS_
I believe this is and should be the correct behaviour.
form.accepts happens after form.vars.number=5 is set, thus it should
store in form.vars.number whatever is in the form, unless the field
was not in the form to begin with.
Massimo
On Feb 9, 9:25 pm, DenesL wrote:
> db.define_table('calls'
Hi ionel,
it is not a bug. The validatior should be
db.book.author.requires=[IS_UPPER(), IS_NOT_IN_DB(db
((db.book.title==request.vars.get('title','').upper())&
(db.book.volume==request.vars.volume)),'book.author')]
since the title is in always in upper case in the db but it may not be
in upper
Sometimes I think that Massimo isn't a single person, but a collective
of young energetic hackers that wake each other in shifts to write
Python code around the clock :) Thanks for web2py!
On Feb 9, 7:44 pm, Lance wrote:
> thank you Massimo :)
>
> On Feb 9, 10:03 am, mdipierro wrote:
>
> > I j
This explains what all those loud voices in my head are! How do I make
them go away?
Massimo
On Feb 9, 11:17 pm, "mr.freeze" wrote:
> Sometimes I think that Massimo isn't a single person, but a collective
> of young energetic hackers that wake each other in shifts to write
> Python code around
def import_file():
form=FORM(INPUT(_type='file',_name='data'),INPUT
(_type='submit'))
if form.accepts(request.vars):
db.import_from_csv_file(form.vars.data.file)
# for every table
for table in db.tables: # for every uuid, delete
all but the most
items = db(db
I want to zip a file in a folder.
but with this error
TypeError: coercing to Unicode: need string or buffer, list found
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this gr
Do you have the traceback from the ticket?
Massimo
On Feb 9, 11:51 pm, INeedHelp wrote:
> def import_file():
> form=FORM(INPUT(_type='file',_name='data'),INPUT
> (_type='submit'))
> if form.accepts(request.vars):
> db.import_from_csv_file(form.vars.data.file)
> # for every table
>
please post code and traceback else it is hard to figure out what the
issue is.
Massimo
On Feb 9, 11:52 pm, INeedHelp wrote:
> I want to zip a file in a folder.
> but with this error
>
> TypeError: coercing to Unicode: need string or buffer, list found
--~--~-~--~~~-
import os
import zipfile
def zip():
form = FORM(TABLE("", INPUT(_type="submit",_value="SUBMIT")))
if form.accepts(request.vars):
uploaded_files = os.listdir([os.getcwd
(),'applications',request.application, 'uploads'])
zipf = zipfile.Zipfile(os.getcwd(),
'applications',
what do you mean?
On Feb 10, 1:58 pm, mdipierro wrote:
> Do you have the traceback from the ticket?
>
> Massimo
>
> On Feb 9, 11:51 pm, INeedHelp wrote:
>
>
>
> > def import_file():
> > form=FORM(INPUT(_type='file',_name='data'),INPUT
> > (_type='submit'))
> > if form.accepts(request.vars)
Hi Massimo
I have a problem here. One of my functions work perfectly in Version
1.47 (2008-10-27 12:36:17) but failed in Version 1.56.2 (2009-02-08
21:49:34) with this error
Traceback (most recent call last):
File "D:\web2py\gluon\restricted.py", line 98, in restricted
exec ccode in enviro
Traceback (most recent call last): File "/Users/mdipierro/web2py/
gluon/restricted.py", line 98, in restricted File "C:/Documents and
Settings/__/Desktop/web2py_win/web2py/applications/cynoteDup/
controllers/zip.py", line 24, in File "/Users/mdipierro/
web2py/gluon/globals.py", line 74, in F
sorry. should be this one
Traceback (most recent call last): File "/Users/mdipierro/web2py/
gluon/restricted.py", line 98, in restricted File "C:/Documents and
Settings/__/Desktop/web2py_win/web2py/applications/cynoteDup/
controllers/rep.py", line 31, in File "/Users/mdipierro/
web2py/gluon/g
import os
import zipfile
def zip():
form = FORM(TABLE("", INPUT(_type="submit",_value="SUBMIT")))
if form.accepts(request.vars):
uploaded_files = os.listdir([os.getcwd
(),'applications',request.application, 'uploads'])
zipf = zipfile.Zipfile(os.getcwd(),
'applications',
72 matches
Mail list logo