diff --git a/django/contrib/comments/__init__.py b/django/contrib/comments/__init__.py
index 42384e7..4d32af0 100644
--- a/django/contrib/comments/__init__.py
+++ b/django/contrib/comments/__init__.py
@@ -1,8 +1,6 @@
 from django.conf import settings
 from django.core import urlresolvers
 from django.core.exceptions import ImproperlyConfigured
-from django.contrib.comments.models import Comment
-from django.contrib.comments.forms import CommentForm
 from django.utils.importlib import import_module
 
 DEFAULT_COMMENTS_APP = 'django.contrib.comments'
@@ -40,6 +38,7 @@ def get_model():
     if get_comment_app_name() != DEFAULT_COMMENTS_APP and hasattr(get_comment_app(), "get_model"):
         return get_comment_app().get_model()
     else:
+        from django.contrib.comments.models import Comment
         return Comment
 
 def get_form():
@@ -49,6 +48,7 @@ def get_form():
     if get_comment_app_name() != DEFAULT_COMMENTS_APP and hasattr(get_comment_app(), "get_form"):
         return get_comment_app().get_form()
     else:
+        from django.contrib.comments.forms import CommentForm
         return CommentForm
 
 def get_form_target():
diff --git a/django/contrib/comments/models.py b/django/contrib/comments/models.py
index 5e128d2..2c5dff4 100644
--- a/django/contrib/comments/models.py
+++ b/django/contrib/comments/models.py
@@ -8,6 +8,7 @@ from django.db import models
 from django.core import urlresolvers
 from django.utils.translation import ugettext_lazy as _
 from django.conf import settings
+from django.contrib.comments import get_model
 
 COMMENT_MAX_LENGTH = getattr(settings,'COMMENT_MAX_LENGTH',3000)
 
@@ -166,7 +167,7 @@ class CommentFlag(models.Model):
     if you want rating look elsewhere.
     """
     user      = models.ForeignKey(User, verbose_name=_('user'), related_name="comment_flags")
-    comment   = models.ForeignKey(Comment, verbose_name=_('comment'), related_name="flags")
+    comment   = models.ForeignKey(get_model(), verbose_name=_('comment'), related_name="flags")
     flag      = models.CharField(_('flag'), max_length=30, db_index=True)
     flag_date = models.DateTimeField(_('date'), default=None)
 
diff --git a/tests/regressiontests/comment_tests/tests/app_api_tests.py b/tests/regressiontests/comment_tests/tests/app_api_tests.py
index c4d9ebf..9e94634 100644
--- a/tests/regressiontests/comment_tests/tests/app_api_tests.py
+++ b/tests/regressiontests/comment_tests/tests/app_api_tests.py
@@ -1,6 +1,6 @@
 from django.conf import settings
 from django.contrib import comments
-from django.contrib.comments.models import Comment
+from django.contrib.comments.models import Comment, CommentFlag
 from django.contrib.comments.forms import CommentForm
 from regressiontests.comment_tests.tests import CommentTestCase
 
@@ -28,6 +28,9 @@ class CommentAppAPITests(CommentTestCase):
         c = Comment(id=12345)
         self.assertEqual(comments.get_approve_url(c), "/approve/12345/")
 
+    def testCommentFlagCommentModel(self):
+        self.assertEqual(CommentFlag.comment.field.related.parent_model, Comment)
+
 
 class CustomCommentTest(CommentTestCase):
     urls = 'regressiontests.comment_tests.urls'
@@ -69,3 +72,8 @@ class CustomCommentTest(CommentTestCase):
     def getGetApproveURL(self):
         c = Comment(id=12345)
         self.assertEqual(comments.get_approve_url(c), "/approve/12345/")
+
+    def testCommentFlagCommentModel(self):
+        from regressiontests.comment_tests.custom_comments.models import CustomComment
+        self.assertEqual(CommentFlag.comment.field.related.parent_model, CustomComment)
+
