I have tracked this error to the line https://github.com/jerivas/mezzanine-webf/blob/master/fabfile.py#L446 "site, _ = Site.objects.get_or_create(id=settings.SITE_ID);")
I tried replacing it with "Site.objects.filter(id=settings.SITE_ID).update(domain=env.live_host);") like this https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py#L525 but still got the same error. I have looked for possible solutions but don't have enough knowledge to make sensible progress, these pages looked helpful though http://django.readthedocs.org/en/latest/releases/1.7.html#standalone-scripts http://django.readthedocs.org/en/latest/ref/applications.html#applications-troubleshooting I am wondering if this would be an issue for *all* fabfile use and not just for webfaction. Therefore it may be a 'release blocker'? Cheers g On Tuesday, 5 May 2015 14:16:21 UTC+12, Graham Oliver wrote: > > I am just working through the webfaction fabfile written by Jervais > (thanks!) https://github.com/jerivas/mezzanine-webf > I am using Django 1.7.7, Python 2.7 and the current development version > of Mezzanine. > > I am confused as to which line is causing the problem > > Either this.... > https://github.com/jerivas/mezzanine-webf/blob/master/fabfile.py#L443 > > or this > https://github.com/jerivas/mezzanine-webf/blob/master/fabfile.py#L444 > > The stack trace is below... > > Would welcome any pointers > TIA > g > > [108.59.11.112] run: python -c "import os; > os.environ['DJANGO_SETTINGS_MODULE']='settings';from django.conf import > settings;from django.contrib.sites.models import Site;site, _ = > Site.objects.get_or_create(id=settings.SITE_ID);site.domain = > 'orotau.webfactional.com';site.save();" > [108.59.11.112] out: > /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/mezzanine/utils/conf.py:59: > > > UserWarning: TIME_ZONE setting is not set, using closest match: UTC > [108.59.11.112] out: warn("TIME_ZONE setting is not set, using closest > match: %s" % tz) > [108.59.11.112] out: Traceback (most recent call last): > [108.59.11.112] out: File "<string>", line 1, in <module> > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/manager.py", > > > line 92, in manager_method > [108.59.11.112] out: return getattr(self.get_queryset(), > name)(*args, **kwargs) > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/query.py", > > > line 422, in get_or_create > [108.59.11.112] out: return self.get(**lookup), False > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/query.py", > > > line 345, in get > [108.59.11.112] out: clone = self.filter(*args, **kwargs) > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/query.py", > > > line 691, in filter > [108.59.11.112] out: return self._filter_or_exclude(False, *args, > **kwargs) > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/query.py", > > > line 709, in _filter_or_exclude > [108.59.11.112] out: clone.query.add_q(Q(*args, **kwargs)) > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/sql/query.py", > > > line 1331, in add_q > [108.59.11.112] out: clause, require_inner = self._add_q(where_part, > self.used_aliases) > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/sql/query.py", > > > line 1358, in _add_q > [108.59.11.112] out: current_negated=current_negated, > connector=connector) > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/sql/query.py", > > > line 1182, in build_filter > [108.59.11.112] out: lookups, parts, reffed_aggregate = > self.solve_lookup_type(arg) > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/sql/query.py", > > > line 1120, in solve_lookup_type > [108.59.11.112] out: _, field, _, lookup_parts = > self.names_to_path(lookup_splitted, self.get_meta()) > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/sql/query.py", > > > line 1383, in names_to_path > [108.59.11.112] out: field, model, direct, m2m = > opts.get_field_by_name(name) > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/options.py", > > > line 416, in get_field_by_name > [108.59.11.112] out: cache = self.init_name_map() > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/options.py", > > > line 445, in init_name_map > [108.59.11.112] out: for f, model in > self.get_all_related_m2m_objects_with_model(): > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/options.py", > > > line 563, in get_all_related_m2m_objects_with_model > [108.59.11.112] out: cache = self._fill_related_many_to_many_cache() > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/options.py", > > > line 577, in _fill_related_many_to_many_cache > [108.59.11.112] out: for klass in self.apps.get_models(): > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/utils/lru_cache.py", > > > line 101, in wrapper > [108.59.11.112] out: result = user_function(*args, **kwds) > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/apps/registry.py", > > > line 168, in get_models > [108.59.11.112] out: self.check_models_ready() > [108.59.11.112] out: File > "/home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/apps/registry.py", > > > line 131, in check_models_ready > [108.59.11.112] out: raise AppRegistryNotReady("Models aren't loaded > yet.") > [108.59.11.112] out: django.core.exceptions.AppRegistryNotReady: Models > aren't loaded yet. > [108.59.11.112] out: > > > Fatal error: run() received nonzero return code 1 while executing! > > Requested: python -c "import os; > os.environ['DJANGO_SETTINGS_MODULE']='settings';from django.conf import > settings;from django.contrib.sites.models import Site;site, _ = > Site.objects.get_or_create(id=settings.SITE_ID);site.domain = > 'orotau.webfactional.com';site.save();" > Executed: /bin/bash -l -c "cd /home/orotau/webapps/wf_soul && source > /home/orotau/.virtualenvs/ve_soul/bin/activate && source > /home/orotau/.virtualenvs/ve_soul/bin/activate && python -c \"import os; > os.environ['DJANGO_SETTINGS_MODULE']='settings';from django.conf import > settings;from django.contrib.sites.models import Site;site, _ = > Site.objects.get_or_create(id=settings.SITE_ID);site.domain = > 'orotau.webfactional.com';site.save();\"" > > Aborting. > Disconnecting from 108.59.11.112... done. > run() received nonzero return code 1 while executing! > > Requested: python -c "import os; > os.environ['DJANGO_SETTINGS_MODULE']='settings';from django.conf import > settings;from django.contrib.sites.models import Site;site, _ = > Site.objects.get_or_create(id=settings.SITE_ID);site.domain = > 'orotau.webfactional.com';site.save();" > Executed: /bin/bash -l -c "cd /home/orotau/webapps/wf_soul && source > /home/orotau/.virtualenvs/ve_soul/bin/activate && source > /home/orotau/.virtualenvs/ve_soul/bin/activate && python -c \"import os; > os.environ['DJANGO_SETTINGS_MODULE']='settings';from django.conf import > settings;from django.contrib.sites.models import Site;site, _ = > Site.objects.get_or_create(id=settings.SITE_ID);site.domain = > 'orotau.webfactional.com';site.save();\"" > (py27_dj177)graham@graham-laptop:~/Dropbox/mp_soul_whero$ > > > -- > T : 021 081 71732 > > -- 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.
