E-learning-Django- icon indicating copy to clipboard operation
E-learning-Django- copied to clipboard

no model name 'message' when migrate

Open redcican opened this issue 3 years ago • 8 comments

when i tray to migrate it says like this " model = message NameError: name 'message' is not defined" and when i cheacked the model there is no message model

redcican avatar Dec 09 '21 14:12 redcican

I have the same problem

Naruto-creator avatar Apr 13 '22 21:04 Naruto-creator

when i tray to migrate it says like this " model = message NameError: name 'message' is not defined" and when i cheacked the model there is no message model

have You found the solution?

Naruto-creator avatar Apr 13 '22 21:04 Naruto-creator

you first remove all files inside migrations folder like (0001_initial.py ) After that you run command python manage.py makemigrations it will be work.

subani786 avatar May 10 '22 10:05 subani786

Thank you

вт, 10 мая 2022 г., 16:05 Mabusubani @.***>:

you first remove all files inside migrations folder like (0001_initial.py ) After that you run command python manage.py makemigrations it will be work.

— Reply to this email directly, view it on GitHub https://github.com/ShivamRohilllaa/E-learning-Django-/issues/3#issuecomment-1122188022, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQRKZKEEDXZCUGR4ZXNMFGTVJIYG7ANCNFSM5JWTL2TA . You are receiving this because you commented.Message ID: @.***>

Naruto-creator avatar May 10 '22 10:05 Naruto-creator

Go for this steps to solve your problem.

1.Delete all the files from the migrations folders from different apps. 2.Drop the SQL database schema. 3.Run python manage.py makemigration. 4.Run python manage.py migrate.

subani786 avatar May 10 '22 11:05 subani786

I do Follow all the steps you mentioned below but it still doesn't work.

Adnane1708 avatar May 12 '22 15:05 Adnane1708

There is message class missing in the models.py file. This is why the error pops up

abhi-bhatra avatar Nov 12 '22 05:11 abhi-bhatra

There is message class missing in the models.py file. This is why the error pops up

could u please send solution for that here

abhijisuryawanshi avatar Jul 03 '23 13:07 abhijisuryawanshi