Namespaces, Methodes, Attributes - Some Overview?

Hi, I have some experience with Python3, Django is new to me. As I work my way through the tutorials (they are great!) I find a few things that I have a hard time distinguishing. Is there an overview of the following somewhere? Or can someone help me out?

  • From Python I know the class.method and the class.attribute notation. That seems to be the same in Django, as long we speek about python code. The seperator ist .
  • From Python I know the underscore (_) as a normal character, which can be used in class names, method names and so on. Even a double underscore (__) is used this way (as in def __init__(self). In Django that seems different. In the tutorial part 5 it comes to an expression like
    return Question.objects.filter(pub_date__lte = There the __lte seems not to be part of the name which begins with pub_date, but to be a seperator. What about that? How does it work? Is it a feature of Python or Django to split names? Where points __lte to?
  • Then we have something with namespaces, which for example looks like polls:vote, seperated by :, in a template file: <form action="{% url 'polls:vote' %}" method="post"> and corresponds with the app_name = 'polls' in the Again: is it a feature of Django or Python to provide these namespaces?
  • Are there any other hierarchies of this kind?

Thanks for any hint!

For information about Django using the double-underscore as a named parameter value, see:

For the namespaces, notice that in the expression:

That url is the name of the template tag, and 'polls:vote' is a literal character string. That’s all. What its purpose and function is, is strictly determined by what the template tag does with it.
In this case, it’s used as a means of identifying an app within the url structure within Django.
So to be more precise, this is a definition and convention used by the url module.
For more information, see URL dispatcher | Django documentation | Django

The concept of organizing entities (urls, models, views, templates) within “apps” is used throughout Django. See Applications | Django documentation | Django (among all the references in the tutorial)