The problem is the 'requires' for the table_name field is set at the time
the permissions table is created:
table.table_name.requires =
IS_EMPTY_OR(IS_IN_SET(self.db.tables))
and at that time, db.tables only includes the names of the tables that have
already been defined.
As a workaround, you can add the following line somewhere after your last
table definition (or possibly at the top of the appadmin.py file):
auth.settings.table_permission.table_name.requires=IS_EMPTY_OR(IS_IN_SET(db.tables))
Anthony
On Tuesday, July 26, 2011 6:26:59 AM UTC-4, Marin wrote:
> Hi,
> while inserting new auth_permission entries via appadmin, you can
> choose only tables that are defined before auth_permission table
> (auth_user, auth_groups, auth_membership, auth_permission included).
> Custom table (db.define_table(...)) is visible only if defined before
> auth tables.
>
> db.py file in welcome app suggests defining tables at the end of file,
> so no custom tables are visible that way.
>
> Should this be treated as a bug?
>
> Regards,
> Marin