Richard, this sounds interesting but I did not fully understand what you're doing. Some code would probably help.
thanks, Alex Am Dienstag, 12. März 2013 16:24:06 UTC+1 schrieb Richard: > > Alex, > > Maybe you could be interested to know how manage labels, comments, etc. > > I create a table name database_dict that contain the list of all my fields > and table where I create all the columns I want to store anything I want > concerning fields and tables, like : table_description, field_description, > ui_table_name, ui_table_name_fr, ui_table_name_en, field_comment_fr, > field_comment_en, field_label_fr, field_label_en, etc., etc. > > I made a update script that recreate this table each time I want and copy > the older descriptions, labels, comments in the new table with the new > fields and tables that I create in my database. > > Then in web2py I create a cached dict(s) that contains all the information > that is available and that I need to create my models, so in my models I am > refering to the python dict(s) that contains the things I want. > > That way I can manage field label translation at the database level and > document my field and table there too... > > > If you are interrested I can elaborate more and provide some code for > Postgres... > > Richard > > > > On Tue, Mar 12, 2013 at 11:06 AM, Alex <[email protected] <javascript:>>wrote: > >> something like a dbcomment argument would be really nice. Of course the >> implementation has to be db engine specific. In case the db does not >> support column comments then it should be ignored. For now I'll keep on >> updating the comments manually, hopefully it will be supported in the >> future :) >> >> Am Dienstag, 12. März 2013 15:37:02 UTC+1 schrieb Niphlod: >> >>> correct. Unless someone scripts something specific (shouldn't be hard), >>> but as far as I know it would have to be pretty specific to every db engine >>> (e.g. I don't think mongo has column comments ^_^) >>> >>> On Tuesday, March 12, 2013 3:22:22 PM UTC+1, Alex wrote: >>>> >>>> actually I don't need the comment in the backend but I want to comment >>>> my code. Often it is useful for me to have the comment in the db as well. >>>> When I add or change a comment in my code I also have to update the db >>>> (comment on column ...). This means additional work and can easily be >>>> forgotten (and thus leads to outdated comments in my code or db). >>>> >>>> if I understood you correctly there is no way to set the db column >>>> comment with web2py at the moment? >>>> >>>> thanks, >>>> 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 [email protected] <javascript:>. >> 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.

