Please reply with your models schema.

On Thu, Sep 5, 2019 at 7:56 AM dev <devii...@gmail.com> wrote:

> Hi All,
>
> How to get the ForeignKey value while querying the model object.
>
>
>
> I was trying to query a model object "mla" to fetch a specific sets of 
> columns and its working fine but the field ForeignKey i.e "instuid" returning 
> a numeric value instant of actual associated value.
>
>
>
> Do I need to edit the query
>
>
>
>
>
> *def mlas_datasets(request): mlaAll = 
> list(mla.objects.values('mla_name_short','mla_name_full','inst_acronym','mla_type','year_adopted','instuid','mla_uid'))
>  mlaAll = JsonResponse(mlaAll,safe=False) return 
> HttpResponse(mlaAll,content_type='json')*
>
>
> Regards
>
> Deb
>
> --
> 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/2ca903ba-5105-4983-a1bd-f36c17078f27%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/2ca903ba-5105-4983-a1bd-f36c17078f27%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CA%2BG34NA04O_AQDktYE4_ORa2Je_OOPjAv_NuwJh2Ptm6%2BAsUOQ%40mail.gmail.com.

Reply via email to