diff --git a/docs/getting_started/creating_your_project.rst b/docs/getting_started/creating_your_project.rst index 6264ef3fd7..322218223d 100644 --- a/docs/getting_started/creating_your_project.rst +++ b/docs/getting_started/creating_your_project.rst @@ -1,38 +1,79 @@ -===================== -Creating your project -===================== +=========================== +Starting your first project +=========================== -.. contents:: Contents - :local: +Once you've installed Wagtail, you are ready start your first project. -The ``wagtail start`` command -============================= - -The easiest way to start a new project with wagtail is to use the ``wagtail start`` command. This command is installed into your environment when you install Wagtail (see: :doc:`installation`). - -The command works the same way as ``django-admin.py startproject`` except that the produced project is pre-configured for Wagtail. It also contains some useful extras which are documented :doc:`here `. - -To create a project, cd into a directory where you would like to create your project and run the following command: +Wagtail provides a command to get you started called ``wagtail start``. Open up a command line shell in your project folder and type: .. code-block:: bash wagtail start mysite +This should create a new folder called ``mysite``. Its contents are similar to what ``django-admin.py startproject`` creates but ``wagtail start`` comes with some useful extras that are documented :doc:`here <../reference/project_template>`. + + Running it ========== -TODO - - cd mysite - pip install -r requirements.txt - python manage.py migrate - python manage.py createsuperuser - python manage.py runserver +Firstly, open up a command line shell in your new projects directory. -Your site is now accessible at http://localhost:8000, with the admin backend available at http://localhost:8000/admin/ . +* **1. Create a virtual environment** + + This is only required when you first run your project. This creates a folder to install extra Python modules into. + + **Linux/Mac OSX:** :code:`pyvenv venv` + + **Windows:** :code:`c:\Python34\python -m venv myenv` + + + https://docs.python.org/3/library/venv.html + + + **Python 2.7** + + ``pyvenv`` is only included with Python 3.3 onwards. To get virtual environments on Python 2, use the ``virtualenv`` package: + + .. code-block:: bash + + pip install virtualenv + virtualenv venv + + +* **2. Activate the virtual environment** + + **Linux/Mac OSX:** :code:`source venv/bin/activate` + + **Windows:** :code:`venv/Scripts/activate.bat` + + https://docs.python.org/3/library/venv.html + + +* **3. Install PIP requirements** + + :code:`pip install -r requirements.txt` + + +* **4. Create the database** + + By default, this would create an SQLite database file within the project directory. + + :code:`python manage.py migrate` + + +* **5. Create an admin user** + + :code:`python manage.py createsuperuser` + + +* **6. Run the development server** + + :code:`python manage.py runserver` + + Your site is now accessible at ``http://localhost:8000``, with the admin backend available at ``http://localhost:8000/admin/``. Using Vagrant @@ -40,5 +81,4 @@ Using Vagrant TODO - -:doc:`getting_started/using_vagrant` +:doc:`using_vagrant` diff --git a/docs/getting_started/index.rst b/docs/getting_started/index.rst index c614276e8f..239df37e10 100644 --- a/docs/getting_started/index.rst +++ b/docs/getting_started/index.rst @@ -7,3 +7,4 @@ Getting started installation creating_your_project + using_vagrant diff --git a/docs/getting_started/installation.rst b/docs/getting_started/installation.rst index 823f298182..0628f13adf 100644 --- a/docs/getting_started/installation.rst +++ b/docs/getting_started/installation.rst @@ -14,10 +14,15 @@ Whether you just want to try out the demo site, or you're ready to dive in and c Install Python ============== +We recommend installing Python 3.4, but Wagtail also works with Python 2.7 and 3.3. + + Install Wagtail =============== +``pip install wagtail`` + Optional extras =============== diff --git a/docs/index.rst b/docs/index.rst index d8187fe4bd..05fe57ce00 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,9 +8,9 @@ Below are some useful links to help you get started with Wagtail. * **First steps** - :doc:`Installation ` + :doc:`getting_started/installation` - :doc:`Starting a project ` + :doc:`getting_started/creating_your_project` * **Creating your Wagtail site** @@ -29,3 +29,21 @@ Below are some useful links to help you get started with Wagtail. * **Using Wagtail** :doc:`Editors guide ` + + +Index +----- + + +.. toctree:: + :maxdepth: 2 + :titlesonly: + + getting_started/index + core_components/index + contrib_components/index + howto/index + reference/index + support + editor_manual/index + releases/index diff --git a/docs/reference/index.rst b/docs/reference/index.rst index c144fc6b19..568600b52c 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -6,3 +6,4 @@ Reference :maxdepth: 2 management_commands + project_template diff --git a/docs/getting_started/the_template.rst b/docs/reference/project_template.rst similarity index 96% rename from docs/getting_started/the_template.rst rename to docs/reference/project_template.rst index 34e29d9af0..8b5baadbec 100644 --- a/docs/getting_started/the_template.rst +++ b/docs/reference/project_template.rst @@ -1,6 +1,8 @@ The project template ==================== +.. code-block:: text + mysite/ core/ static/ @@ -46,7 +48,7 @@ Location: ``/Vagrantfile`` and ``/vagrant/`` If you have Vagrant installed, these files let you easily setup a development environment with PostgreSQL and Elasticsearch inside a virtual machine. -See below section `With Vagrant`_ for info on how to use Vagrant in development +See :doc:`../getting_started/using_vagrant` for info on how to use Vagrant in development If you do not want to use Vagrant, you can just delete these files.