2015-02-11 18:30:03 +01:00
===========================
Starting your first project
===========================
2014-09-11 17:18:45 +02:00
2015-02-11 18:30:03 +01:00
Once you've installed Wagtail, you are ready start your first project.
2014-09-11 17:18:45 +02:00
2015-02-11 18:30:03 +01:00
Wagtail provides a command to get you started called `` wagtail start `` . Open up a command line shell in your project folder and type:
2014-09-11 17:18:45 +02:00
.. code-block :: bash
wagtail start mysite
2015-02-11 18:30:03 +01:00
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>` .
2015-02-11 17:15:52 +01:00
Running it
==========
2014-09-11 17:18:45 +02:00
2015-02-11 18:30:03 +01:00
Firstly, open up a command line shell in your new projects directory.
* **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
2014-09-11 17:18:45 +02:00
2015-02-11 18:30:03 +01:00
* **2. Activate the virtual environment**
2014-09-11 17:18:45 +02:00
2015-02-11 18:30:03 +01:00
**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/ `` .
2014-09-11 17:18:45 +02:00
2015-02-11 17:15:52 +01:00
Using Vagrant
-------------
2014-09-11 17:18:45 +02:00
2015-02-11 17:15:52 +01:00
TODO
2014-09-11 17:18:45 +02:00
2015-02-11 18:30:03 +01:00
:doc: `using_vagrant`