Model Related Issue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Model Related Issue

Soumen Khatua
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
 

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WYxGmBjrZugMhLdS%3DFpD0ALEDEq2Bg-3LEfODjUKs5j0g%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Model Related Issue

ROHIT CHAUHAN
manually change in migrations --> 0001_initial.py

On Tue, 14 Jan 2020 at 18:10, Soumen Khatua <[hidden email]> wrote:
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
 

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WYxGmBjrZugMhLdS%3DFpD0ALEDEq2Bg-3LEfODjUKs5j0g%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF_q%3DRAbNp%3DFcyPRZaZ%3DV6O1G9y5AD0UpZLfN4ELnag_NX44zQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Model Related Issue

Bruckner de Villiers

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

 

From: <[hidden email]> on behalf of ROHIT CHAUHAN <[hidden email]>
Reply to: <[hidden email]>
Date: Wednesday, 15 January 2020 at 12:33
To: <[hidden email]>
Subject: Re: Model Related Issue

 

manually change in migrations --> 0001_initial.py

 

On Tue, 14 Jan 2020 at 18:10, Soumen Khatua <[hidden email]> wrote:

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

 

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WYxGmBjrZugMhLdS%3DFpD0ALEDEq2Bg-3LEfODjUKs5j0g%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF_q%3DRAbNp%3DFcyPRZaZ%3DV6O1G9y5AD0UpZLfN4ELnag_NX44zQ%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/EAF4BF25-1DD0-4F35-8F7C-D7AB955E69F1%40gmail.com.