Install needed librariesBefore using mamo you'll need to install some dependencies:http://sourceforge.net/projects/marimorepy/ Install mobiledjangoInstalling mamo is simple; It utilizes python's setup.py script, a standard way to distribute python packages. Installation procedures are the same as for marimorepy$ tar zxf mobiledjango-x.x.x.tar.gz$ cd mobiledjango$ sudo python setup.py installSetup djangoNext, you need to tell django to use mogo. There are 2 parts to this:
Setting up middlewareThe middleware in your settings.py should look something like this, in this order:MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'mamopublic.mogo.jp.d.mware.mobile.MobileIdentify', 'mamopublic.mogo.jp.d.mware.mobile.MobilePreSession', 'django.contrib.sessions.middleware.SessionMiddleware', 'mamopublic.mogo.jp.d.mware.mobile.MobileSession', 'django.contrib.auth.middleware.AuthenticationMiddleware',)The mamopublic.mogo.jp.d.mware packages are mogo's packages that handles jp mobiles. If we have packages for mobiles in a different locale, it'll be something like mamopublic.mogo.au.d.mware. Make sure MobileIdentify, MobilePreSession, SessionMiddleware and MobileSession are in the order above Insert required variablesThese are the variables you need to define in your settings.py file
settings.SESSION_COOKIE_NAME is optional, if you want to customize how the session cookies are called. By default, it's set to sessionid. Since you need to set this name in the URL for each HTTP call to emulate sessions, I suggest you set it to a shorter name, i.e sid |