Re: Bug: Manually changing "_meta.db_table" for model causes "missing FROM-clause entry for table" error

2015-11-15 Thread evilejik
Thanks for the answer. What do you suggest to use instead of this ugly method, raw sql? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@

Re: Bug: Manually changing "_meta.db_table" for model causes "missing FROM-clause entry for table" error

2015-11-15 Thread evilejik
Thanks for the answer. What do you suggest to use instead of this ugly method, raw sql? суббота, 14 ноября 2015 г., 17:59:51 UTC+3 пользователь Tim Graham написал: > > I'm not sure that type of monkeypatching of Model._meta.db_table is meant > to be supported. You could try to bisect Django's com

Bug: Manually changing "_meta.db_table" for model causes "missing FROM-clause entry for table" error

2015-11-13 Thread evilejik
Hello. I've got the same model in two projects and want to copy data from one to another using model meta 'db_table' option: my_model_original_table_name = MyModel._meta.db_table MyModel._meta.db_table = 'old_project_table_name' old_objects = MyModel.objects.using('old_project_data_base').valu