      def __repr__(self):
          return str(self.user.get_all_permissions())
  
      def __getitem__(self, perm_name):
          return self.user.has_perm("%s.%s" % (self.module_name, perm_name))
  
      def __iter__(self):
          # To fix 'item in perms.someapp' and __getitem__ iteraction we need to
          # define __iter__. See #18979 for details.
          raise TypeError("PermLookupDict is not iterable.")
 
</s> remove         return self.user.has_module_perms(self.module_name)
 </s> add         return self.user.has_module_perms(self.app_label) </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     def __init__(self, user, module_name):
        self.user, self.module_name = user, module_name
 </s> add     def __init__(self, user, app_label):
        self.user, self.app_label = user, app_label </s> remove         return "%s.%s" % (smart_text(self.app_label), smart_text(self.module_name))
 </s> add         return "%s.%s" % (smart_text(self.app_label), smart_text(self.model_name)) </s> remove             to_name = to._meta.object_name.lower()
 </s> add             to_name = to._meta.model_name
        return self.user.has_perm("%s.%s" % (self.app_label, perm_name))
      def __repr__(self):
          return str(self.user.get_all_permissions())
  
      def __getitem__(self, perm_name):
        return self.user.has_perm("%s.%s" % (self.app_label, perm_name))
  
      def __iter__(self):
          # To fix 'item in perms.someapp' and __getitem__ iteraction we need to
          # define __iter__. See #18979 for details.
          raise TypeError("PermLookupDict is not iterable.")
keep keep keep keep replace keep keep keep keep keep
 Fixed #19689 -- Renamed `Model._meta.module_name` to `model_name`. 
django/contrib/auth/context_processors.py