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
|
15 | 15 | from django.db import migrations, models |
16 | 16 | from django.db.migrations.loader import MigrationLoader |
17 | 17 | from django.utils import datetime_safe, six |
| 18 | from django.utils._os import upath |
18 | 19 | from django.utils.encoding import force_text |
19 | 20 | from django.utils.functional import Promise |
20 | 21 | from django.utils.timezone import utc |
… |
… |
class MigrationWriter(object):
|
215 | 216 | if not hasattr(migrations_module, '__file__'): |
216 | 217 | raise ImportError |
217 | 218 | |
218 | | basedir = os.path.dirname(migrations_module.__file__) |
| 219 | basedir = os.path.dirname(upath(migrations_module.__file__)) |
219 | 220 | except ImportError: |
220 | 221 | app_config = apps.get_app_config(self.migration.app_label) |
221 | 222 | migrations_package_basename = migrations_package_name.split(".")[-1] |