-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
For a good work, it is advised to install all your projects in a virtualenv . The advantage of a virtualenv is to help you to create a python environment in which you can create different applications with different versions of components. eg : different versions of Django, Python,.... For How to create a virtualenv and start a new project go to this section : Virtualenv and virtualenvwrapper. Now let us create a new project to start our rapidsms application.
:~$ mkvirtualenv rapidsms
It will create a virtualenv and you may get the prompt transformed to this :
(rapidsms) user_x@machine_x:~$ pip install rapidsms
When starting a new RapidSMS project, we can use the RapidSMS project template . The template is a custom project template for Django 1.4 and therefore requires Django 1.4 or later to use. So, we install it...:
:~$ pip install django>=1.5
Now, use the startproject management command with the template as an option. We’ll just need to specify our project name (Rapidsms) at the end of the command:
:~$ django-admin.py startproject --template=https://github.com/rapidsms/rapidsms-project-template/zipball/release-0.14.0 --extension=py,rst Rapidsms
so we :
:~$ cd Rapidsms
And there we find, some files (manage.py,README.rst) and some folders (rapidsms1/, requirements/ ). So we have to install all the requirements modules, written in the requirements/base.txt file :
:~/Rapidsms$ pip install -r requirements/base.txt
And then we sync, in order to create all the required databases:
:~/Rapidsms$ python manage.py syncdb
after the sync, we have to migrate all the modules :
:~/Rapidsms$ python manage.py migrate
now we are able to fire up the server:
:~/Rapidsms$ python manage.py runserver
and the we go to localhost in the browser.