About Dunder Variables
In Python at a module level, there are a handful of dunder variables - those which start and end with double underscores.
What you can read:
__name__refers to"__main__"if your are running the module directly or to the module name, e.g."myproject.apps.myapp.models".__doc__refers to the first docstring of the module.__file__refers to the absolute path of the*.pyfile.__cached__refers to the absolute path of the*.pycfile if the module was imported and not ran directly.__builtins__refers to the module or dictionary of all builtin variables, functions, and classes.
What you can define by convention:
__all__- the list of variable names that can be imported withfrom mymodule import *.__version__- the version of the module.__author__- the author name.__email__- the author email.__license__- the license of the module.
Also by me
Django Messaging
For Django-based social platforms.
Django App for You
Django Paddle Subscriptions
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent
For Django websites that use cookies.
Django App for You