diff --git a/requirements.txt b/requirements.txt index 9c78d9d..f0fcb72 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,7 @@ pytz==2011n chardet==1.0.1 python-dateutil==1.5 django-cliauth==0.9 +django-mobile==0.3.0 gunicorn gevent diff --git a/src/colab/custom_settings.py b/src/colab/custom_settings.py index 9abef84..9fd2ae4 100644 --- a/src/colab/custom_settings.py +++ b/src/colab/custom_settings.py @@ -21,6 +21,7 @@ INSTALLED_APPS = INSTALLED_APPS + ( 'raven.contrib.django.raven_compat', 'south', 'cliauth', + 'django_mobile', 'django_browserid', 'conversejs', @@ -118,6 +119,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.messages.context_processors.messages', 'django.core.context_processors.request', 'django_browserid.context_processors.browserid', + 'django_mobile.context_processors.is_mobile', ) MIDDLEWARE_CLASSES = ( @@ -128,6 +130,8 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'django_mobile.middleware.MobileDetectionMiddleware', + 'django_mobile.middleware.SetFlavourMiddleware', ) # Add the django_browserid authentication backend. diff --git a/src/templates/base.html b/src/templates/base.html index e1fa9ec..6573a46 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -10,7 +10,9 @@ href="{{ STATIC_URL }}third-party/font-awesome/css/font-awesome.min.css" type="text/css" media="screen" charset="utf-8"/> - {% conversejs_static %} + {% if not is_mobile %} + {% conversejs_static %} + {% endif %} @@ -156,10 +158,11 @@ {% endblock %} -
+ + {% if not is_mobile %} {% conversejs_chatpanel %} -
- {% conversejs_initialize %} + {% conversejs_initialize %} + {% endif %} {% browserid_js %} -- libgit2 0.21.2