Add option to remove_stale_contenttypes to remove entries for nonexistent apps.
    
    
    
      
      
      
        
Add an option (disabled by default) to remove_stale_contenttypes command to remove entries also for nonexistent apps.
Based on discussion.
PR
       
     
   
 
      
        
        
          Change History
          (7)
        
          
  
  
  
    
      | Resolution: | → wontfix | 
    
      | Status: | new → closed | 
    
      | Summary: | remove_stale_contenttypes doesn't remove entries for stale apps → remove_stale_contenttypes doesn't remove entries for nonexistent apps. | 
  
 
           
          
  
  
  
    
      | Description: | modified (diff) | 
    
      | Has patch: | unset | 
    
      | Resolution: | wontfix | 
    
      | Status: | closed → new | 
    
      | Summary: | remove_stale_contenttypes doesn't remove entries for nonexistent apps. → Add option to remove_stale_contenttypes to remove entries for nonexistent apps. | 
    
      | Triage Stage: | Unreviewed → Accepted | 
    
      | Type: | Bug → New feature | 
    
      | Version: | 3.0 → master | 
  
 
           
          
  
  
  
    
      | Description: | modified (diff) | 
    
      | Has patch: | set | 
  
 
           
          
  
  
  
    
      | Needs documentation: | set | 
    
      | Owner: | changed from nobody to Gowtham Kommineni | 
    
      | Patch needs improvement: | set | 
    
      | Status: | new → assigned | 
  
 
           
          
  
  
  
    
      | Needs documentation: | unset | 
    
      | Patch needs improvement: | unset | 
    
      | Triage Stage: | Accepted → Ready for checkin | 
  
 
           
          
  
  
  
    
      | Resolution: | → fixed | 
    
      | Status: | assigned → closed | 
  
 
           
          
          
         
       
     
        
    
    
I don't think that
remove_stale_contenttypesshould remove content types for nonexistent apps. We don't automatically remove models for nonexistent apps and I don't think we should do this with content types. This can also cause a data loss for a custom content types (not related to real apps). You can start a discussion on DevelopersMailingList if you don't agree.