  class PermWrapper(object):
      def __init__(self, user):
          self.user = user
  
      def __getitem__(self, module_name):
          return PermLookupDict(self.user, module_name)
  
      def __iter__(self):
          # I am large, I contain multitudes.
          raise TypeError("PermWrapper is not iterable.")
  
 
</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     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 self.user.has_module_perms(self.module_name)
 </s> add         return self.user.has_module_perms(self.app_label) </s> remove                 raise NotModerated("The model '%s' is not currently being moderated" % model._meta.module_name)
 </s> add                 raise NotModerated("The model '%s' is not currently being moderated" % model._meta.model_name) </s> remove         if m._meta.object_name.lower() == model_name:
 </s> add         if m._meta.model_name == model_name:
    def __getitem__(self, app_label):
        return PermLookupDict(self.user, app_label)
  class PermWrapper(object):
      def __init__(self, user):
          self.user = user
  
    def __getitem__(self, app_label):
        return PermLookupDict(self.user, app_label)
    def __getitem__(self, app_label):
        return PermLookupDict(self.user, app_label)
  
      def __iter__(self):
          # I am large, I contain multitudes.
          raise TypeError("PermWrapper is not iterable.")
  
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