Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.5.X] Removed obsolete contrib.comments upgrade guide

The old comment system was pre-1.0.

Backport of 44815ba from master
  • Loading branch information...
commit d196f8f7ebb74be47f7811cbe4c45b594fab18ad 1 parent c252ed5
Claude Paroz authored November 24, 2012 timgraham committed December 15, 2012
7  docs/ref/contrib/comments/index.txt
@@ -11,12 +11,6 @@ Django includes a simple, yet customizable comments framework. The built-in
11 11
 comments framework can be used to attach comments to any model, so you can use
12 12
 it for comments on blog entries, photos, book chapters, or anything else.
13 13
 
14  
-.. note::
15  
-
16  
-    If you used to use Django's older (undocumented) comments framework, you'll
17  
-    need to upgrade. See the :doc:`upgrade guide </ref/contrib/comments/upgrade>`
18  
-    for instructions.
19  
-
20 14
 Quick start guide
21 15
 =================
22 16
 
@@ -350,7 +344,6 @@ More information
350 344
    models
351 345
    settings
352 346
    signals
353  
-   upgrade
354 347
    custom
355 348
    forms
356 349
    moderation
78  docs/ref/contrib/comments/upgrade.txt
... ...
@@ -1,78 +0,0 @@
1  
-===============================================
2  
-Upgrading from Django's previous comment system
3  
-===============================================
4  
-
5  
-Prior versions of Django included an outdated, undocumented comment system. Users who reverse-engineered this framework will need to upgrade to use the
6  
-new comment system; this guide explains how.
7  
-
8  
-The main changes from the old system are:
9  
-
10  
-* This new system is documented.
11  
-
12  
-* It uses modern Django features like :doc:`forms </topics/forms/index>` and
13  
-  :doc:`modelforms </topics/forms/modelforms>`.
14  
-
15  
-* It has a single ``Comment`` model instead of separate ``FreeComment`` and
16  
-  ``Comment`` models.
17  
-
18  
-* Comments have "email" and "URL" fields.
19  
-
20  
-* No ratings, photos and karma. This should only effect World Online.
21  
-
22  
-* The ``{% comment_form %}`` tag no longer exists. Instead, there's now two
23  
-  functions: ``{% get_comment_form %}``, which returns a form for posting a
24  
-  new comment, and ``{% render_comment_form %}``, which renders said form
25  
-  using the ``comments/form.html`` template.
26  
-
27  
-* The way comments are include in your URLconf have changed; you'll need to
28  
-  replace::
29  
-
30  
-        (r'^comments/', include('django.contrib.comments.urls.comments')),
31  
-
32  
-  with::
33  
-
34  
-        (r'^comments/', include('django.contrib.comments.urls')),
35  
-
36  
-Upgrading data
37  
---------------
38  
-
39  
-The data models for Django's comment system have changed, as have the
40  
-table names. Before you transfer your existing data into the new comments
41  
-system, make sure that you have installed the new comments system as
42  
-explained in the
43  
-:doc:`quick start guide </ref/contrib/comments/index>`.
44  
-This will ensure that the new tables have been properly created.
45  
-
46  
-To transfer your data into the new comments system, you'll need to directly
47  
-run the following SQL:
48  
-
49  
-.. code-block:: sql
50  
-
51  
-    BEGIN;
52  
-
53  
-    INSERT INTO django_comments 
54  
-        (content_type_id, object_pk, site_id, user_name, user_email, user_url,
55  
-        comment, submit_date, ip_address, is_public, is_removed)
56  
-    SELECT
57  
-        content_type_id, object_id, site_id, person_name, '', '', comment,
58  
-        submit_date, ip_address, is_public, not approved
59  
-    FROM comments_freecomment;
60  
-
61  
-    INSERT INTO django_comments 
62  
-        (content_type_id, object_pk, site_id, user_id, user_name, user_email,
63  
-        user_url, comment, submit_date, ip_address, is_public, is_removed)
64  
-    SELECT 
65  
-        content_type_id, object_id, site_id, user_id, '', '', '', comment,
66  
-        submit_date, ip_address, is_public, is_removed
67  
-    FROM comments_comment;
68  
-
69  
-    UPDATE django_comments SET user_name = (
70  
-        SELECT username FROM auth_user 
71  
-        WHERE django_comments.user_id = auth_user.id
72  
-    ) WHERE django_comments.user_id is not NULL;
73  
-    UPDATE django_comments SET user_email = (
74  
-        SELECT email FROM auth_user 
75  
-        WHERE django_comments.user_id = auth_user.id
76  
-    ) WHERE django_comments.user_id is not NULL;
77  
-    
78  
-    COMMIT;
4  docs/releases/1.0-beta-2.txt
@@ -32,8 +32,8 @@ Refactored ``django.contrib.comments``
32 32
     carried out a major rewrite and refactoring of Django's bundled
33 33
     comment system, greatly increasing its flexibility and
34 34
     customizability. :doc:`Full documentation
35  
-    </ref/contrib/comments/index>` is available, as well as :doc:`an
36  
-    upgrade guide </ref/contrib/comments/upgrade>` if you were using
  35
+    </ref/contrib/comments/index>` is available, as well as an
  36
+    upgrade guide if you were using
37 37
     the previous incarnation of the comments application..
38 38
 
39 39
 Refactored documentation
4  docs/releases/1.0-porting-guide.txt
@@ -391,8 +391,8 @@ Comments
391 391
 --------
392 392
 
393 393
 If you were using Django 0.96's ``django.contrib.comments`` app, you'll need to
394  
-upgrade to the new comments app introduced in 1.0. See
395  
-:doc:`/ref/contrib/comments/upgrade` for details.
  394
+upgrade to the new comments app introduced in 1.0. See the upgrade guide
  395
+for details.
396 396
 
397 397
 Template tags
398 398
 -------------
4  docs/releases/1.0.txt
@@ -194,8 +194,8 @@ Refactored ``django.contrib.comments``
194 194
 As part of a Google Summer of Code project, Thejaswi Puthraya carried out a
195 195
 major rewrite and refactoring of Django's bundled comment system, greatly
196 196
 increasing its flexibility and customizability. :doc:`Full documentation
197  
-</ref/contrib/comments/index>` is available, as well as :doc:`an upgrade guide
198  
-</ref/contrib/comments/upgrade>` if you were using the previous incarnation of
  197
+</ref/contrib/comments/index>` is available, as well as an upgrade guide
  198
+if you were using the previous incarnation of
199 199
 the comments application.
200 200
 
201 201
 Removal of deprecated features

0 notes on commit d196f8f

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