Re: How to pass multiple query sets in Django?

2021-02-17 Thread Luciano Martins
show the sql you're trying to ...

Em terça-feira, 16 de fevereiro de 2021 às 10:58:44 UTC-3, 
anilse...@gmail.com escreveu:

>
> How to pass multiple query sets in Django?
>

-- 
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/f767d1e0-2c41-4f42-a588-c1e9665a971bn%40googlegroups.com.


Re: how to pass multiple query sets in Django

2021-02-16 Thread Anil s
Hi thanks for the response.

can you please let me know how to pass the below array in the serializer

project_array = {'project_type': project_type}
serializer = ProjectListSerializer(project_array, many=True)
return Response(serializer.data)

when i pass this i am getting the below error

Got AttributeError when attempting to get a value for field
`project_number` on serializer `ProjectListSerializer`

please help me how to resolve this.

Regards,

Anil Sebastin


On Tue, Feb 16, 2021 at 7:58 PM Omkar Parab  wrote:

> pass your multiple query sets using the get_context_data" method.
>
> 
>
> https://docs.djangoproject.com/en/3.1/topics/class-based-views/generic-display/
>
> On Tue, Feb 16, 2021, 7:28 PM Anil s  wrote:
>
>>
>> Hello Everyone:
>>
>> Can somebody please tell me how to pass multiple query sets in Django.
>>
>> Thank you for your help.
>>
>> --
>> 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/a9b86c7a-e084-4f86-8c78-db8c4c56f82en%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/a9b86c7a-e084-4f86-8c78-db8c4c56f82en%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/2wd6MUE9iqo/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAJY8mfwVnvzWjzgLrmJ2akcuVv-szk0oeWkJK74LfmbPPmvuOw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJY8mfwVnvzWjzgLrmJ2akcuVv-szk0oeWkJK74LfmbPPmvuOw%40mail.gmail.com?utm_medium=email_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/CAH9gtO9YzdGxECJr1j%3De_%3Di1_gvkwS%3DcMpdfMZpfG9PFRHgnug%40mail.gmail.com.


Re: how to pass multiple query sets in Django

2021-02-16 Thread Omkar Parab
pass your multiple query sets using the get_context_data" method.


https://docs.djangoproject.com/en/3.1/topics/class-based-views/generic-display/

On Tue, Feb 16, 2021, 7:28 PM Anil s  wrote:

>
> Hello Everyone:
>
> Can somebody please tell me how to pass multiple query sets in Django.
>
> Thank you for your help.
>
> --
> 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/a9b86c7a-e084-4f86-8c78-db8c4c56f82en%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/a9b86c7a-e084-4f86-8c78-db8c4c56f82en%40googlegroups.com?utm_medium=email_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/CAJY8mfwVnvzWjzgLrmJ2akcuVv-szk0oeWkJK74LfmbPPmvuOw%40mail.gmail.com.


how to pass multiple query sets in Django

2021-02-16 Thread Anil s

Hello Everyone:

Can somebody please tell me how to pass multiple query sets in Django.

Thank you for your help.

-- 
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/a9b86c7a-e084-4f86-8c78-db8c4c56f82en%40googlegroups.com.


How to pass multiple query sets in Django?

2021-02-16 Thread Anil s

How to pass multiple query sets in Django?

-- 
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/f6c9f411-3d7d-4739-ae85-865549c00e5an%40googlegroups.com.