From 0d01df954a89d2a3879e27f1322c58fb52a4b1a2 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Sat, 25 Oct 2014 19:13:03 +0200 Subject: [PATCH] Development recipes added. --- doc/extending/getting_started.rst | 67 +++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 doc/extending/getting_started.rst diff --git a/doc/extending/getting_started.rst b/doc/extending/getting_started.rst new file mode 100644 index 000000000..cde42354e --- /dev/null +++ b/doc/extending/getting_started.rst @@ -0,0 +1,67 @@ +############################### +Development recipes for Modoboa +############################### + +You would like to work on Modoboa but you don't know where to start? +You're at the right place! Browse this page to learn useful tips. + +.. _venv_for_dev: + +Prepare a virtual environment +============================= + +A `virtual environment +`_ is a good way to +setup a development environment on your machine. + +.. note:: + + ``virtualenv`` is available on all major distributions, just + install it using your favorite packages manager. + +To do so, run the following commands:: + + $ virtualenv + $ source /bin/activate + $ git clone https://github.com/tonioo/modoboa.git + $ cd modoboa + $ python setup.py develop + +The ``develop`` command creates a symbolic link to your local copy so +any modification you make will be automatically available in your +environment, no need to copy them. + +Deploy an instance for development +================================== + +.. warning:: + + Make sure to :ref:`create a database ` before running + this step. + +Now that you have a :ref:`running environment `, you're +ready to deploy a test instance:: + + $ modoboa-admin.py deploy --syncdb --devel --dburl + $ cd + $ python manage.py runserver + +You're ready to go! + +Manage static files +=================== + +Modoboa uses `bower `_ (thanks to `django-bower `_) +to manage its CSS and javascript dependencies. + +Those dependencies are listed in a file called :file:`dev_settings.py` +located inside the :file:`/modoboa/core` +directory. + +If you want to add a new dependency, just complete the +``BOWER_INSTALLED_APPS`` parameter and run the following command:: + + $ python manage.py bower install + +It will download and store the required files into the +:file:`/modoboa/bower_components` directory.