What exactly does this template label mean?

django 2.1.12

{% if perms.auth.warehouse_receipt %}

I am reading a ready-made django project, which contains the template statement in the HTML file.
But I didn’t see any specific code?
Can you explain in detail what perms represent?
What does auth represent?
What does warehouse-receipt represent?
Could you please tell me where the specific code location may be?
thanks

When you render a template, where do variables come from?

(Have you worked your way through either the Official Django Tutorial or the Django Girls Tutorial?)

I have learned a beginner’s book on django.
I didn’t see the corresponding variable in the views. py file, so I need to raise this question.
Thank you.

Variables are available in a template from the context. The context is populated from both the view and any context processors.

There is no way for us to know where that variable comes from without examining the project.

def check_login(func):
def wrapper(request, *args, **kwargs):
# is_login=request.session.get(‘IS_LOGIN’,False)
if request.user.is_authenticated:
return func(request, *args, **kwargs)
else:
return redirect(‘/Account/login/’)

return wrapper

@check_login
def index(request):
return render(request, “index.html”)

The index.html file contains {% if perms. auth. warehouse-receipt%}

Thanks

I used find in files to search in PyCharm but couldn’t find it

I saw in the MySQL database that there is a permission with a codename of warehouse-receipt in the auth_permission table. Is it pointing here?

So, I would like to ask how does it point from perms.auth.warehouse-receipt in the template to the warehouse-receipt in the auth_permission table?

Thanks

As mentioned before:

You can’t just examine the view. You also need to look at the context prorcessors being used.