diff --git a/lms/djangoapps/certificates/management/commands/cert_whitelist.py b/lms/djangoapps/certificates/management/commands/cert_whitelist.py index ea15365f19..34ba38513b 100644 --- a/lms/djangoapps/certificates/management/commands/cert_whitelist.py +++ b/lms/djangoapps/certificates/management/commands/cert_whitelist.py @@ -2,7 +2,7 @@ Management command which sets or gets the certificate whitelist for a given user/course """ -from __future__ import print_function +from __future__ import absolute_import, print_function from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError diff --git a/lms/djangoapps/certificates/management/commands/create_fake_cert.py b/lms/djangoapps/certificates/management/commands/create_fake_cert.py index 2bd3bca650..98ad84b591 100644 --- a/lms/djangoapps/certificates/management/commands/create_fake_cert.py +++ b/lms/djangoapps/certificates/management/commands/create_fake_cert.py @@ -9,6 +9,8 @@ Example usage: $ ./manage.py lms create_fake_cert test_user edX/DemoX/Demo_Course --mode honor --grade 0.89 """ +from __future__ import absolute_import + import logging from django.contrib.auth.models import User diff --git a/lms/djangoapps/certificates/management/commands/fix_ungraded_certs.py b/lms/djangoapps/certificates/management/commands/fix_ungraded_certs.py index ee4624cb9a..c1e49f2814 100644 --- a/lms/djangoapps/certificates/management/commands/fix_ungraded_certs.py +++ b/lms/djangoapps/certificates/management/commands/fix_ungraded_certs.py @@ -1,6 +1,8 @@ """ Management command which fixes ungraded certificates for students """ +from __future__ import absolute_import + import logging from django.core.management.base import BaseCommand diff --git a/lms/djangoapps/certificates/management/commands/gen_cert_report.py b/lms/djangoapps/certificates/management/commands/gen_cert_report.py index fd709aeba9..cf8fd1cc68 100644 --- a/lms/djangoapps/certificates/management/commands/gen_cert_report.py +++ b/lms/djangoapps/certificates/management/commands/gen_cert_report.py @@ -1,7 +1,7 @@ """ Generate a report of certificate statuses """ -from __future__ import print_function +from __future__ import absolute_import, print_function from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError diff --git a/lms/djangoapps/certificates/management/commands/regenerate_user.py b/lms/djangoapps/certificates/management/commands/regenerate_user.py index 5dcb4cfcc3..bd86618f0b 100644 --- a/lms/djangoapps/certificates/management/commands/regenerate_user.py +++ b/lms/djangoapps/certificates/management/commands/regenerate_user.py @@ -1,4 +1,6 @@ """Django management command to force certificate regeneration for one user""" +from __future__ import absolute_import + import copy import logging diff --git a/lms/djangoapps/certificates/management/commands/resubmit_error_certificates.py b/lms/djangoapps/certificates/management/commands/resubmit_error_certificates.py index ea77328bc9..e7519e8a32 100644 --- a/lms/djangoapps/certificates/management/commands/resubmit_error_certificates.py +++ b/lms/djangoapps/certificates/management/commands/resubmit_error_certificates.py @@ -16,6 +16,8 @@ Example usage: $ ./manage.py lms resubmit_error_certificates -c edX/DemoX/Fall_2015 -c edX/DemoX/Spring_2016 """ +from __future__ import absolute_import + import logging from django.core.management.base import BaseCommand, CommandError diff --git a/lms/djangoapps/certificates/management/commands/tests/test_cert_whitelist.py b/lms/djangoapps/certificates/management/commands/tests/test_cert_whitelist.py index 8b5bcddbe5..fb3f0c50d8 100644 --- a/lms/djangoapps/certificates/management/commands/tests/test_cert_whitelist.py +++ b/lms/djangoapps/certificates/management/commands/tests/test_cert_whitelist.py @@ -1,8 +1,9 @@ """ Extremely basic tests for the cert_whitelist command """ -import pytest +from __future__ import absolute_import +import pytest from django.core.management import call_command diff --git a/lms/djangoapps/certificates/management/commands/tests/test_fix_ungraded_certs.py b/lms/djangoapps/certificates/management/commands/tests/test_fix_ungraded_certs.py index 4e5a11b9f7..b915306e5b 100644 --- a/lms/djangoapps/certificates/management/commands/tests/test_fix_ungraded_certs.py +++ b/lms/djangoapps/certificates/management/commands/tests/test_fix_ungraded_certs.py @@ -1,8 +1,9 @@ """ Extremely basic tests for the fix_ungraded_certs command """ -import pytest +from __future__ import absolute_import +import pytest from django.core.management import call_command diff --git a/lms/djangoapps/certificates/management/commands/tests/test_gen_cert_report.py b/lms/djangoapps/certificates/management/commands/tests/test_gen_cert_report.py index 4ea0678605..0f7cfccea8 100644 --- a/lms/djangoapps/certificates/management/commands/tests/test_gen_cert_report.py +++ b/lms/djangoapps/certificates/management/commands/tests/test_gen_cert_report.py @@ -1,8 +1,9 @@ """ Extremely basic tests for the gen_cert_report command """ -import pytest +from __future__ import absolute_import +import pytest from django.core.management import call_command diff --git a/lms/djangoapps/certificates/management/commands/ungenerated_certs.py b/lms/djangoapps/certificates/management/commands/ungenerated_certs.py index f3dc63ef2c..798783b157 100644 --- a/lms/djangoapps/certificates/management/commands/ungenerated_certs.py +++ b/lms/djangoapps/certificates/management/commands/ungenerated_certs.py @@ -2,7 +2,8 @@ Management command to find all students that need certificates for courses that have finished, and put their cert requests on the queue. """ -from __future__ import print_function +from __future__ import absolute_import, print_function + import datetime import logging