{ "info": { "author": "Grant McConnaughey", "author_email": "grantmcconnaughey@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Framework :: Django :: 1.9", "Framework :: Django :: 2.0", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "django-lazy-tags\n================\n\n.. image:: https://img.shields.io/pypi/v/django-lazy-tags.svg\n :target: https://pypi.python.org/pypi/django-lazy-tags\n\n.. image:: https://readthedocs.org/projects/django-lazy-tags/badge/?version=latest\n :target: http://django-lazy-tags.readthedocs.org/en/latest/\n :alt: Documentation Status\n\n.. image:: https://travis-ci.org/grantmcconnaughey/django-lazy-tags.svg\n :target: https://travis-ci.org/grantmcconnaughey/django-lazy-tags\n\n.. image:: https://coveralls.io/repos/grantmcconnaughey/django-lazy-tags/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/grantmcconnaughey/django-lazy-tags?branch=master\n\nA Django app for easily loading template tags via AJAX.\n\nInstallation\n------------\n\n1\\. Install via pip\n\n.. code-block:: python\n\n pip install django-lazy-tags\n\n2\\. Add to installed apps\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n # ...\n 'lazy_tags',\n )\n\n3\\. Add the lazy tags urls to your root urlconf.\n\n.. code-block:: python\n\n urlpatterns = patterns('',\n # ...\n url(r'^lazy_tags/', include('lazy_tags.urls')),\n )\n\nUsage\n-----\n\nFirst, load the ``lazy_tags`` library in your templates.\n\n.. code-block:: django\n\n {% load lazy_tags %}\n\nThen, call the ``lazy_tag`` template tag passing your tag name as the first parameter. The format is ``tag_library.tag_name`` where ``tag_library`` is what you would load at the top of the page (e.g. ``my_tags``) and ``tag_name`` is the name of your template tag (e.g. ``my_template_tag``). After the first argument to ``lazy_tag`` simply pass the rest of the args and kwargs just as you would pass them to your own tag.\n\nThis:\n\n.. code-block:: django\n\n {% load my_tags %}\n\n {% my_template_tag arg1 arg2 kw1='hello' kw2='world' %}\n\nBecomes this:\n\n.. code-block:: django\n\n {% load lazy_tags %}\n\n {% lazy_tag 'my_tags.my_template_tag' arg1 arg2 kw1='hello' kw2='world' %}\n\nAfter placing your template tags in the template you still need to specify where you would like the AJAX JavaScript to output to the page. That is what the ``lazy_tags_js`` tag is for:\n\n.. code-block:: django\n\n {% block js-additional %}\n {% lazy_tags_js%}\n {% endblock %}\n\nThis will spit out the JavaScript required to run the AJAX. The JavaScript changes depending on your ``LAZY_TAGS_AJAX_JS`` setting.\n\nThe lazy_tag decorator\n----------------------\n\ndjango-lazy-tags also includes a decorator that can be used on template tags that use ``simple_tag``. When using the ``lazy_tag`` decorator you can use your template tags exactly the same as before and they will use AJAX.\n\n.. code-block:: python\n\n from lazy_tags.decorators import lazy_tag\n\n @register.simple_tag\n @lazy_tag\n def show_user(pk):\n user = User.objects.get(pk=pk)\n return render_to_string('user/show_user.html', {\n 'user': user,\n })\n\nThere are a few caveats with this method. First, the decorator currently only works with tags that use ``simple_tag``. Hopefully this will work with ``inclusion_tag`` in the future. Secondly, the ``lazy_tag`` decorator must come *after* the ``simple_tag`` decorator.\n\nSettings\n--------\n\nLAZY_TAGS_AJAX_JS\n The library to use to run AJAX. Options are ``'javascript'``, ``'jquery'``, or ``'prototype'``. Defaults to ``'jquery'``.\n\nLAZY_TAGS_CACHE_TIMEOUT\n The timeout on each lazy tag cache. Defaults to ``60`` (seconds).\n\nLAZY_TAGS_ERROR_MESSAGE\n The error message to display if the AJAX request fails. Defaults to ``'An error occurred.'``\n\nCustomizing the Loading Animation\n---------------------------------\n\nThis is the default HTML on the page before the AJAX request completes:\n\n.. code-block:: html\n\n
\n
\n \n
\n
\n\nTo customize the loading animation, override the ``lazy-tag``, ``lazy-tag-spinner-container``, or ``lazy-tag-spinner`` classes in your CSS.\n\n\nCurrent Limitations\n-------------------\n\n* Does not work with tags that take context.\n* Template tag arguments must be serializable (str, unicode, int, float, etc.).\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/grantmcconnaughey/django-lazy-tags/", "keywords": "ajax,django,templatetag", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-lazy-tags", "package_url": "https://pypi.org/project/django-lazy-tags/", "platform": "", "project_url": "https://pypi.org/project/django-lazy-tags/", "project_urls": { "Homepage": "https://github.com/grantmcconnaughey/django-lazy-tags/" }, "release_url": "https://pypi.org/project/django-lazy-tags/0.5.0/", "requires_dist": null, "requires_python": "", "summary": "A Django app for lazy loading template tags over AJAX", "version": "0.5.0" }, "last_serial": 3551337, "releases": { "0.1.0": [], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2badd1f8a49dd27698f6e21212bae94b", "sha256": "6101ab24fd4be97fe2e9dba0cff4e0fb153535afe2cbbe76397f6498efba84bb" }, "downloads": -1, "filename": "django_lazy_tags-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2badd1f8a49dd27698f6e21212bae94b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8794, "upload_time": "2015-07-30T15:50:07", "url": "https://files.pythonhosted.org/packages/9f/ab/76cf9010a1274a3e69cb5957281d8a81d989d5110d471cffda8dcbb2951a/django_lazy_tags-0.2.0-py2.py3-none-any.whl" } ], "0.2.1": [], "0.2.2": [ { "comment_text": "", "digests": { "md5": "43faacd2e08cd471422d3fe2235ac159", "sha256": "6f5d77c1a77b7014216b123bfc5bd41ad18aff0813cbe3e38e4331496c9682be" }, "downloads": -1, "filename": "django_lazy_tags-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "43faacd2e08cd471422d3fe2235ac159", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9082, "upload_time": "2015-07-31T20:51:26", "url": "https://files.pythonhosted.org/packages/7c/60/da6264efc14c5b1f79f2b0044179e14ec371b617bb380754734b159ad754/django_lazy_tags-0.2.2-py2.py3-none-any.whl" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "35764e89b47f94ed130302c4c3491c2a", "sha256": "6334a4b089c1533c480c18d2dfd0cf879a0e98756487557faf16995e62176233" }, "downloads": -1, "filename": "django_lazy_tags-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "35764e89b47f94ed130302c4c3491c2a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21842, "upload_time": "2015-07-31T21:09:11", "url": "https://files.pythonhosted.org/packages/db/24/22d6a5e91c02f430fce45f6fb2e17c80c0cd261ebdc91c794531d6e9a56b/django_lazy_tags-0.2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fdf1a5335aff934ae816daa5eccbb29e", "sha256": "644db872a963be106d00bb0d73357e1d8d5fe3b9c31a95848ea6231de2d3de85" }, "downloads": -1, "filename": "django-lazy-tags-0.2.3.tar.gz", "has_sig": false, "md5_digest": "fdf1a5335aff934ae816daa5eccbb29e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 198819, "upload_time": "2015-07-31T21:09:06", "url": "https://files.pythonhosted.org/packages/3c/ac/dd2a3833634b03db6063ef3edc04673977cbd09472e768777a5023572959/django-lazy-tags-0.2.3.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "91191ce99e220a30dcc65d40f1b39d60", "sha256": "5551c39fcf11d286cd8e16b900f27bb0c0282e6e15462d0a4d2d80e9dfae0d4e" }, "downloads": -1, "filename": "django_lazy_tags-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "91191ce99e220a30dcc65d40f1b39d60", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27318, "upload_time": "2015-08-03T20:02:02", "url": "https://files.pythonhosted.org/packages/89/e7/6b81e3042a56164cab05a66557ae3d73ae2b87f951f1c3d10a9a1d67227d/django_lazy_tags-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1fa3d106ac5c9707541063c34d75289", "sha256": "b2aac2b9356d1c6305c83d6f110bdc1bce5af23944f0754b7f424d8161e81b91" }, "downloads": -1, "filename": "django-lazy-tags-0.3.0.tar.gz", "has_sig": false, "md5_digest": "f1fa3d106ac5c9707541063c34d75289", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 203995, "upload_time": "2015-08-03T20:01:58", "url": "https://files.pythonhosted.org/packages/d0/ff/f27b1ebad3fd32708676b63f37f5c562a1127d0492b8d163dcf920f56180/django-lazy-tags-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "957cdedd3055f5eb569cff3ae1c3bfdb", "sha256": "0db08684a7edbf3eba472266259bdac2036de00d6014e318b5994efbe768a9ed" }, "downloads": -1, "filename": "django_lazy_tags-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "957cdedd3055f5eb569cff3ae1c3bfdb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27949, "upload_time": "2015-08-10T04:23:27", "url": "https://files.pythonhosted.org/packages/88/6a/b1d13c3c9563bf7e0ddf0ec281d0abc0e19f3635fa19edbda4865af434f2/django_lazy_tags-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "60ec01396dc14f4d215ac4d778a2ed8f", "sha256": "8b2d127808c481a6faaf6ef0b07bc0544945fe0f2bfae027a7b4064ffd82fba4" }, "downloads": -1, "filename": "django-lazy-tags-0.3.1.tar.gz", "has_sig": false, "md5_digest": "60ec01396dc14f4d215ac4d778a2ed8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 204091, "upload_time": "2015-08-10T04:23:22", "url": "https://files.pythonhosted.org/packages/82/5f/0ea21063b3746cc645dcf6ebd9d03221099e7c516bceccc0136b2c96da63/django-lazy-tags-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "5cfdeea59d956f4ee41afa75534dd739", "sha256": "439e5f2d0f79b1b451c8428c6ffc870270b3d368f3363f4e94d8b6911a9af279" }, "downloads": -1, "filename": "django_lazy_tags-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5cfdeea59d956f4ee41afa75534dd739", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 28221, "upload_time": "2015-12-02T15:57:30", "url": "https://files.pythonhosted.org/packages/9e/d5/96b21930802cc8a7427299e36678092b3bb73d1b069a53fd9aeff3366863/django_lazy_tags-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "70bbdb65bff9d9c00fdb07fd6ff213ba", "sha256": "1abaa06b2b74a24395590262460dc395822a23d942e85325b7e0c029b33c8e67" }, "downloads": -1, "filename": "django-lazy-tags-0.4.0.tar.gz", "has_sig": false, "md5_digest": "70bbdb65bff9d9c00fdb07fd6ff213ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 204235, "upload_time": "2015-12-02T15:57:20", "url": "https://files.pythonhosted.org/packages/e7/30/3669c71f746ef72d33816043240600f92a3eb570a9b316eb0c91d2de21f1/django-lazy-tags-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "010489447aaabf91e484c9e2d89c6b25", "sha256": "b22e4588dba6921067656819aa9aa6dd4dbbe388661740d3a5d76214cd855d52" }, "downloads": -1, "filename": "django_lazy_tags-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "010489447aaabf91e484c9e2d89c6b25", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27980, "upload_time": "2016-01-18T03:19:00", "url": "https://files.pythonhosted.org/packages/d2/ed/1642328ccf0ff32076be1cdae5d779023d194cc74c6560986e0cc68a9bb7/django_lazy_tags-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "680f91035613e220c8272b563ad6c402", "sha256": "9cf2e9e8b790117328cd76a33068942a5e7ae2a659b9fd6a5faced2a3aeaac1e" }, "downloads": -1, "filename": "django-lazy-tags-0.4.1.tar.gz", "has_sig": false, "md5_digest": "680f91035613e220c8272b563ad6c402", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 204343, "upload_time": "2016-01-18T03:18:55", "url": "https://files.pythonhosted.org/packages/9f/fb/1f4587d1cb037b7dc16dd283a1f9bc1fed21f65612d7f604ac26c1b33cf0/django-lazy-tags-0.4.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "ea23f7f30903445049e07b9caf56a0a1", "sha256": "b3a81cf81420ea60eb146fe0f104843299535e78bb6b00bb2f721ec48c2e0ad4" }, "downloads": -1, "filename": "django_lazy_tags-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ea23f7f30903445049e07b9caf56a0a1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27934, "upload_time": "2018-02-04T21:48:37", "url": "https://files.pythonhosted.org/packages/5f/2f/35d342aa82c7126d6c49001d171cb5962b33afe45175ecf6ce3efe4cffd0/django_lazy_tags-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c0d38d1296e0975c144455e3dfa3413", "sha256": "8fb0645cd7bd46a8e7c372de7faed2929d5508ef5a205d8fc7985a5eaa9a1e57" }, "downloads": -1, "filename": "django-lazy-tags-0.5.0.tar.gz", "has_sig": false, "md5_digest": "7c0d38d1296e0975c144455e3dfa3413", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31936, "upload_time": "2018-02-04T21:48:39", "url": "https://files.pythonhosted.org/packages/97/04/c5e6b0ecbb95a015a52ba0c0891465d2a58c80fe190d4e0d45a76a7d59f5/django-lazy-tags-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ea23f7f30903445049e07b9caf56a0a1", "sha256": "b3a81cf81420ea60eb146fe0f104843299535e78bb6b00bb2f721ec48c2e0ad4" }, "downloads": -1, "filename": "django_lazy_tags-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ea23f7f30903445049e07b9caf56a0a1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27934, "upload_time": "2018-02-04T21:48:37", "url": "https://files.pythonhosted.org/packages/5f/2f/35d342aa82c7126d6c49001d171cb5962b33afe45175ecf6ce3efe4cffd0/django_lazy_tags-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c0d38d1296e0975c144455e3dfa3413", "sha256": "8fb0645cd7bd46a8e7c372de7faed2929d5508ef5a205d8fc7985a5eaa9a1e57" }, "downloads": -1, "filename": "django-lazy-tags-0.5.0.tar.gz", "has_sig": false, "md5_digest": "7c0d38d1296e0975c144455e3dfa3413", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31936, "upload_time": "2018-02-04T21:48:39", "url": "https://files.pythonhosted.org/packages/97/04/c5e6b0ecbb95a015a52ba0c0891465d2a58c80fe190d4e0d45a76a7d59f5/django-lazy-tags-0.5.0.tar.gz" } ] }