Skip to content

Added more improvements about i18n, Spanish l10n and colab docs with Sphinx #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,9 @@ For the next deploy you can just run ``fab deploy`` and in case your
``requirements.txt`` changes ``fab deploy:update``.

The deployed code will be accessible on ``http://localhost:8080``.


.. image:: https://d2weczhvl823v0.cloudfront.net/CanaimaGNULinux/colab/trend.png
:alt: Bitdeli badge
:target: https://bitdeli.com/free

109 changes: 109 additions & 0 deletions docs/debianwheezy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
.. -*- coding: utf-8 -*-

.. highlight:: rest

.. _debianwheezy_install:

Installation instructions for Debian Wheezy
===========================================

.. contents :: :local:

Install dependencies
--------------------

* Install Git and VirtualBox: ::

aptitude install git-core virtualbox libevent-dev

* Download Vagrant 3.3 and install it: ::

wget http://files.vagrantup.com/packages/a40522f5fabccb9ddabad03d836e120ff5d14093/vagrant_1.3.5_i686.deb
dpkg -i vagrant_1.3.5_i686.deb

* Install Fabric: ::

aptitude install build-essential python-dev python-pkg-resources python-setuptools
easy_install --upgrade pip
pip install --upgrade setuptools
pip install fabric

Getting started with the Virtual Machine
------------------------------------------

First you will need to clone the repository:

::

git clone [email protected]:interlegis/colab.git


.. note::

Here we are assuming you have ssh permissions to clone the repo using ssh. If not
fork it and clone your own fork (or use https instead of ssh).


Enter in the repository you've just cloned.
To start working all you need is to turn the virtual machine on with the command:

::

vagrant up


.. note::

BE PATIENT!

This will take a while. The :command:`vagrant up` will download a full virtual
machine (with ``virtualbox``) running a *Ubuntu 12.04 64bits*. After the vm is up
and running the command will also configure it (using ``puppet``) and that will
also take a bit.


Running Colab
--------------

Now that you have a vm running we have two options to run Colab:

* Django development server (runserver)

* Gunicorn + supervisor + Nginx


Django development server (runserver)
++++++++++++++++++++++++++++++++++++++

This option is advised for developers working in new features for Colab.
The code used to run Colab will be the same code placed on your machine,
that means that if you change the code in your own computer the code on
the vm will also change.

Make sure you have a :file:`local_settings.py` file placed in your repository. It
should be located in :file:`src/colab/`.

To get started you can copy the example file as follow:

::

cp src/colab/local_settings-dev.py src/colab/local_settings.py


Now we are ready to run:

::

fab runserver


.. note::

As this is the first time you run this command it will install all
requirements from :file:`requirements.txt` into a virtualenv. To update
those requirements you should run :command:`fab runserver:update`.


The :command:`fab runserver` command will open the django builtin development
server on the port 7000 but due to vagrant magic you will be able to
access it on ``http://localhost:8000/``.
2 changes: 2 additions & 0 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ Colab software can be install in many Linux distros, like these:
.. toctree::
:maxdepth: 1

debianwheezy
ubuntu1204
ubuntu1004
108 changes: 108 additions & 0 deletions docs/ubuntu1204.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
.. -*- coding: utf-8 -*-

.. highlight:: rest

.. _ubuntu1204_install:

Installation instructions for Ubuntu 12.04
==========================================

.. contents :: :local:

Install dependencies
--------------------

* Install Git and VirtualBox: ::

sudo apt-get install git-core virtualbox

* Download Vagrant 3.3 and install it: ::

wget http://files.vagrantup.com/packages/a40522f5fabccb9ddabad03d836e120ff5d14093/vagrant_1.3.5_i686.deb
sudo dpkg -i vagrant_1.3.5_i686.deb

* Install Fabric: ::

sudo apt-get install build-essential python-dev python-pkg-resources python-setuptools
sudo easy_install --upgrade pip
sudo pip install fabric

Getting started with the Virtual Machine
------------------------------------------

First you will need to clone the repository:

.. code-block::

git clone [email protected]:interlegis/colab.git


.. note::

Here we are assuming you have ssh permissions to clone the repo using ssh. If not
fork it and clone your own fork (or use https instead of ssh).


Enter in the repository you've just cloned.
To start working all you need is to turn the virtual machine on with the command:

.. code-block::

vagrant up


.. note::

BE PATIENT!

This will take a while. The :command:`vagrant up` will download a full virtual
machine (with ``virtualbox``) running a *Ubuntu 12.04 64bits*. After the vm is up
and running the command will also configure it (using ``puppet``) and that will
also take a bit.


Running Colab
--------------

Now that you have a vm running we have two options to run Colab:

* Django development server (runserver)

* Gunicorn + supervisor + Nginx


Django development server (runserver)
++++++++++++++++++++++++++++++++++++++

This option is advised for developers working in new features for Colab.
The code used to run Colab will be the same code placed on your machine,
that means that if you change the code in your own computer the code on
the vm will also change.

Make sure you have a :file:`local_settings.py` file placed in your repository. It
should be located in :file:`src/colab/`.

To get started you can copy the example file as follow:

.. code-block::

cp src/colab/local_settings-dev.py src/colab/local_settings.py


Now we are ready to run:

.. code-block::

fab runserver


.. note::

As this is the first time you run this command it will install all
requirements from :file:`requirements.txt` into a virtualenv. To update
those requirements you should run :command:`fab runserver:update`.


The :command:`fab runserver` command will open the django builtin development
server on the port 7000 but due to vagrant magic you will be able to
access it on ``http://localhost:8000/``.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Django>=1.6,<1.7
South==0.8.1
South==0.8.4
psycopg2==2.5.1
django-piston==0.2.3
pytz==2011n
Expand Down
2 changes: 2 additions & 0 deletions src/badger/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,7 @@ def __unicode__(self):

class BadgeI18N(I18nModel):
class Meta:
verbose_name = _(u'Badge I18N')
verbose_name_plural = _(u'Badges I18N')
source_model = Badge
translation_fields = ('title', 'description')
Binary file added src/locale/es/LC_MESSAGES/django.mo
Binary file not shown.
Loading