Updated docs to use the new wagtail-project command

This commit is contained in:
Karl Hobley 2014-07-15 15:05:01 +01:00
parent aee2869d5a
commit f224e1ca2d
3 changed files with 75 additions and 26 deletions

61
docs/getting_started.rst Normal file
View file

@ -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 <project name>
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

View file

@ -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

View file

@ -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
<https://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
<https://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 <http://xmlsoft.org/XSLT/>`_
- `zlib <http://www.zlib.net/>`_
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.