A
A
Alexander2016-04-24 19:19:16
Django
Alexander, 2016-04-24 19:19:16

What is the right thing to do when a migration requires an already removed module from a package?

There was a module from the package (pip) ckeditor_uploader. After it became unnecessary for me, I deleted it everywhere, and the migration starts requiring this module when it is launched:

$ python3.5 manage.py migrate
......
ile "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 662, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/alexander/Numero_Project/poliv/src/news/migrations/0010_auto_20160419_1503.py", line 5, in <module>
    import ckeditor_uploader.fields
ImportError: No module named 'ckeditor_uploader'

How to be in a current situation?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Voskresensky, 2016-04-24
@Voskresenskyi

- initially uninstall it in installed applications!
- manage.py makemigrations appname (make migrations in app first)
- manage.py migrate! (make migrations in project...)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question