Well problem with Django is that there is not really support for
"dynamic models".
Django expects that _before_ calling ready() all models are registered
and ready for use.
Also note that ready() maybe called multiple times. You should take into
account that for example when running unit tests Django changes database
connection, which may affect your model construction.
On 19.10.2016 12:22, Vlasov Vitaly wrote:
Hello.
I have working model factory of dynamic models in my app.models.py. I
need to know where i should call it in my code. Right now i call it in
MyAppConfig ready() method and think it is not right way. But this is
working.
Where i should place dynamic models factory call?
--
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...@googlegroups.com
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/492d62ac-5dd4-4553-a4e9-66798f51a131%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/492d62ac-5dd4-4553-a4e9-66798f51a131%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
Jani Tiainen
--
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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/c3e0b1ed-3372-5602-f662-441c90a543c9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.