Ticket #24324: 24324.diff

File 24324.diff, 1010 bytes (added by Tim Graham, 10 years ago)
  • django/db/migrations/writer.py

    diff --git a/django/db/migrations/writer.py b/django/db/migrations/writer.py
    index 37f2c81..5119131 100644
    a b from django.apps import apps  
    1515from django.db import migrations, models
    1616from django.db.migrations.loader import MigrationLoader
    1717from django.utils import datetime_safe, six
     18from django.utils._os import upath
    1819from django.utils.encoding import force_text
    1920from django.utils.functional import Promise
    2021from django.utils.timezone import utc
    class MigrationWriter(object):  
    215216            if not hasattr(migrations_module, '__file__'):
    216217                raise ImportError
    217218
    218             basedir = os.path.dirname(migrations_module.__file__)
     219            basedir = os.path.dirname(upath(migrations_module.__file__))
    219220        except ImportError:
    220221            app_config = apps.get_app_config(self.migration.app_label)
    221222            migrations_package_basename = migrations_package_name.split(".")[-1]
Back to Top