I changed the web2py ajax.html date format and also used the IS_DATE
constraint to get the date in dd-mm- format. When I submit the data via
sqlform, everything is ok.but When I added an extra date element in the
sqlform and tried to insert it in a table using
I tried to use two sqlform.grid in a web2py form. It does work as intended
except for the problem that when I try to edit on of the form's row, other
form's row with same Id also appears to be edited. How should i stop it?
my controller:
def CommitmentBrowse_rep():
I am facing two problems in general with downloaded layouts from web2py
site:
1) whenever a form or table extends beyond the page body area, it goes
beyound the middle area's margin.In default layout, the middle area appears
to expand to accomodate the form or table.
2) In Sqlform.grid or
I have the following sqlform.grid:
COMMITMENTS=SQLFORM.grid((db.Commitments.Account==session.id),user_signature=False)
When I try to edit any row of the form, the edit is not committing. Is it
that the sqlform.grid does not allow edits for query arguments?
Is there a way to create a form from controller(or view) in web2py to have
variable number of fields depending on query?
To be more specific,I have following table in my model:
db.define_table('Commitments',Field('Account',requires=IS_IN_DB(db,db.Account_Master.id,
'%(Account)s
Hi!
I have the following table in my model:
db.define_table('Transaction_Master',Field('Account',db.Account_Master,requires=IS_IN_DB(db,'Account_Master.id',
'%(Account)s %(State)s',zero=T('choose
I added this extra element to my sqlform (as given in web2py book chapter
forms and validators):
form = SQLFORM(db.yourtable)
my_extra_element = TR(LABEL('I agree to the terms and conditions'), \
INPUT(_name='agree',value=True,_type='checkbox'))
How should i specify ondelete='Cascade' on the id attribute of the parent
table, since we do not usually specify the id attribute in web2py tables.
I have two tables:
db.define_table('Account_Master',Field('Account',requires=IS_NOT_EMPTY()),Field('Sewadari1'),Field('Mb1'),Field('Sewadari2'),Field('Mb2'),Field('City'),Field('District'),Field('State'),Field('Email'),Field('Remark'),format='%(Account)s
%(State)s ')
,
db.Transaction_Master.id,
lambda r: '%s %s %s' % (db.Account_Master[r.Account].Account, r.Exam_Date,
r.id))
))
With Regards,
rahulserver.
On Sunday, May 20, 2012 6:01:14 PM UTC+5:30, rahulserver wrote:
I have two tables:
db.define_table('Account_Master',Field('Account',requires=IS_NOT_EMPTY()),Field
I have 2 tables:
db.define_table('Transaction_Master',Field('Account',db.Account_Master,requires=IS_IN_DB(db,'Account_Master.id',
'%(Account)s %(State)s',zero=T('choose
I want to import data from excel sheets to the database in web2py. I wish
to validate the excel sheet before importing data from it.My table
structure is similar to
db.define_table('xlsheets',Field('name'),Field('xl','upload'),Field('filename'))
From this table, i will obtain the filename field
I am importing data from a csv file and the field declaration is
as:Field('Account',requires=IS_NOT_EMPTY(),unique=True). But no exception
is thrown when duplicate values for the field is imported! In one of the
posts, I have read that it is an sqllite specific issue which I am using
for
The insert function in web2py expects db.tablename.insert(...) with column
name and value pairs. What if the table has lengthy field names and i wish
to insert in the table by iterating through all the fields.
I tried:
for field in db[db.MyTable]:
nme='\''+field.name+'\''
I wish to generate a few reports in csv or txt or other file formats based
on some database data maintained through a crud application. Previously, it
was done through an asp.net application with vb as scripting language.But
as I explored the wonderful capabilities of web2py, I have become a
I wish to read an excel sheet in web2py.I tried few samples from python
codes which use the xlrd object.However in web2py, when I import the xlrd
object, I get the following error:
type 'exceptions.ImportError' No module named xlrd
So why is it like that? And is there any way to read an excel
Is it possible to validate CRUD form fields using ajax without submitting
the form in web2py?
I have gone through the web2py online doc and have seen this link:
http://web2py.com/books/default/chapter/29/11#Ajax-form-submission So we
may do it using custom html. But I want to do it using
17 matches
Mail list logo