From 1a47bc6f6117ec7f422c57172e4866e9a292900e Mon Sep 17 00:00:00 2001 From: Neal Todd Date: Thu, 13 Mar 2014 10:49:36 +0000 Subject: [PATCH] Added docs for removing the demo app to complement the Debian/Ubuntu installs. --- docs/gettingstarted.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/gettingstarted.rst b/docs/gettingstarted.rst index e9ddec022..1a2acb057 100644 --- a/docs/gettingstarted.rst +++ b/docs/gettingstarted.rst @@ -17,6 +17,8 @@ to your deployment preferences. The canonical version is at `github.com/torchbox/wagtail/blob/master/scripts/install/ubuntu.sh `_. +Once you've experimented with the demo app and are ready to build your pages via your own app you can `remove the demo app`_ if you choose. + On Debian ~~~~~~~~~ @@ -33,6 +35,8 @@ to your deployment preferences. The canonical version is at `github.com/torchbox/wagtail/blob/master/scripts/install/debian.sh `_. +Once you've experimented with the demo app and are ready to build your pages via your own app you can `remove the demo app`_ if you choose. + On OS X ~~~~~~~ @@ -121,3 +125,27 @@ with a regular Django project. .. _the Wagtail codebase: https://github.com/torchbox/wagtail .. _PostgreSQL: http://www.postgresql.org .. _Elasticsearch: http://www.elasticsearch.org + +_`Remove the demo app` +===================== + +Once you've experimented with the demo app and are ready to build your pages via your own app you can remove the demo app if you choose. + +``PROJECT_ROOT`` should be where your project is located (e.g. /usr/local/django) and ``PROJECT`` is the name of your project (e.g. mywagtail):: + + export PROJECT_ROOT=/usr/local/django + export PROJECT=mywagtail + cd $PROJECT_ROOT/$PROJECT + ./manage.py sqlclear demo | psql -Upostgres $PROJECT -f - + psql -Upostgres $PROJECT << EOF + BEGIN; + DELETE FROM wagtailcore_site WHERE root_page_id IN (SELECT id FROM wagtailcore_page WHERE content_type_id IN (SELECT id FROM django_content_type where app_label='demo')); + DELETE FROM wagtailcore_page WHERE content_type_id IN (SELECT id FROM django_content_type where app_label='demo'); + DELETE FROM auth_permission WHERE content_type_id IN (SELECT id FROM django_content_type where app_label='demo'); + DELETE FROM django_content_type WHERE app_label='demo'; + DELETE FROM wagtailimages_rendition; + DELETE FROM wagtailimages_image; + COMMIT; + EOF + rm -r demo media/images/* media/original_images/* + perl -pi -e"s/('demo',|WAGTAILSEARCH_RESULTS_TEMPLATE)/#\1/" $PROJECT/settingsbase.py