Here is it:
ps: is not there an easier way to suggest changes to the codes, than
creating a new project on googlecode, and commit changes to that
branch, and after the patch is accepted, delete the branch, and then
for the next typo again, and again...
Is not that possible, that everyone can comm
>> > On Jan 1, 9:48 am, pihentagy wrote:
>> > The sytnax is Field(name, type). The default type is a string. If you
>> > want it to be a reference it has to said explicitly. You do the same
>> > in Django. The validator is optional and, in fact, since 1.74 you get
>> > that validator by default if
> Please never assume that something that is not done by default cannot
> be done.
>
> db.whatever.partner.requires.zero="Please Select One"
Again, where can I find info about the zero argument?
It is mentioned at
http://www.web2py.com/examples/static/epydoc/web2py.gluon.validators.IS_IN_DB-class
And do tables have represent?
if I specify a format string in define_table, isn't it a shortcut to
setting the represent attr of the table?
On Wed, Jan 6, 2010 at 01:54, mdipierro wrote:
> Sorry. I am not sure I understand the question.
>
> This is not a valid expression:
>
> db.post.widget =
Yes, AFAIK appadmin is a T2 thing.
So, I wonder how can one rewrite the line below using
db.post.represent (still that is more flexible)
db.define_table('post',
Field('title',length=256),
Field('body','text',requires=IS_NOT_EMPTY()),
Field('author',db.auth_user),
format='%(title)s
deprecated long ago.
>
> I guess you can still define db.post.represent but I am not sure what
> do you want to do with it. What behavior do you expect? Can you
> provide a concrete example?
>
>
> On Jan 7, 9:31 am, "KONTRA, Gergely" wrote:
>> Yes, AFAIK appadm
st',db.post,writable=False,readable=False),
> Field('author',db.auth_user,writable=False,readable=False),
> Field('body','text',requires=IS_NOT_EMPTY()))
>
> ### modify an internal of the validator to
> ### fetch data required to compute the vi
onvoluted but it allows you to create an
> arbitrary representation and specify exactly which fields you need.
>
> By using represent you are passing a (lambda) function. How would
> web2py determine which columns to fetch? Should it fetch them all? It
> could be slow.
>
> Massimo
&g
(and makes sense) is a simpler syntax for
> merging format with virtualfields. I think if we do this we must do it
> well and it is not a minor change.
>
> Massimo
>
> On Jan 8, 6:42 am, "KONTRA, Gergely" wrote:
>> Well, then let the function accepts not a row, but
Hi!
I have a status "enumeration" for a status in one of my tables. I'd
like to store it, as an integer, and access it with constants. Where
should I define these constants (I guess I should in db.py), and how
can I access them in the controller?
And some random things about validators:
date valid
|
| |
+- "Olyan lángész vagyok, hogy poroltóval kellene járnom!" -+
On Mon, Jan 11, 2010 at 13:13, KONTRA, Gergely wrote:
> Hi!
> I have a status "enumeration" for a status in one of my tables. I'd
> like to store it, as an integer, a
I cloned web2py and write 2 functions for that
http://code.google.com/r/pihentagy-web2py/source/list
You can use those classes like that:
Field('invoice_date','date',
requires=IS_DATE_IN_RANGE(minimum=datetime.date.today(),
format='%d/%m/%Y')),
Field('settlement_date','datetime',
requires=
Hi!
Please have a look at
http://code.google.com/r/pihentagy-web2py/source/detail?r=f503c69dee738ebb332e6d25f89328d6910b853f
http://code.google.com/r/pihentagy-web2py/source/detail?r=230fbcc1f488864f868e7dd00e4d9c8b7b41bee3
I am a newbie to mercurial, but how these small bugfixes can go into
web2
Hi!
Yes, I must admit it, that a validator like IS_UPPER(), which checks
only whether the input is uppercase is less useful, than an another,
which actually converts to uppercase.
OTOH if you haven't used the function, you expect the former.
+-[ Gergely Kontra ]--+
|
Hi!
I found another inconsistency in validators:
IS_INT_IN_RANGE:
IS_INT_IN_RANGE(0,10) does not accepts 10.
Yes, this is in the docs, but using using args minimum and maximum,
how would one know, that it includes the start/end point?
Similarly, IS_LENGTH, IS_DECIMAL_IN_RANGE and so on...?
OTO
>> And does it makes sense to make all min and max values optional, so
>> you can have: enter an integer, which is larger than 2 (witout upper
>> limit)?
> Having had the need recently, I would like to see:
> IS_INT_IN_RANGE(1) # any integer>0 (up to sys.maxint)
> IS_INT_IN_RANGE(max=10) # any inte
16 matches
Mail list logo