From d196f8f7ebb74be47f7811cbe4c45b594fab18ad Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 24 Nov 2012 18:10:51 +0100 Subject: [PATCH] [1.5.X] Removed obsolete contrib.comments upgrade guide The old comment system was pre-1.0. Backport of 44815bad6b from master --- docs/ref/contrib/comments/index.txt | 7 --- docs/ref/contrib/comments/upgrade.txt | 78 --------------------------- docs/releases/1.0-beta-2.txt | 4 +- docs/releases/1.0-porting-guide.txt | 4 +- docs/releases/1.0.txt | 4 +- 5 files changed, 6 insertions(+), 91 deletions(-) delete mode 100644 docs/ref/contrib/comments/upgrade.txt diff --git a/docs/ref/contrib/comments/index.txt b/docs/ref/contrib/comments/index.txt index adda1eaf6c..8275092d2f 100644 --- a/docs/ref/contrib/comments/index.txt +++ b/docs/ref/contrib/comments/index.txt @@ -11,12 +11,6 @@ Django includes a simple, yet customizable comments framework. The built-in comments framework can be used to attach comments to any model, so you can use it for comments on blog entries, photos, book chapters, or anything else. -.. note:: - - If you used to use Django's older (undocumented) comments framework, you'll - need to upgrade. See the :doc:`upgrade guide ` - for instructions. - Quick start guide ================= @@ -350,7 +344,6 @@ More information models settings signals - upgrade custom forms moderation diff --git a/docs/ref/contrib/comments/upgrade.txt b/docs/ref/contrib/comments/upgrade.txt deleted file mode 100644 index dadb53f5fa..0000000000 --- a/docs/ref/contrib/comments/upgrade.txt +++ /dev/null @@ -1,78 +0,0 @@ -=============================================== -Upgrading from Django's previous comment system -=============================================== - -Prior versions of Django included an outdated, undocumented comment system. Users who reverse-engineered this framework will need to upgrade to use the -new comment system; this guide explains how. - -The main changes from the old system are: - -* This new system is documented. - -* It uses modern Django features like :doc:`forms ` and - :doc:`modelforms `. - -* It has a single ``Comment`` model instead of separate ``FreeComment`` and - ``Comment`` models. - -* Comments have "email" and "URL" fields. - -* No ratings, photos and karma. This should only effect World Online. - -* The ``{% comment_form %}`` tag no longer exists. Instead, there's now two - functions: ``{% get_comment_form %}``, which returns a form for posting a - new comment, and ``{% render_comment_form %}``, which renders said form - using the ``comments/form.html`` template. - -* The way comments are include in your URLconf have changed; you'll need to - replace:: - - (r'^comments/', include('django.contrib.comments.urls.comments')), - - with:: - - (r'^comments/', include('django.contrib.comments.urls')), - -Upgrading data --------------- - -The data models for Django's comment system have changed, as have the -table names. Before you transfer your existing data into the new comments -system, make sure that you have installed the new comments system as -explained in the -:doc:`quick start guide `. -This will ensure that the new tables have been properly created. - -To transfer your data into the new comments system, you'll need to directly -run the following SQL: - -.. code-block:: sql - - BEGIN; - - INSERT INTO django_comments - (content_type_id, object_pk, site_id, user_name, user_email, user_url, - comment, submit_date, ip_address, is_public, is_removed) - SELECT - content_type_id, object_id, site_id, person_name, '', '', comment, - submit_date, ip_address, is_public, not approved - FROM comments_freecomment; - - INSERT INTO django_comments - (content_type_id, object_pk, site_id, user_id, user_name, user_email, - user_url, comment, submit_date, ip_address, is_public, is_removed) - SELECT - content_type_id, object_id, site_id, user_id, '', '', '', comment, - submit_date, ip_address, is_public, is_removed - FROM comments_comment; - - UPDATE django_comments SET user_name = ( - SELECT username FROM auth_user - WHERE django_comments.user_id = auth_user.id - ) WHERE django_comments.user_id is not NULL; - UPDATE django_comments SET user_email = ( - SELECT email FROM auth_user - WHERE django_comments.user_id = auth_user.id - ) WHERE django_comments.user_id is not NULL; - - COMMIT; diff --git a/docs/releases/1.0-beta-2.txt b/docs/releases/1.0-beta-2.txt index 288ac8fbc1..fac64d8433 100644 --- a/docs/releases/1.0-beta-2.txt +++ b/docs/releases/1.0-beta-2.txt @@ -32,8 +32,8 @@ Refactored ``django.contrib.comments`` carried out a major rewrite and refactoring of Django's bundled comment system, greatly increasing its flexibility and customizability. :doc:`Full documentation - ` is available, as well as :doc:`an - upgrade guide ` if you were using + ` is available, as well as an + upgrade guide if you were using the previous incarnation of the comments application.. Refactored documentation diff --git a/docs/releases/1.0-porting-guide.txt b/docs/releases/1.0-porting-guide.txt index a6a6bfe7d9..29e40b2ebe 100644 --- a/docs/releases/1.0-porting-guide.txt +++ b/docs/releases/1.0-porting-guide.txt @@ -391,8 +391,8 @@ Comments -------- If you were using Django 0.96's ``django.contrib.comments`` app, you'll need to -upgrade to the new comments app introduced in 1.0. See -:doc:`/ref/contrib/comments/upgrade` for details. +upgrade to the new comments app introduced in 1.0. See the upgrade guide +for details. Template tags ------------- diff --git a/docs/releases/1.0.txt b/docs/releases/1.0.txt index 1e44f57de8..be61311232 100644 --- a/docs/releases/1.0.txt +++ b/docs/releases/1.0.txt @@ -194,8 +194,8 @@ Refactored ``django.contrib.comments`` As part of a Google Summer of Code project, Thejaswi Puthraya carried out a major rewrite and refactoring of Django's bundled comment system, greatly increasing its flexibility and customizability. :doc:`Full documentation -` is available, as well as :doc:`an upgrade guide -` if you were using the previous incarnation of +` is available, as well as an upgrade guide +if you were using the previous incarnation of the comments application. Removal of deprecated features