{ "info": { "author": "Hayk Manukyan", "author_email": "haykhman@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# django-switchtemplatedir\nDjango middleware - symply switch template dir\n
Add 'django-switchtemplatedir.TemplateDirManager.TemplateDirMiddleware'
\nAdd TEMPLATE_DIR_METHOD 'switch' or 'subdomain'
\nAdd TEMPLATE_DIR_SETTINGS dictionary as defoult key named 'default' and list type value. Set first index of the list direction to the folder.
\nOptional - if need change the files format, set second index of the list '.format'
\nExample
\n\n\n```python\n TEMPLATE_DIR_METHOD = 'switch'\n TEMPLATE_DIR_SETTINGS = {'default' : [''], 'd' : ['desktop/'], 'm' : ['mobile/', '.html']}\n```\n\nExplanation
\nIn this example we use switch method
\nKey 'defoult' reach to template root folder, 'd' reach to ROOT/desktop folder, 'm' reach to ROOT/mobile and change predetermined in template_name file format to html
\n\nRecomended to use SwitchTemplateDir method. Import this method from django-switchtemplatedir.switcher
\nIn urls.py add\n\n```python \n'SOME_DIR/
Example
\n\n```python\n urls.py\n from django-switchtemplatedir.switcher import SwitchTemplateDir\n urlpatterns += [ path('somedir/If set up by example below, then link /somedir/d will switch to 'desktop/' folder
\nOr use switchTemplateDir function from TemplateDirManager and give argument one of TEMPLATE_DIR_SETTINGS keys
\n\nTested on Django 2.0
\n\nMIT License\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/haykhman/django-switchtemplatedir", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-switchtemplatedir", "package_url": "https://pypi.org/project/django-switchtemplatedir/", "platform": "", "project_url": "https://pypi.org/project/django-switchtemplatedir/", "project_urls": { "Homepage": "https://github.com/haykhman/django-switchtemplatedir" }, "release_url": "https://pypi.org/project/django-switchtemplatedir/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Django middleware - symply switch template dir", "version": "0.0.1" }, "last_serial": 4419325, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "44629ab572e217e548cb8a6536fa144b", "sha256": "d477016f0482289e4b6d1cd2e58cd9d4cff12873ab04617503b022d4554cc645" }, "downloads": -1, "filename": "django_switchtemplatedir-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "44629ab572e217e548cb8a6536fa144b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4308, "upload_time": "2018-10-26T13:29:45", "url": "https://files.pythonhosted.org/packages/ff/06/cd3b8a68f1d7e8c1daaea23556e8d21b895a93563e4f5caf851d653498ed/django_switchtemplatedir-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "576293f6805ce4d97cdf8f4f8ac54d7f", "sha256": "bc2996d78961eeee6539bebb564c6aca1cb97b0fc3efd955f249b1f2ed14f006" }, "downloads": -1, "filename": "django-switchtemplatedir-0.0.1.tar.gz", "has_sig": false, "md5_digest": "576293f6805ce4d97cdf8f4f8ac54d7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2590, "upload_time": "2018-10-26T13:29:47", "url": "https://files.pythonhosted.org/packages/3a/e2/21df0612fb2889eff10f80737f141c130583afb51bac5125cfcc655b9dbe/django-switchtemplatedir-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "44629ab572e217e548cb8a6536fa144b", "sha256": "d477016f0482289e4b6d1cd2e58cd9d4cff12873ab04617503b022d4554cc645" }, "downloads": -1, "filename": "django_switchtemplatedir-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "44629ab572e217e548cb8a6536fa144b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4308, "upload_time": "2018-10-26T13:29:45", "url": "https://files.pythonhosted.org/packages/ff/06/cd3b8a68f1d7e8c1daaea23556e8d21b895a93563e4f5caf851d653498ed/django_switchtemplatedir-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "576293f6805ce4d97cdf8f4f8ac54d7f", "sha256": "bc2996d78961eeee6539bebb564c6aca1cb97b0fc3efd955f249b1f2ed14f006" }, "downloads": -1, "filename": "django-switchtemplatedir-0.0.1.tar.gz", "has_sig": false, "md5_digest": "576293f6805ce4d97cdf8f4f8ac54d7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2590, "upload_time": "2018-10-26T13:29:47", "url": "https://files.pythonhosted.org/packages/3a/e2/21df0612fb2889eff10f80737f141c130583afb51bac5125cfcc655b9dbe/django-switchtemplatedir-0.0.1.tar.gz" } ] }