From c763f4c38ce918a822a0b5afb2ec0f3bfeb53669 Mon Sep 17 00:00:00 2001
From: Simon Charette <charette.s@gmail.com>
Date: Thu, 16 Jan 2014 22:20:03 -0500
Subject: [PATCH] Don't warn about missing `app_label` for abstract models.

---
 django/db/models/base.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/django/db/models/base.py b/django/db/models/base.py
index d7b54b9..6670781 100644
--- a/django/db/models/base.py
+++ b/django/db/models/base.py
@@ -104,12 +104,15 @@ class ModelBase(type):
                 # For 'django.contrib.sites.models', this would be 'sites'.
                 # For 'geo.models.places' this would be 'geo'.
 
-                warnings.warn(
-                    "Model class %s.%s doesn't declare an explicit app_label "
-                    "and either isn't in an application in  INSTALLED_APPS "
-                    "or else was imported before its application was loaded. "
-                    "This will no longer be supported in Django 1.9."
-                    % (module, name), PendingDeprecationWarning, stacklevel=2)
+                if not abstract:
+                    warnings.warn(
+                        "Model class %s.%s doesn't declare an explicit "
+                        "app_label and either isn't in an application in "
+                        "INSTALLED_APPS or else was imported before its "
+                        "application was loaded. This will no longer be "
+                        "supported in Django 1.9." % (module, name),
+                        PendingDeprecationWarning, stacklevel=2
+                    )
 
                 model_module = sys.modules[new_class.__module__]
                 package_components = model_module.__name__.split('.')
-- 
1.8.3.2

