Yes, 'attaching the table' does not allow references. On second thoughts, it is somewhat inconvenient to use that feature too.
Let me see if another method will work. In web2py directory, under site-packages, you can define a module (or a simple .py file) wherein you can define the required dictionary and the set. Then, In models/db.py (or any other file in models directory) of any application, you can execute that module. (Since the module in site-packages is not thread safe, make sure that no application-specific variables are used by side-effect in your module). Once you have the dic and the set, you can use them in the table definitions through IS_IN_SET validation. I am assuming you can update the web2py/site-packages. Hopefully this solves your problem. ---------------------------------------------------------------------------------------------- On Tuesday, May 16, 2017 at 5:46:25 PM UTC+5:30, lyn2py wrote: > > Is there is a way to define a table without adding it to the sqlite > database? I wish to define a table and have data in that table, but not add > it to the sqlite db. > > The reason is because I have a table with a fixed set of data, that I use > across different apps. > > Thank you! > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.