django-bpmobile 0.1 documentation
2009年9月現在、NTT DoCoMoが公開しているiモードHTMLシミュレータIIはiモードIDに対応していません。django-bpmobileでは、Djangoの runserver コマンドの代わりに、サーバサイドでiモードIDのシミュレーションをサポートする runserver_imode コマンドを提供しています。iアプリの開発で利用することもできます。
$ python manage.py runserver_imode --guid=1234567
django-bpmobileのデフォルト出力文字コード以外のコードで、レスポンスを返したい場合には encoded_response デコレータを使用します。
from django.http import HttpResponse
from bpmobile.decorators import encoded_response
@encoded_response(encoding='cp932', charset='Shift_JIS', content_type='text/html')
def some_view(request):
return HttpResponse(u'これはどのキャリアでもShift_JISになります。')