Skip to content

Instantly share code, notes, and snippets.

View rgaudin's full-sized avatar

rgaudin rgaudin

  • yɛlɛman
  • Bamako, Mali
View GitHub Profile
diff --git a/lib/rapidsms/message.py b/lib/rapidsms/message.py
index 6d55978..186e36b 100644
--- a/lib/rapidsms/message.py
+++ b/lib/rapidsms/message.py
@@ -55,7 +55,15 @@ class Message(object):
def send(self):
"""Send this message via self.connection.backend, returning
True if the message was sent successfully."""
- return self.connection.backend.router.outgoing(self)
+ # apply idswitch function if exists
diff --git a/lib/pygsm/gsmmodem.py b/lib/pygsm/gsmmodem.py
index 1b89a07..5b9c2c8 100644
--- a/lib/pygsm/gsmmodem.py
+++ b/lib/pygsm/gsmmodem.py
@@ -850,6 +850,45 @@ class GsmModem(object):
# remove the message that has been waiting
# longest from the queue, and return it
return self.incoming_queue.pop(0)
+
+ def ussd(self, cmd, read_term=None, read_timeout=None, write_term="\r", raise_errors=True):
# RapidSMS configuration file.
# Apps not embeded are located in rapidsms distro. symlink them.
[rapidsms]
#apps=httptester,admin,mctc
apps=idswitch,httptester,locations,reporters,prepaid,admin,tinystock,drugtrack,webapp,messaging
backends=http,gsm
[database]
engine=sqlite3
# Example setup configuration file
[main]
url=git://github.com/mvpdev/rapidsms.git
name=sms
rev=HEAD
[rapidsms]
url=git://github.com/rapidsms/rapidsms.git
diff --git a/apps/locations/admin.py b/apps/locations/admin.py
index 7adac12..6341cb4 100644
--- a/apps/locations/admin.py
+++ b/apps/locations/admin.py
@@ -5,6 +5,10 @@
from django.contrib import admin
from locations.models import *
+class LocationAdmin(admin.ModelAdmin):
+ list_display = ('__unicode__', 'code', 'type', 'parent',)
# Example setup configuration file
[main]
url=git://github.com/mvpdev/rapidsms.git
name=sms
rev=HEAD
[rapidsms]
url=git://github.com/rapidsms/rapidsms.git
name=rapidsms-git
# RapidSMS configuration file.
# Apps not embeded are located in rapidsms distro. symlink them.
# /!\ rapidsms route throws a warning at start due to django.contrib.humanize
# this behavior is OK. Please, ignore
[rapidsms]
apps=messaging,idswitch,django.contrib.humanize,free2u,webapp,ajax,logger,httptester,ping,admin,patterns,reporters,locations,scheduler,tinystock,findug
backends=http,kannel
[database]
diff --git a/apps/webapp/static/stylesheets/layout.css b/apps/webapp/static/stylesheets/layout.css
index 3fba1ad..0f0cfbf 100644
--- a/apps/webapp/static/stylesheets/layout.css
+++ b/apps/webapp/static/stylesheets/layout.css
@@ -125,8 +125,8 @@ div.clear-hack {
/* global tabs sit on the right,
* page-specific tabs sit on the
* left, to draw more attention */
- #tabs { right: 0; }
- #page-tabs { left: 0; }
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index 529898e..dcac719 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -405,8 +405,9 @@ def create_many_related_manager(superclass, through=False):
"""Creates a manager that subclasses 'superclass' (which is a Manager)
and adds behavior for many-to-many related objects."""
class ManyRelatedManager(superclass):
- def __init__(self, model=None, core_filters=None, instance=None, symmetrical=None,
- join_table=None, source_col_name=None, target_col_name=None):
#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
import re
import urllib
from datetime import datetime
from select import select
from SocketServer import ThreadingMixIn
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer