I'm working on a project that has a lot of table definitions. For reasons of better performance and design, I've decided to use Condicional models.
The problem is: Each one of the controllers, needs more than one model, and each model is used by more than one of the controllers. Something like: - Controllers: -- controller1.py -- controller2.py -- controller3.py - Models -- model1.py -- model2.py -- model3.py * controller1.py needs model1.py and model2.py * controller2.py needs model2.py, and model3.py * controller3.py needs model1.py and model3.py The "workaround" I'm using at the moment is to place every model in app_name/models/models, and then creating symbolic links to each controller folder inside /models/: > ln -s models/models/model1.py models/models/model2.py models/controller1/ > ln -s models/models/model2.py models/models/model3.py models/controller2/ > ln -s models/models/model1.py models/models/model3.py models/controller3/ I'm creating symbolic links instead of copy the models because I don't want to edit a lot of files when I need to edit one model. It's working well. But I'm not sure if it's the best way of doing that. Also, there's two problem with that: a) appadmin doesn't work anymore. When I open the appadmin happens an error: "table already defined". I understand why this is happening, but I can't think how to solve it. b) When I clone de source code of the app from the Github in a Linux PC, the symlinks are created. But if the machine is running WIndows, the symlinks are not automatically created. Any suggestions would be appreciated. -- 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.