I don't think that sould be possible to change real table name "on the
fly". If I'm not mistaken, that kind of attribute is used by model's meta
class during class creation process to populate the django model cache,
which in turn only occurs during the django configuration step.
2017-07-13 14:08
Hi I encounter same problem as your, do you already got the solution? Any
help will be appreciated, thank you~
On Saturday, November 14, 2015 at 1:40:21 AM UTC+7, evil...@gmail.com wrote:
>
> Hello.
> I've got the same model in two projects and want to copy data from one to
> another using model
On Sun, Nov 15, 2015 at 12:04 AM, wrote:
> Thanks for the answer.
> What do you suggest to use instead of this ugly method, raw sql?
>
Would it make sense to serialize a ModelDatabaseA object (perhaps into JSON
or a standard Python dict) and use that to populate/create a ModelDatabaseB
object, s
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...@
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
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 commit history to find
the commit that changed the behavior. My guess it that it might have to do
with some internal caching such that your monkeypatch no longer has any
e
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
7 matches
Mail list logo