Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

magic-removal: fixed django.contrib.comments to work with the new loc…

…ation of auth

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1863 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8c07571a1588108c297cb8a556b260dac0c34328 1 parent ea35b35
Jacob Kaplan-Moss authored January 08, 2006

Showing 1 changed file with 6 additions and 5 deletions. Show diff stats Hide diff stats

  1. 11  django/contrib/comments/models.py
11  django/contrib/comments/models.py
... ...
@@ -1,5 +1,6 @@
1 1
 from django.db import models
2  
-from django.models import core
  2
+from django.models.core import ContentType
  3
+from django.contrib.sites.models import Site
3 4
 from django.contrib.auth.models import User
4 5
 from django.utils.translation import gettext_lazy as _
5 6
 import datetime
@@ -62,7 +63,7 @@ def user_is_moderator(self, user):
62 63
 
63 64
 class Comment(models.Model):
64 65
     user = models.ForeignKey(User, raw_id_admin=True)
65  
-    content_type = models.ForeignKey(core.ContentType)
  66
+    content_type = models.ForeignKey(ContentType)
66 67
     object_id = models.IntegerField(_('object ID'))
67 68
     headline = models.CharField(_('headline'), maxlength=255, blank=True)
68 69
     comment = models.TextField(_('comment'), maxlength=3000)
@@ -83,7 +84,7 @@ class Comment(models.Model):
83 84
     is_public = models.BooleanField(_('is public'))
84 85
     ip_address = models.IPAddressField(_('IP address'), blank=True, null=True)
85 86
     is_removed = models.BooleanField(_('is removed'), help_text=_('Check this box if the comment is inappropriate. A "This comment has been removed" message will be displayed instead.'))
86  
-    site = models.ForeignKey(core.Site)
  87
+    site = models.ForeignKey(Site)
87 88
     objects = CommentManager()
88 89
     class Meta:
89 90
         db_table = 'comments'
@@ -163,7 +164,7 @@ def get_as_text(self):
163 164
 
164 165
 class FreeComment(models.Model):
165 166
     # A FreeComment is a comment by a non-registered user.
166  
-    content_type = models.ForeignKey(core.ContentType)
  167
+    content_type = models.ForeignKey(ContentType)
167 168
     object_id = models.IntegerField(_('object ID'))
168 169
     comment = models.TextField(_('comment'), maxlength=3000)
169 170
     person_name = models.CharField(_("person's name"), maxlength=50)
@@ -172,7 +173,7 @@ class FreeComment(models.Model):
172 173
     ip_address = models.IPAddressField(_('ip address'))
173 174
     # TODO: Change this to is_removed, like Comment
174 175
     approved = models.BooleanField(_('approved by staff'))
175  
-    site = models.ForeignKey(core.Site)
  176
+    site = models.ForeignKey(Site)
176 177
     class Meta:
177 178
         db_table = 'comments_free'
178 179
         verbose_name = _('Free comment')

0 notes on commit 8c07571

Please sign in to comment.
Something went wrong with that request. Please try again.