We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not think it's very difficult to implement the use of domains in the definition of the fields.
A domain is a user-defined custom data type. It is used for defining the format and range of field
Now it can be implemented through a dictionary:
person_name = dict( type='string', length=100, requires=IS_NOT_EMPTY(), etc, etc ) db.define_table('my_table', Field('name', **dict(person_name)) )
but the proposal is to make it more explicit:
person_name = Domain( type='string', length=100, requires=IS_NOT_EMPTY(), etc, etc )
db.define_table('my_table', Field('name', domain=person_name) )
db.define_table('other_table', Field('other_name', domain=person_name) )
This is very comfortable when you want to change data types from many fields at once
The text was updated successfully, but these errors were encountered:
Please, open discussion in the forum.
This can be a starting point http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?#Custom-Field-types--experimental-
Paolo
2015-04-05 18:40 GMT+02:00 josejachuf [email protected]:
Do not think it's very difficult to implement the use of domains in the definition of the fields. A domain is a user-defined custom data type. It is used for defining the format and range of field Now it can be implemented through a dictionary: person_name = dict( type='string', length=100, requires=IS_NOT_EMPTY(), etc, etc ) db.define_table('my_table', Field('name', **dict(person_name)) ) but the proposal is to make it more explicit: person_name = Domain( type='string', length=100, requires=IS_NOT_EMPTY(), etc, etc ) db.define_table('my_table', Field('name', domain=person_name) ) db.define_table('other_table', Field('other_name', domain=person_name) ) This is very comfortable when you want to change data types from many fields at once — Reply to this email directly or view it on GitHub #127.
— Reply to this email directly or view it on GitHub #127.
Sorry, something went wrong.
extend sqlcustomform to support widget/represent (possible fix to web…
9c92bd1
…2py/pydal#127)
No branches or pull requests
Do not think it's very difficult to implement the use of domains in the definition of the fields.
A domain is a user-defined custom data type. It is used for defining the format and range of field
Now it can be implemented through a dictionary:
person_name = dict(
type='string',
length=100,
requires=IS_NOT_EMPTY(),
etc,
etc
)
db.define_table('my_table',
Field('name', **dict(person_name))
)
but the proposal is to make it more explicit:
person_name = Domain(
type='string',
length=100,
requires=IS_NOT_EMPTY(),
etc,
etc
)
db.define_table('my_table',
Field('name', domain=person_name)
)
db.define_table('other_table',
Field('other_name', domain=person_name)
)
This is very comfortable when you want to change data types from many fields at once
The text was updated successfully, but these errors were encountered: