Answer the question
In order to leave comments, you need to log in
Error while migrating model?
It seems everything was fine, I'm trying to add a few models today and I get an error.
Tried googling, but couldn't find anything. What could be the problem? python 2.7.9 django 1.7.7
File "D:\OpenServer\domains\virtualenv\myenv\lib\site-packages\django\contrib\contenttypes\migrations\0002_remove_content_type_name.py", line 17, in <module>
class Migration(migrations.Migration):
File "D:\OpenServer\domains\virtualenv\myenv\lib\site-packages\django\contrib\contenttypes\migrations\0002_remove_content_type_name.py", line 34, in Migration
migrations.RunPython.noop,
AttributeError: type object 'RunPython' has no attribute 'noop'
Answer the question
In order to leave comments, you need to log in
Judging by the documentation, .noop is only from 1.8
static RunPython.noop()¶
New in Django 1.8.
Pass the RunPython.noop method to code or reverse_code when you want the operation not to do anything in the given direction. This is especially useful in making the operation reversible.
I understood how it happened. after updating some scripts through the panel in pycharm, for some reason, django was updated to version 1.8, although I did not choose it for updating. Before that, I made a backup of all the files of the virtual environment, the project and the database. I tried to restore files from the backup of the virtual environment, the django version became the same as it was 1.7.7 - but the problem remained. What else needs to be fixed?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question