Thats the strange thing, my Site isn't importing the test code and i have no model with foreign key to the user model. And everything worked great until i upgraded to 4.1 (without changing anything else). Will try your change, thanks
2016-02-01 1:13 GMT+01:00 Stephen McDonald <[email protected]>: > Do you have a model with a foreign key to user? If so, are you importing > the User object instead of using the string syntax? > > Also why is your site importing test code? > > Regardless, I just pushed a change which may make this more robust, give > it a try: > > > https://github.com/stephenmcd/mezzanine/commit/a6eb2dcd3d47620b77766a1e797d54e97accc843 > > > > On Mon, Feb 1, 2016 at 12:54 AM, Christian Wiegand <[email protected] > > wrote: > >> Hi to all, >> >> my site is broken after updating to mezzanine 4.1 from 4.0.1 (python >> 2.7). Brings an error saying "Models aren't loaded yet". >> This ist caused by the statement >> >> User = get_user_model() >> in mezzanine/utils/tests.py >> >> when i change that to >> >> from django.conf import settings >> try: >> from django.contrib.auth import get_user_model >> User = settings.AUTH_USER_MODEL >> except ImportError: >> from django.contrib.auth.models import User >> >> there is no problem. Cause nobody else is complaining, maybe i'm doing >> something wrong? Or should this be changed... >> >> Hints welcome, thanks Christian >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Mezzanine Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Stephen McDonald > http://jupo.org > > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
