I can add 1) but this means web2py becomes dependent on geopolitical issues. I agree 2) and 3) do not belong in there.
Massimo On Oct 7, 9:04 am, Iceberg <[email protected]> wrote: > Sorry but IMHO: > > 1. adding a gluon/contrib/countries.py with a countries_list = > ['United States', 'Afghanistan', ...] is good enough for reference, > and developers might change orders or languages before really use it. > > 2. adding a countries_widget is not that convincing, especially > because it is just one line of code (means not worthy to wrap as a > widget), if we already have the countries_list=[...] > > 3. adding a Field('country', 'countries') ... mmm... see point #2. > > Just my 2 cents. > > On Oct7, 8:45pm, Jon Romero <[email protected]> wrote: > > > Yeap, that's the way I was first doing it but I am wondering what must > > be imported so module code can work (because it's working when it's in > > db.py). > > Also, creating a Field('country', 'countries') would be (I think) a > > nice addition. Should I submit a patch, Massimo? > > > Thanks for > > > On Oct 7, 3:33 pm, Iceberg <[email protected]> wrote: > > > > Since you gonna import one homemade module anyway, why not just: > > > > from applications.yourapp.modules.country import > > > country_names_as_a_list > > > db.define_table('shipping_info', > > > Field('countries', _requires=IS_IN_SET(country_names_as_a_list)) > > > ... > > > ) > > > > This way you don't force yourself to know something difficult (though > > > not that difficult if you really know widgets well). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

