And this could be a easy (maybe ogly) solution to document his field :
Field('status', 'integer', comment=['0=error, 1=warning, 2=success',
'documenting comment'][0])
Richard
On Tue, Mar 12, 2013 at 9:21 AM, Richard Vézina <[email protected]
> wrote:
> Hmmm... I should check, but I remember that when there was comment in
> Postgres they were in the form, maybe it only working in postgres... Maybe
> it not working anymore, but I am pretty sure it was working in the pass...
> Anyway, he can keep his comment at database level for documentation purpose
> if he wants.
>
> Richard
>
>
> On Tue, Mar 12, 2013 at 9:13 AM, Niphlod <[email protected]> wrote:
>
>> nope. comment exists only in the web2py realm (i.e. models definitions).
>> There's no way to have a standardized syntax to store comments in the
>> database too (and I'm not sure either every db engine has the support for
>> it)
>>
>>
>> On Tuesday, March 12, 2013 1:52:55 PM UTC+1, Richard wrote:
>>
>>> If I remember web2py get the backend comment if there is no comment in
>>> the model definition.. So if you want to have dual comment definition, use
>>> your backend comment for code documentation and override them in your model
>>> definition...
>>>
>>> Richard
>>>
>>>
>>> On Tue, Mar 12, 2013 at 8:27 AM, Alex <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> is it possible to set the database column comment in web2py? I'd like
>>>> to document my fields only once and have the comment in the code and in the
>>>> db.
>>>>
>>>> At the moment I comment some of my fields in db.py like
>>>> Field('status', 'integer', comment='0=error, 1=warning, 2=success')
>>>>
>>>>
>>>>
>>>> So I'm somehow misusing the comment argument for my internal
>>>> documentation (I don't use the autogenerated forms). It would be very
>>>> useful to have an argument like dbcomment for the Field class.
>>>>
>>>> Alex
>>>>
>>>> --
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "web2py-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to web2py+un...@**googlegroups.com.
>>>>
>>>> For more options, visit
>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>>
>>>>
>>>
>>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.