Skip to content
Snippets Groups Projects
Commit b65601e0 authored by adeelehsan's avatar adeelehsan
Browse files

Executed python-modernize and isort

on mentioned files in INCR-451
 Please enter the commit message for your changes. Lines starting
parent 2cefd887
No related branches found
No related tags found
No related merge requests found
"""
URLs for badges API
"""
from __future__ import absolute_import
from django.conf import settings
from django.conf.urls import url
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
import django.utils.timezone
import jsonfield.fields
import badges.models
from django.conf import settings
import django.utils.timezone
from django.db import migrations, models
from model_utils import fields
from opaque_keys.edx.django.models import CourseKeyField
import badges.models
class Migration(migrations.Migration):
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import json
from datetime import datetime
import os
import time
from datetime import datetime
import six
from django.db import migrations, models
......@@ -44,7 +45,7 @@ def forwards(apps, schema_editor):
badge_class.image.name = icon.name
badge_class.save()
classes[(badge.course_id, badge.mode)] = badge_class
if isinstance(badge.data, basestring):
if isinstance(badge.data, six.string_types):
data = badge.data
else:
data = json.dumps(badge.data)
......@@ -82,7 +83,7 @@ def backwards(apps, schema_editor):
if not badge.badge_class.mode:
# Can't preserve old badges without modes.
continue
if isinstance(badge.data, basestring):
if isinstance(badge.data, six.string_types):
data = badge.data
else:
data = json.dumps(badge.data)
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment