RapidSMS 0.12.0 release notes¶
Welcome to RapidSMS 0.12.0! These release notes cover the new features in 0.12.0 as well as some backwards incompatible changes in 0.12.0 you’ll want to be aware of when upgrading from RapidSMS 0.11.0. Most RapidSMS sites and applications will require some changes when upgrading to RapidSMS 0.12.0.
They key changes in 0.12.0 are:
- Twitter Bootstrap: The RapidSMS pages now use Twitter Bootstrap v2.2.2 for a more up-to-date and easily extensible appearance. See Front End for more information.
- Contrib app updates: Most of the contrib apps have been updated to use more up-to-date Django practices and to add documentation and tests. A few obsolete apps have been removed.
- Supporting Django 1.4+: RapidSMS is no longer compatible with any version of Django prior to 1.4. See the Django 1.4 release notes for more information.
- Removed RAPIDSMS_TABS: Top level navigation is now managed with an inclusion template.
- Officially adopted Celery: Following the inclusion of
CeleryRouter
, we’ve removedrapidsms.contrib.scheduler
in favor of using Celery directly with RapidSMS. See Using Celery for Scheduling Tasks for more information.
Updating to RapidSMS 0.12.0¶
You can follow these basic guidelines when upgrading from RapidSMS 0.11.0:
- Upgrade to at least Django 1.4
- If upgrading to Django 1.5:
- Verify urls.py files have been updated
- Verify url template tags in templates have been updated
- Set up
rapidsms/_nav_bar.html
to replace the RAPIDSMS_TABS setting - Install
django_tables2
anddjango-selectable
via pip or add to your requirements file. See new dependencies for more information. - Add
django_tables2
andselectable
toINSTALLED_APPS
. - Remove references to removed apps.
Backwards-incompatible changes in RapidSMS 0.12.0¶
In the goal of improving the RapidSMS core, we have made a number of backwards- incompatible changes.
Change to Twitter Bootstrap¶
With the change to Twitter Bootstrap, the organization of pages has changed. Simple apps might continue to work okay, but any app that relied on the previous page structure to control styling or layout might need changes.
Dropped Django 1.3 support¶
We decided to drop Django 1.3 support to take advantage of the functionality offered in Django 1.4+, including bulk_create and override_settings. Additionally, with the release of Django 1.5, Django 1.3 is no longer supported by the Django developers.
Please read the Django 1.4 release notes for upgrade instructions, especially Backwards incompatible changes in 1.4.
Add Django 1.5 Support¶
RapidSMS 0.12.0 should work correctly with Django 1.5, and we encourage upgrading to Django 1.5 when possible.
Please read the Django 1.5 release notes for upgrade instructions, especially Backwards incompatible changes in 1.5.
We believe the most common changes affecting RapidSMS projects will be:
Removal of django.conf.urls.defaults¶
Make the following change to all of your urls.py
:
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns, url
Change to the url template tag¶
If any of your templates still use the old url template tag syntax, not quoting a literal url name, e.g.:
{% url url-name %}
for Django 1.5 they must be changed to quote the url name (or use a variable whose value is a url name):
{% url 'url-name' %}
If you wish to maintain compatibility with Django 1.4, you can add
{% load url from future %}
near the top of your template, e.g.:
{% load url from future %}
{% url 'url-name' %}
which will turn on support for quoted url names in Django 1.4, and be harmless in later Django releases.
Removed stale contrib apps¶
The following contrib applications have been removed:
rapidsms.contrib.ajax
: Old API used for communicating with the legacy router and no longer needed.rapidsms.contrib.export
: Horribly insecure database export feature.rapidsms.contrib.scheduler
: We officially adopted Celery for scheduling and asynchronous task processing. See Using Celery for Scheduling Tasks for more information.
If your project references these packages, you’ll need to update your code appropriately.
New dependencies¶
Some of the contrib apps now use django-tables2 in place of the RapidSMS paginator utility to provide paging in tables. django-tables2 requires less code to set up for common cases, and also allows eventually removing paginator from RapidSMS, so there’s one less component to maintain.
The only app still using djtables is the locations app.
The messaging app uses django-selectable to provide autocompletion in an input field. django-selectable is a well-maintained, full-featured library for adding autocompletion in Django apps.
RAPIDSMS_TABS setting removed¶
The RAPIDSMS_TABS setting has been removed. This was used to configure the list of links displayed at the top of each page when using the RapidSMS templates. It was not very amenable to customization.
Starting in 0.12.0, the configurable links at the top of the page are generated by including a template, rapidsms/_nav_bar.html, which the RapidSMS project can override. Typically one would put list items there containing links. For example:
{% load url from future %}
<li><a href="{% url 'message_log' %}">Message Log</a></li>
<li><a href="{% url 'registration' %}">Registration</a></li>
<li><a href="{% url 'messaging' %}">Messaging</a></li>
<li><a href="{% url 'httptester' %}">Message Tester</a></li>
Region tags removed¶
These were in the base template.
Moved Message direction constants to model¶
The constant rapidsms.contrib.messagelog.models.DIRECTION_CHOICES
has been
moved to the rapidsms.contrib.messagelog.models.Message
model. You may
also refer to Message.INCOMING
and Message.OUTGOING
directly.
Test Coverage Report¶
With the addition of 26 tests, RapidSMS now has 136 automated unit tests with 82% (up from 72%) coverage.