Olá friends. I am starting to give my first steps with web2py. Pra to start: in the local bank using sqlite the problem below does not occur. (in localhost functions everything)
My problem: when initiating the bank would like already inserting some groups predefined in the table auth_group and in the server I receive the error: <class '_mysql_exceptions.OperationalError'> (1701, 'Cannot truncate a table referenced in a foreign key constraint (`meusistema`.`auth_permission`, CONSTRAINT `auth_permission_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `meusistema`.`auth_group` (`id`))') - I incapacitated the automatic creation of groups: auth.settings.create_user_groups = None - All new I register in cadastre will be of group 1: auth.settings.everybody_group_id = 1 In model db.py I placed soon below of the configurations of tables: if not db(db.auth_group).count(): db.auth_group.truncate() db.auth_group.insert(role='Usuário Comum', description='Usuário Comum') db.auth_group.insert(role='Nível 2', description='Nível 2') db.auth_group.insert(role='Nível 3', description='Nível 3') db.auth_group.insert(role='Nível 4', description='Nível 4') db.auth_group.insert(role='Nível 5', description='Nível 5') db.auth_group.insert(role='Admin Gerente', description='Gerente') db.auth_group.insert(role='Admin Master', description='Administrador Master do Sistema') If I take this part of the insertion system on the server works right. Thanks for the help, Flávio Santos -- 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.