the mobility middlewares are now on by default for dev

This commit is contained in:
Jeff Balogh 2011-02-03 14:20:30 -08:00
Родитель d80db201ff
Коммит 2afcfd85c7
3 изменённых файлов: 2 добавлений и 38 удалений

Просмотреть файл

@ -50,9 +50,3 @@ SESSION_COOKIE_DOMAIN = None
# Run tasks immediately, don't try using the queue.
CELERY_ALWAYS_EAGER = True
# Add DetectMobileMiddleware for mobile development.
mwc = MIDDLEWARE_CLASSES
xmobile = mwc.index('mobile.middleware.XMobileMiddleware')
detect = ('mobile.middleware.DetectMobileMiddleware',)
MIDDLEWARE_CLASSES = mwc[:xmobile] + detect + mwc[xmobile:]

Просмотреть файл

@ -4,29 +4,5 @@
Working on the Mobile Site
==========================
The mobile version of amo expects to be served through ``MOBILE_DOMAIN`` (the
normal site is served through ``DOMAIN``).
Defining domains
----------------
In ``etc/hosts`` I have localhost (``127.0.0.1``) aliased to ``z`` for brevity. Then
I added another ``mz`` alias for the mobile domain::
127.0.0.1 localhost z mz
I let zamboni know about all this in ``settings_local.py``::
DOMAIN = 'z'
SITE_URL = 'http://%s' % DOMAIN
MOBILE_DOMAIN = 'mz'
MOBILE_SITE_URL = 'http://%s' % MOBILE_DOMAIN
Add ``DetectMobileMiddleware`` to your ``settings_local.py``::
mwc = MIDDLEWARE_CLASSES
xmobile = mwc.index('mobile.middleware.XMobileMiddleware')
detect = ('mobile.middleware.DetectMobileMiddleware',)
MIDDLEWARE_CLASSES = mwc[:xmobile] + detect + mwc[xmobile:]
Use https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/ to get
a Fennec user agent and the mobile detection middleware will do the rest.

Просмотреть файл

@ -68,12 +68,6 @@ TEST_SPHINX_LOG_PATH = TMP_PATH + '/$1/log/serachd'
TEST_SPHINXQL_PORT = 340${EXECUTOR_NUMBER}
TEST_SPHINX_PORT = 341${EXECUTOR_NUMBER}
ASYNC_SIGNALS = False
mwc = MIDDLEWARE_CLASSES
xmobile = mwc.index('mobile.middleware.XMobileMiddleware')
detect = ('mobile.middleware.DetectMobileMiddleware',)
MIDDLEWARE_CLASSES = mwc[:xmobile] + detect + mwc[xmobile:]
SETTINGS