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 <
[email protected]> 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: [email protected]
>
>
> On Fri, Aug 17, 2018 at 1:22 PM Fellipe Henrique <[email protected]>
> 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 [email protected].
>> To post to this group, send email to [email protected].
>> 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
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