Yes

 

For example, in the filter {{ var|foo:"bar" }}, the filter foo would be passed 
the variable var and the argument "bar".

 

I want to pass 2 (maybe 3) variables and correct me if I am wrong but 

Custom filters are just Python functions that take one or two arguments:

 

So could do  {{ var|foo:”bar, bar2” }}

or {{ var|foo:”bar” “bar2” }}   and pass 2 arguments?   The doc doesn’t specify 

 

I assume if 2 args

def cut(value, arg1, arg2):

 

?

 

 

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Mikhailo Keda
Sent: 17 August 2018 14:43
To: Django users
Subject: Re: template tag help please?

 

Check the documentation - 
https://docs.djangoproject.com/ko/2.1/howto/custom-template-tags/

-- 
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/zG3S_9BQKMY/unsubscribe.
To unsubscribe from this group and all its topics, 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/553d2ac6-cac1-4b9a-b3bd-2a4f5934ae47%40googlegroups.com
 
<https://groups.google.com/d/msgid/django-users/553d2ac6-cac1-4b9a-b3bd-2a4f5934ae47%40googlegroups.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/5b76d50e.1c69fb81.ad6af.0d3eSMTPIN_ADDED_BROKEN%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to