Hi Bro .`.

Thanks for your response, but I need to do that:

If I make these:

Products.object.all()
or
Products.objects.count()

I need to django, auto include a .filter(created_user=*request*.user) ...
today I`m doing exactly you write, but I need to make these filter,
one-by-one...



T.·.F.·.A.·.     S+F
*Fellipe Henrique P. Soares*

e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'
*Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh
<https://fedoraproject.org/wiki/User:Fellipeh>*
*Blog: *http:www.fellipeh.eti.br
*GitHub: https://github.com/fellipeh <https://github.com/fellipeh>*
*Twitter: @fh_bash*


On Fri, Aug 17, 2018 at 3:55 PM Ángel Gabriel Morales Acosta <
angel.gabriel...@gmail.com> wrote:

> Hi Bro.·.
>
> If I understand you, you can this:
>
> def any_func(..., *request*):
> ...
>      .filter(created_user=*request*.user)
>
> more about :  https://docs.djangoproject.com/en/2.1/ref/request-response/
>
> Cheers Bro.·.
>
>
> *---*
> *Ángel Gabriel Morales Acosta*
> Email: angel.gabriel...@gmail.com
>
>
> On Fri, Aug 17, 2018 at 1:22 PM Fellipe Henrique <felli...@gmail.com>
> wrote:
>
>> Hello guys... I have several model with FK with Django User.... so, I
>> need to filter each query using:
>>
>> .filter(created_user=current)user)
>>
>> I do it, manually... how can do it, automatically?
>>
>>
>> Thanks
>>
>>
>> T.·.F.·.A.·.     S+F
>> *Fellipe Henrique P. Soares*
>>
>> e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \
>> 's/(.)/chr(ord($1)-2*3)/ge'
>> *Fedora Ambassador: https://fedoraproject.org/wiki/User:Fellipeh
>> <https://fedoraproject.org/wiki/User:Fellipeh>*
>> *Blog: *http:www.fellipeh.eti.br
>> *GitHub: https://github.com/fellipeh <https://github.com/fellipeh>*
>> *Twitter: @fh_bash*
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAF1jwZEtTYiD%3DTvPxuvucMRV%2BeLzCD%3DXMWdMSKt2sV2fbxYeMA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAF1jwZEtTYiD%3DTvPxuvucMRV%2BeLzCD%3DXMWdMSKt2sV2fbxYeMA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPF44MAtRpPmNgF%2BpDHbcemRHP30tDtCgp-S0Hoae%3DAdJw_7xQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPF44MAtRpPmNgF%2BpDHbcemRHP30tDtCgp-S0Hoae%3DAdJw_7xQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF1jwZEMxO0xcc9umTBBC%2B21_LFuX7av9Kb9p8riQ_KXPnG0Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to