[web2py] Re: Forms not working with web2py in Chrome

2012-02-17 Thread Sameh Khalil
I'm running from the source version 1.99.4 from my own python 2.7 
installation, 

Model Code

db = DAL(sqlite://storage.sqlite)

db.define_table('image',
 Field('title', unique=True),
 Field('file', 'upload'),
 format = '$(title)s')

db.define_table('comment',
Field('image_id', db.image),
Field('author'),
Field('email'),
Field('body', 'text'))

db.image.title.requires = IS_NOT_IN_DB(db, db.image.title)
db.comment.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s')
db.comment.author.requires = IS_NOT_EMPTY()
db.comment.email.requires = IS_EMAIL()
db.comment.body.requires = IS_NOT_EMPTY() 

db.comment.image_id.writable = db.comment.image_id.readable = False



[web2py] Re: Forms not working with web2py in Chrome

2012-02-17 Thread Ross Peoples
I don't know if it helps, but I spotted a typo:

Replace the dollar sign in:

'image,
format = '$(title)s'

with

format ='%(title)s'


[web2py] Re: Forms not working with web2py in Chrome

2012-02-16 Thread Cliff
Do you have the little Web2py icon in the destination field? (Or
whatever Chrome calls it - the place where you type the URL.)

That would be your favicon.ico.  In the past, Chrome did really odd
things if favicon is missing and maybe it still does.

On Feb 16, 12:52 pm, Sameh Khalil thebook...@gmail.com wrote:
 I'm new to web2py and following the book, I'm trying to follow along with
 the 3rd Chapter building the images 
 applicationhttp://web2py.com/books/default/chapter/29/3#An-image-blog, I'm 
 faced with
 a problem after building the model and trying to add uploads using the
 database administration, it doesn't work in chrome, after filling the form
 and clicking submit, the page refreshes with cleared inputs as new. The
 form works with other browsers as expected (Firefox, Opera, IE) I'm running
 on Windows 7.

 Anybody knows what is causing such problem ??


[web2py] Re: Forms not working with web2py in Chrome

2012-02-16 Thread Sameh Khalil
the favicon exists and shows just fine

[web2py] Re: Forms not working with web2py in Chrome

2012-02-16 Thread Anthony
Can you show your exact model file code? What version of web2py? Are you 
running from source (with your own Python installation), or using the 
Windows binary?

Anthony

On Thursday, February 16, 2012 12:52:03 PM UTC-5, Sameh Khalil wrote:

 I'm new to web2py and following the book, I'm trying to follow along with 
 the 3rd Chapter building the images application 
 http://web2py.com/books/default/chapter/29/3#An-image-blog, I'm faced 
 with a problem after building the model and trying to add uploads using the 
 database administration, it doesn't work in chrome, after filling the form 
 and clicking submit, the page refreshes with cleared inputs as new. The 
 form works with other browsers as expected (Firefox, Opera, IE) I'm running 
 on Windows 7.

 Anybody knows what is causing such problem ??