bitbake: toaster: managedcontextprocessor requires Project imported

Temporarily move this import into the main view so that the context
processor can return a value for projects (albeit an unused one) when in
non managed mode. This will be changed in the near future but this
will fix it until we finish the refactoring.

(Bitbake rev: db61587fdd78af071d8a2a50d494fe159bf169a6)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Wood
2015-05-12 15:34:45 +01:00
committed by Richard Purdie
parent ec8bd70b27
commit 2ac26e4294

View File

@@ -1795,6 +1795,7 @@ def managedcontextprocessor(request):
import toastermain.settings
from orm.models import Project, ProjectLayer, ProjectTarget, ProjectVariable
# we have a set of functions if we're in managed mode, or
# a default "page not available" simple functions for interactive mode
@@ -1804,7 +1805,6 @@ if toastermain.settings.MANAGED:
from django.contrib.auth import authenticate, login
from django.contrib.auth.decorators import login_required
from orm.models import Project, ProjectLayer, ProjectTarget, ProjectVariable
from orm.models import Branch, LayerSource, ToasterSetting, Release, Machine, LayerVersionDependency
from bldcontrol.models import BuildRequest