Model Related Issue

47 views
Skip to first unread message

Soumen Khatua

unread,
Jan 14, 2020, 7:40:53 AM1/14/20
to django...@googlegroups.com
Hi Folks,

After changing the model name,I'm getting some error, like initially my model name was some thing like this:
class new_model(models.Model) but now I'm change it to class NewModel(models.Model) but after migrate I'm getting this error:

File "/home/sou/tildehat_platform/env/lib/python3.6/site-packages/django/db/migrations/state.py", line 280, in __init__
    raise ValueError("\n".join(error.msg for error in errors))
ValueError: The field admin.LogEntry.user was declared with a lazy reference to 'profiles.tildehatuser', but app 'profiles' doesn't provide model 'tildehatuser'.
The field job_post.job_post.user was declared with a lazy reference to 'profiles.tildehatuser', but app 'profiles' doesn't provide model 'tildehatuser'.
The field profiles.tildehat_profile.user was declared with a lazy reference to 'profiles.tildehatuser', but app 'profiles' doesn't provide model 'tildehatuser'
 

Note: I already added the customized model name in settings.py like 'profiles.ClassName".

Please help me guys regarding this matter but I alreday spent so much time on this o internet.

Thank You in advance

Regards,
Soumen
 

ROHIT CHAUHAN

unread,
Jan 15, 2020, 5:33:30 AM1/15/20
to django...@googlegroups.com
manually change in migrations --> 0001_initial.py

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WYxGmBjrZugMhLdS%3DFpD0ALEDEq2Bg-3LEfODjUKs5j0g%40mail.gmail.com.

Bruckner de Villiers

unread,
Jan 15, 2020, 9:57:20 AM1/15/20
to django...@googlegroups.com

I guess that this is a fundamental change to the db – Best to first delete the old model and start again.

 

Bruckner de Villiers

083 625 1086

Reply all
Reply to author
Forward
0 new messages