{ "info": { "author": "Guillaume Pousseo , Tomasz Roszko , Rafal Selewonko ", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "###############\nDjango Adaptive\n###############\n\nManages to load templates according to the type of device to a specific directory prefix.\n\nThese loaders work with the django-mobi app. Please read the documentation for more information: https://pypi.python.org/pypi/django-mobi\n\n*******\nInstall\n*******\n\nIt is strongly recommanded to install this theme from GIT with PIP onto you project virtualenv.\n\nFrom PyPi\n\n.. code-block:: shell-session\n\n pip install django-adaptive\n\nFrom Github\n\n.. code-block:: shell-session\n\n -e git+https://github.com/RevSquare/django-adaptive#egg=django-adaptive\n\n*****\nSetup\n*****\n\nBefore starting, make sure you have correctly setup django-mobi: https://pypi.python.org/pypi/django-mobi\n\nDjango adaptive basicaly overwrites django default filesystem and app_directories loaders. You can pick the overwritten loader you want to use separately and use them concurently with the former django loaders.\n\nThe first step is to add the app in your installed apps list in settings.py\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...\n 'django_adaptive'\n ...\n )\n\nThen you will need to declare the loaders you want to add in your settings.py file\n\n.. code-block:: python\n\n TEMPLATE_LOADERS = (\n 'django-adaptive.filesystem.Loader',\n 'django-adaptive.app_directories.Loader',\n #'django.template.loaders.filesystem.Loader',\n #'django.template.loaders.app_directories.Loader',\n )\n\nIt's also possible to use cached loader.\nIt works with django 1.7.x\n\n.. code-block:: python\n\n TEMPLATE_LOADERS = (\n ('django_adaptive.cached.Loader', (\n 'django_adaptive.filesystem.Loader',\n 'django_adaptive.app_directories.Loader',\n )),\n )\n\nFinal step is to add ThreadLocal Middleware\n\n.. code-block:: python\n\n MIDDLEWARE_CLASSES = (\n ...\n 'mobi.middleware.MobileDetectionMiddleware',\n 'django_adaptive.middleware.ThreadLocals',\n ...\n )\n \n******************************\nDeclaring your device prefixes\n******************************\n\nAt this stage nothing will be done. You need to specify the directories for each device categories in your settings.py.\n\nThe settings constants are:\n\n* ADAPTIVE_TEMPLATE_DIRECTORIES_DESKTOP\n* ADAPTIVE_TEMPLATE_DIRECTORIES_TABLET\n* ADAPTIVE_TEMPLATE_DIRECTORIES_MOBILE\n\n\nUsage exemple:\n\n.. code-block:: python\n\n import os\n\n DEBUG = True\n TEMPLATE_DEBUG = DEBUG\n\n PROJECT_PATH = os.path.join(os.path.dirname(__file__), '..')\n \n TEMPLATE_DIRS = (\n os.path.join(PROJECT_PATH, 'templates')\n )\n \n ADAPTIVE_TEMPLATE_DIRECTORIES_MOBILE = 'mobile'\n\nThis code will install the templates for mobile in the *templates/mobile* directory. And the rest of the files in *templates* (by default no prefix is added).\n\nIn case you would need to combine devices type in a similar directory, you just need to point them to it. For exemple:\n\n.. code-block:: python\n\n ADAPTIVE_TEMPLATE_DIRECTORIES_DESKTOP = 'desktop'\n ADAPTIVE_TEMPLATE_DIRECTORIES_TABLET = 'mobile'\n ADAPTIVE_TEMPLATE_DIRECTORIES_MOBILE = 'mobile'\n \nThis would render the same type of template for both tablets and mobile devices.\n\n\n*****\nLINKS\n*****\n\nDevelopment:\n https://github.com/RevSquare/django-adaptive\n\nPackage:\n https://pypi.python.org/pypi/django-adaptive", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.revsquare.com", "keywords": null, "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "django-adaptive", "package_url": "https://pypi.org/project/django-adaptive/", "platform": "OS Independent", "project_url": "https://pypi.org/project/django-adaptive/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.revsquare.com" }, "release_url": "https://pypi.org/project/django-adaptive/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "Manages to load templates according to the type of device to a specific directory prefix.", "version": "1.0.2" }, "last_serial": 1965262, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "82c49f466c25c2f95398143335652aa3", "sha256": "eb348830fd2ef6daa717cddffcb245a71a7b646a65d33ec4a701201d0cf2a57f" }, "downloads": -1, "filename": "django-adaptive-1.0.0.tar.gz", "has_sig": false, "md5_digest": "82c49f466c25c2f95398143335652aa3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4690, "upload_time": "2014-11-13T20:35:15", "url": "https://files.pythonhosted.org/packages/63/21/c984cba50664798f6f70cc3963404a2a1b413994b8c3eb58a8b68f191a23/django-adaptive-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "6166b540bb4ff149009d37d1c91813eb", "sha256": "43e54e174090864b2ab9538650630d2ae5c1394b537ca48506d033eee7ed0813" }, "downloads": -1, "filename": "django-adaptive-1.0.1.tar.gz", "has_sig": false, "md5_digest": "6166b540bb4ff149009d37d1c91813eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4884, "upload_time": "2016-02-18T09:07:10", "url": "https://files.pythonhosted.org/packages/43/85/daa5062fb1e069cbb588799ba31560e02a8f0fd35bb6558db3e5fc9aea95/django-adaptive-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "1fe67bc2eb4532eb76d0aede5f8ab3bb", "sha256": "0711dca08d9d85f13cf8796f9350ba0df00f52c35743c10073c6ce1d304814da" }, "downloads": -1, "filename": "django-adaptive-1.0.2.tar.gz", "has_sig": false, "md5_digest": "1fe67bc2eb4532eb76d0aede5f8ab3bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4924, "upload_time": "2016-02-19T14:03:35", "url": "https://files.pythonhosted.org/packages/d6/19/fb2c9ad1028356c177a3a370d35e3bb81c60026d49e837db5db8d5ea381a/django-adaptive-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1fe67bc2eb4532eb76d0aede5f8ab3bb", "sha256": "0711dca08d9d85f13cf8796f9350ba0df00f52c35743c10073c6ce1d304814da" }, "downloads": -1, "filename": "django-adaptive-1.0.2.tar.gz", "has_sig": false, "md5_digest": "1fe67bc2eb4532eb76d0aede5f8ab3bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4924, "upload_time": "2016-02-19T14:03:35", "url": "https://files.pythonhosted.org/packages/d6/19/fb2c9ad1028356c177a3a370d35e3bb81c60026d49e837db5db8d5ea381a/django-adaptive-1.0.2.tar.gz" } ] }