Re: Model Related Issue

2020-01-15 Thread 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:  on behalf of ROHIT CHAUHAN 

Reply to: 
Date: Wednesday, 15 January 2020 at 12:33
To: 
Subject: Re: Model Related Issue

 

manually change in migrations --> 0001_initial.py

 

On Tue, 14 Jan 2020 at 18:10, Soumen Khatua  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 django-users+unsubscr...@googlegroups.com.
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 django-users+unsubscr...@googlegroups.com.
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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/EAF4BF25-1DD0-4F35-8F7C-D7AB955E69F1%40gmail.com.


Re: Model Related Issue

2020-01-15 Thread ROHIT CHAUHAN
manually change in migrations --> 0001_initial.py

On Tue, 14 Jan 2020 at 18:10, Soumen Khatua 
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 django-users+unsubscr...@googlegroups.com.
> 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 django-users+unsubscr...@googlegroups.com.
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.


Model Related Issue

2020-01-14 Thread 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 django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPUw6WYxGmBjrZugMhLdS%3DFpD0ALEDEq2Bg-3LEfODjUKs5j0g%40mail.gmail.com.


Re: Model Related Issue

2019-07-28 Thread Pradeep Sukhwani
You can always use serializers. Have a look at declaring serializers 

 and 
then you can call that serializer in your APIView. If this doesn't help 
then share your code.

On Saturday, July 27, 2019 at 11:18:59 PM UTC+5:30, Soumen Khatua wrote:
>
> Hi Folks,
> I created one Address model and I extended Profile model by using 
> OnetoOneField of User and this Address model. But in get method  I want to 
> provide User model email,username and Address model state and Profile model 
> all details,How I can do that ny using Django Rest Framework. 
> Please help me guys,It's Urgent??
>
>
> Thank You
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/99ac7359-eb29-4040-92fc-e7666933aecf%40googlegroups.com.


Model Related Issue

2019-07-27 Thread Soumen Khatua
Hi Folks,
I created one Address model and I extended Profile model by using
OnetoOneField of User and this Address model. But in get method  I want to
provide User model email,username and Address model state and Profile model
all details,How I can do that ny using Django Rest Framework.
Please help me guys,It's Urgent??


Thank You

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPUw6WYeumcAXc_zn6or05S5EvvEizeMXLcnFkJnbsXHB6CG8A%40mail.gmail.com.