From f224e1ca2d1d988f1cb96f9c7b402e6af5b7c19e Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Tue, 15 Jul 2014 15:05:01 +0100 Subject: [PATCH] Updated docs to use the new wagtail-project command --- docs/getting_started.rst | 61 +++++++++++++++++++ docs/index.rst | 5 +- ...gettingstarted.rst => trying_the_demo.rst} | 35 ++++------- 3 files changed, 75 insertions(+), 26 deletions(-) create mode 100644 docs/getting_started.rst rename docs/{gettingstarted.rst => trying_the_demo.rst} (77%) diff --git a/docs/getting_started.rst b/docs/getting_started.rst new file mode 100644 index 000000000..fb9b2bb8c --- /dev/null +++ b/docs/getting_started.rst @@ -0,0 +1,61 @@ +.. _getting_started: + +=============== +Getting started +=============== + +Installing Wagtail +================== + +From PyPI +--------- + +This is recommended for stability. + +.. code-block:: bash + + pip install wagtail + + +From Github +----------- + +This will give you the latest development version of Wagtail. + +.. code-block:: bash + + pip install -e git://github.com/torchbox/wagtail.git#egg=wagtail + + +The ``wagtail-project`` command +=============================== + +.. versionadded:: 0.5 + +Once you have Wagtail installed on your host machine, you can use the ``wagtail-project`` command. + +Usage: + +.. code-block:: bash + + wagtail-project + + +This command will setup a skeleton Wagtail project with the following features installed: + + - A core app with migrations to replace the default Homepage + - Base templates (base, 404, 500) + - Vagrant configuration + - Fabfile + - Docs directory (with Sphinx configuration) + - Split up settings configuration (different settings for dev and production) + - Requirements + + +Where to look next +================== + +.. toctree:: + :maxdepth: 2 + + building_your_site/index diff --git a/docs/index.rst b/docs/index.rst index 2ab429eb6..4cc3bddfb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,9 +8,10 @@ It supports Django 1.6.2+ on Python 2.6, 2.7, 3.2, 3.3 and 3.4. Django 1.7 suppo .. toctree:: :maxdepth: 3 - gettingstarted - settings + trying_the_demo + getting_started building_your_site/index + settings editing_api snippets search/index diff --git a/docs/gettingstarted.rst b/docs/trying_the_demo.rst similarity index 77% rename from docs/gettingstarted.rst rename to docs/trying_the_demo.rst index 04905700e..865d1d9a2 100644 --- a/docs/gettingstarted.rst +++ b/docs/trying_the_demo.rst @@ -1,4 +1,4 @@ -Getting Started +Trying the demo --------------- On Ubuntu @@ -17,7 +17,6 @@ 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 ~~~~~~~~~ @@ -35,7 +34,6 @@ 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 ~~~~~~~ @@ -53,6 +51,7 @@ Edit ``wagtaildemo/settings/base.py``, changing ENGINE to django.db.backends.sql ./manage.py migrate ./manage.py runserver + Using Vagrant ~~~~~~~~~~~~~ @@ -80,6 +79,7 @@ Wagtail instance available as the basis for your new site: is located on the host machine, exported to the VM as a shared folder; code editing and Git operations will generally be done on the host. + Using Docker ~~~~~~~~~~~~ @@ -92,12 +92,14 @@ interface at http://your-ip:8000/admin using admin / test. See https://index.docker.io/u/oyvindsk/wagtail-demo/ for more details. + Other platforms ~~~~~~~~~~~~~~~ If you're not using Ubuntu or Debian, or if you prefer to install Wagtail manually, use the following steps: + Required dependencies ===================== @@ -107,6 +109,7 @@ Required dependencies - `libxslt `_ - `zlib `_ + Optional dependencies ===================== @@ -114,6 +117,7 @@ Optional dependencies - `Elasticsearch`_ - `Redis`_ + Installation ============ @@ -130,6 +134,7 @@ run the following commands:: ./manage.py migrate ./manage.py runserver + SQLite support ============== @@ -144,26 +149,8 @@ with a regular Django project. .. _Elasticsearch: http://www.elasticsearch.org .. _Redis: http://redis.io/ -_`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. +Creating your own site +====================== -``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/settings/base.py +Once you've experimented with the demo app and are ready to build your pages via your own app take a look at the :ref:`getting_started` documentation.