3YOURMIND/django-replace-migrations

ModuleNotFoundError: No module named 'django_migration_linter'

CelestialGuru opened this issue · 2 comments

Prepare environment

Docker is the fastest/easiest way to get a quick disposable environment:

$ docker exec -it --rm python bash

Install dependencies

# pip install django django-replace-migrations
# django-admin startproject myapp .

Add "django_migration_linter" to INSTALLED_APPS in settings.py

Error

Running ./manage.py showmigrations or ./manage.py makemigrations or anything really I'll get the same error: ModuleNotFoundError: No module named 'django_migration_linter'

I tried replacing "django_replace_migrations" with "django_replace_migrations" but nothing works.
Shoot, I even tried this:

# python
Python 3.9.1 (default, Dec 18 2020, 05:16:04) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import django_migration_linter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'django_migration_linter'

So, what is the name of this package I should import? Is it django_migration_linter or possibly django_replace_migrations?

flixx commented

Hello @CelestialGuru thanks a lot for reporting!
This notification for this issue slipped through my Emails somehow. So sorry for the delay.
I can reproduce and will push a new release in the next few days.

Thanks again,
Felix

flixx commented

This is now resolved in 0.0.2. There was a __init__.py file missing 🤦

Thanks again for trying and reporting.

Felix