From 287b49a35b3f06b302ee199ed4b2d123f1aae58c Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Wed, 17 Jun 2015 13:31:06 +0100 Subject: bitbake: toaster: bring django-aggregate-if into the project We bring the django-aggregate-if module (with minor changes to import) into the project. (Bitbake rev: 4b92add34167304b45c66b9726cbc64bc0f74d9f) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- .../toaster/contrib/django-aggregate-if-master/aggregate_if.py | 2 +- bitbake/lib/toaster/toastermain/settings.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/contrib/django-aggregate-if-master/aggregate_if.py b/bitbake/lib/toaster/contrib/django-aggregate-if-master/aggregate_if.py index 4ea9e8c06e..d5f3427170 100644 --- a/bitbake/lib/toaster/contrib/django-aggregate-if-master/aggregate_if.py +++ b/bitbake/lib/toaster/contrib/django-aggregate-if-master/aggregate_if.py @@ -10,7 +10,7 @@ This code was based on the work of others found on the internet: 4. https://groups.google.com/forum/?fromgroups=#!topic/django-users/vVprMpsAnPo ''' from __future__ import unicode_literals -import six +from django.utils import six import django from django.db.models.aggregates import Aggregate as DjangoAggregate from django.db.models.sql.aggregates import Aggregate as DjangoSqlAggregate diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py index 141ad08877..60e80de2f6 100644 --- a/bitbake/lib/toaster/toastermain/settings.py +++ b/bitbake/lib/toaster/toastermain/settings.py @@ -393,3 +393,12 @@ class InvalidString(str): "Undefined variable or unknown value for: \"%s\"" % other) TEMPLATE_STRING_IF_INVALID = InvalidString("%s") + +import sys +sys.path.append( + os.path.join( + os.path.join( + os.path.dirname(os.path.dirname(os.path.abspath(__file__))), + "contrib"), + "django-aggregate-if-master") + ) -- cgit v1.2.3-54-g00ecf