Ticket #13366: 13366.symptomaticpatch

File 13366.symptomaticpatch, 1.6 KB (added by Erik Stein, 14 years ago)

Attached symptomatic patch for using the comments app (worksforme).

Line 
1Index: django/contrib/comments/__init__.py
2===================================================================
3--- django/contrib/comments/__init__.py (Revision 12996)
4+++ django/contrib/comments/__init__.py (Arbeitskopie)
5@@ -1,7 +1,6 @@
6 from django.conf import settings
7 from django.core import urlresolvers
8 from django.core.exceptions import ImproperlyConfigured
9-from django.contrib.comments.models import Comment
10 from django.contrib.comments.forms import CommentForm
11 from django.utils.importlib import import_module
12
13@@ -40,6 +39,7 @@
14 if get_comment_app_name() != DEFAULT_COMMENTS_APP and hasattr(get_comment_app(), "get_model"):
15 return get_comment_app().get_model()
16 else:
17+ from django.contrib.comments.models import Comment
18 return Comment
19
20 def get_form():
21Index: django/contrib/comments/forms.py
22===================================================================
23--- django/contrib/comments/forms.py (Revision 12996)
24+++ django/contrib/comments/forms.py (Arbeitskopie)
25@@ -5,7 +5,6 @@
26 from django.forms.util import ErrorDict
27 from django.conf import settings
28 from django.contrib.contenttypes.models import ContentType
29-from models import Comment
30 from django.utils.encoding import force_unicode
31 from django.utils.hashcompat import sha_constructor
32 from django.utils.text import get_text_list
33@@ -120,6 +119,7 @@
34 comment apps should override this, get_comment_create_data, and perhaps
35 check_for_duplicate_comment to provide custom comment models.
36 """
37+ from models import Comment
38 return Comment
39
40 def get_comment_create_data(self):
Back to Top