ChoiceField Appearing Instead of CharField while using Foreignkey

40 views
Skip to first unread message

Renfer Richards

unread,
Aug 26, 2022, 9:41:51 AM8/26/22
to Django users
Hi, 

I am stuck in a problem while using foreignkey to combine two model  choiceField is appearing instead of charField

My Model:
cropped.png
There is no serializer to this model 

Problem/Bug:
File.png

ChoiceField is appearing instead of CharField in Origin Variable

MUGOYA DIHFAHSIH

unread,
Aug 26, 2022, 10:35:22 AM8/26/22
to django...@googlegroups.com
You add one country first then you can select from those countries you have added to create a Name object

--
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/32e92f09-3612-4fb3-8a1b-2dd01cb86b29n%40googlegroups.com.
--
Mugoya Dihfahsih
Software Developer
Kampala, Uganda
Profile: dihfahsih1.github.io/profile

Renfer Richards

unread,
Aug 26, 2022, 9:22:06 PM8/26/22
to django...@googlegroups.com
Hi, 

MUGOYA DIHFAHSIH


I am glad that you responded my email and provided a solution. 
But can you explain it in more detail?
I will be grateful 

Paul serubombwe

unread,
Aug 28, 2022, 4:58:51 AM8/28/22
to Django users
Learn how to name your field by using underscore to separate word to avoid confusion. 

The problem is that the parent table is not populated yet the model depends on the parent table, first populate the tables respectively 


Sympa Kalambay

unread,
Aug 28, 2022, 9:35:22 PM8/28/22
to django...@googlegroups.com
Try to correct your sentax. It is Chardfield et not charfield

Le 28 août 2022 9:58 AM, "Paul serubombwe" <bradi...@gmail.com> a écrit :
Learn how to name your field by using underscore to separate word to avoid confusion. 

The problem is that the parent table is not populated yet the model depends on the parent table, first populate the tables respectively 


On Sat, Aug 27, 2022, 04:21 Renfer Richards <personalrenfer.richards@gmail.com> wrote:
Hi, 

MUGOYA DIHFAHSIH


I am glad that you responded my email and provided a solution. 
But can you explain it in more detail?
I will be grateful 

On Fri, Aug 26, 2022 at 8:05 PM MUGOYA DIHFAHSIH <dihfa...@gmail.com> wrote:
You add one country first then you can select from those countries you have added to create a Name object
On Fri, 26 Aug 2022 at 16:41, Renfer Richards <personalrenfer.richards@gmail.com> wrote:
Hi, 

I am stuck in a problem while using foreignkey to combine two model  choiceField is appearing instead of charField

My Model:
cropped.png
There is no serializer to this model 

Problem/Bug:
File.png

ChoiceField is appearing instead of CharField in Origin Variable

--
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+unsubscribe@googlegroups.com.
--
Mugoya Dihfahsih
Software Developer
Kampala, Uganda
Profile: dihfahsih1.github.io/profile

--
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+unsubscribe@googlegroups.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+unsubscribe@googlegroups.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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJkmis2uovtgPPb9q7e%2BvCA_A1%2BZnCd6gwdfr9rnvgCPrk7i_A%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages