English 中文(简体)
web2py - load part of data
原标题:
  • 时间:2009-11-10 14:00:03
  •  标签:
  • web2py

i have table called "type" which contains data "family,individual" i want in some pages load individual only into type drop-down and in another pages load both

How can i do that??

Thanks in advance

最佳回答

Yes. You can set the default in the model:

db.yourtable.yourfield.requires=IS_IN_SET(( family , individual ))

In any action you can do

db.yourtable.yourfield.requires=IS_IN_SET(( family ))
问题回答

暂无回答




相关问题
how can I make between query with web2py.DAL?

I m trying to make a query function that accepts two datetime.date object(start_date and end_date), and return all records with a related field that s between start_date and end_date. However, I found ...

Is Google App Engine right for me?

I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store ...

Django for web2py developers

Now that I ve gotten relatively familiar with web2py, I d like to give Django a go. What are the main differences? What would be the most efficient way to get started taking into account web2py ...

Errno 5 caused througth web2py

The I/O error errno 5 are thrown when "print" is used. I don t know why?? server: redHat

web2py - display radio button into my form

i want to display a radio button into my from so i did: SQLField( active ,requires=IS_IN_SET(( True , False )),widget=SQLFORM.widgets.radio.widget) but it display an error: AttributeError: ...

How to pass a JSON object to web2py using JQuery Ajax

I ve used this method in .NET to pass data back and forth between client and server using JSON objects (both ways). I really liked the method and am looking to do something similar with web2py. ...

web2py - load part of data

i have table called "type" which contains data "family,individual" i want in some pages load individual only into type drop-down and in another pages load both How can i do that?? Thanks in advance

热门标签