  # PermWrapper and PermLookupDict proxy the permissions system into objects that
  # the template system can understand.
  
  class PermLookupDict(object):
      def __init__(self, user, module_name):
          self.user, self.module_name = user, module_name
  
      def __repr__(self):
          return str(self.user.get_all_permissions())
  
      def __getitem__(self, perm_name):
 
</s> remove     def __getitem__(self, module_name):
        return PermLookupDict(self.user, module_name)
 </s> add     def __getitem__(self, app_label):
        return PermLookupDict(self.user, app_label) </s> remove         return self.user.has_perm("%s.%s" % (self.module_name, perm_name))
 </s> add         return self.user.has_perm("%s.%s" % (self.app_label, perm_name)) </s> remove         return self.rel.related_name or self.opts.object_name.lower()
 </s> add         return self.rel.related_name or self.opts.model_name </s> remove             names.append("%s/%s%s.html" % (opts.app_label, opts.object_name.lower(), self.template_name_suffix))
 </s> add             names.append("%s/%s%s.html" % (opts.app_label, opts.model_name, self.template_name_suffix)) </s> remove             "comments/%s_%s_preview.html" % (model._meta.app_label, model._meta.module_name),
 </s> add             "comments/%s_%s_preview.html" % (model._meta.app_label, model._meta.model_name),
    def __init__(self, user, app_label):
        self.user, self.app_label = user, app_label
  # PermWrapper and PermLookupDict proxy the permissions system into objects that
  # the template system can understand.
  
  class PermLookupDict(object):
    def __init__(self, user, app_label):
        self.user, self.app_label = user, app_label
    def __init__(self, user, app_label):
        self.user, self.app_label = user, app_label
  
      def __repr__(self):
          return str(self.user.get_all_permissions())
  
      def __getitem__(self, perm_name):
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #19689 -- Renamed `Model._meta.module_name` to `model_name`. 
django/contrib/auth/context_processors.py