{ "info": { "author": "Lex Berezhny", "author_email": "lex@damoti.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Testing", "Topic :: Software Development :: User Interfaces" ], "description": "==============\ndjango-dartium\n==============\n\n.. _introduction:\n\n**django-dartium** provides for a simple way to detect the Dartium web browser and make\nit easy to serve Dart sources instead of compiled JavaScript during development.\n\n\nInstallation\n============\n\n.. _installation:\n\n**Python 3** and **Django** are the only requirements:\n\n1. Install **django-dartium** with your favorite python tool, e.g. ``pip install django-dartium``.\n\n2. Add ``django_dartium`` to your ``INSTALLED_APPS`` setting.\n\n3. Add ``django_dartium.middleware.DartiumDetectionMiddleware`` to your ``MIDDLEWARE_CLASSES`` setting.\n\n4. Add two named mappings to ``STATICFILES_DIRS``, one named ``dart/build`` which points to the\n build location of the JavaScript output and the other is ``dart/src`` which points to the ``web``\n directory containing your original Dart source. If you created your Django project by running\n ``django-admin startproject your_project`` and placed your Dart sources in\n ``your_project/your_project/dart`` directory, then you would have the following ``STATICFILES_DIRS``:\n\n .. code-block:: python\n\n STATICFILES_DIRS = [\n ('dart/build', 'your_project/dart/build/web'),\n ('dart/src', 'your_project/dart/web'),\n ]\n\n\nUsage\n=====\n\n.. _usage:\n\nLoad the ``dartium`` tag library into your Django template, call the ``webcomponents`` tag to load\nthe necessary polyfills and then add a reference to your Dart code via the ``dart`` tag.\n\nA good setup would be to have the following in your ``base.html``:\n\n.. code-block:: html+django\n\n {% load dartium %}\n \n ...\n \n {% block content %}\n {% endblock %}\n\n {% webcomponents 'lite' %}\n {% block script %}\n {% endblock %}\n \n \n\nThen in each of your pages where you want to use Dart some Dart script you can add:\n\n.. code-block:: html+django\n\n {% load dartium %}\n {% block content %}\n ... page content ...\n {% endblock %}\n {% block script %}\n {% dart \"your_script.dart\" %}\n {% endblock %}\n\nThe end result will be that if you browse to this page with Dartium you will get\nserved your original Dart source but if you are using any other browser you'll\nbe served ``your_script.dart.js`` from the ``build/web`` directory.\n\n\n0.1.3 - 2017-01-31\n------------------\n\n* New style middlware to work with Django 2.0\n\n0.1.0\n-----\n\n* Initial release.\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/damoti/django-dartium", "keywords": "django", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-dartium", "package_url": "https://pypi.org/project/django-dartium/", "platform": "", "project_url": "https://pypi.org/project/django-dartium/", "project_urls": { "Homepage": "https://github.com/damoti/django-dartium" }, "release_url": "https://pypi.org/project/django-dartium/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Django Middlware to detect Dartium web browser.", "version": "0.1.3" }, "last_serial": 2610655, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "0470de00d13a06d7c72a881e59c6bb44", "sha256": "51c68140574650cf73efc2cf59cc288242919b7d119db4b2edc3f8809e593219" }, "downloads": -1, "filename": "django-dartium-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0470de00d13a06d7c72a881e59c6bb44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3062, "upload_time": "2016-09-28T02:11:22", "url": "https://files.pythonhosted.org/packages/bd/fa/860a19fb0710c23a9b67166d12dc50d9795ef1b095c6c67814dbeb049490/django-dartium-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4d0d40f61bb7552863dc763522296081", "sha256": "1a80dd3327aa3b79309bc91de4919334ff5355d8732d6ad3f3d3954308998be4" }, "downloads": -1, "filename": "django-dartium-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4d0d40f61bb7552863dc763522296081", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3833, "upload_time": "2016-09-28T02:21:03", "url": "https://files.pythonhosted.org/packages/89/07/41085cf907789196c14581385482c05651b2614e2a292641381e19fe1ccd/django-dartium-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d16806bbfdc09baeb538075a0576c5db", "sha256": "2b05fbf11954945522c85c1c8754b01d6bc740bfe26242e20decdb1782f23986" }, "downloads": -1, "filename": "django-dartium-0.1.2.tar.gz", "has_sig": false, "md5_digest": "d16806bbfdc09baeb538075a0576c5db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3835, "upload_time": "2016-09-28T03:26:00", "url": "https://files.pythonhosted.org/packages/46/21/d3e4f0fd9a42fb2c5e7249f67c5b451172c17f15d338e07f75911233ac8e/django-dartium-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "0b8797b92bb92928f50389a051daa161", "sha256": "6a42e284924fcd4833fa3eae71431126de74341176f7f902c8d36a383d98f766" }, "downloads": -1, "filename": "django_dartium-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0b8797b92bb92928f50389a051daa161", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 5640, "upload_time": "2017-02-01T02:18:41", "url": "https://files.pythonhosted.org/packages/27/fd/83137ce267d0c4cea98a90e8f1389f5b3a899d1bf31e27631a039dd7a34e/django_dartium-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2a1aa871459f557acbd4134646e3f0bf", "sha256": "2c33ebc7b21dc70054dfc7947a6285c902dfacf8dbd60a17f8420909469a6792" }, "downloads": -1, "filename": "django-dartium-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2a1aa871459f557acbd4134646e3f0bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3900, "upload_time": "2017-02-01T02:18:40", "url": "https://files.pythonhosted.org/packages/ac/1c/57b96206afdac25d596d65a1a6b90bc5225ade052b66f25238456c35303e/django-dartium-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0b8797b92bb92928f50389a051daa161", "sha256": "6a42e284924fcd4833fa3eae71431126de74341176f7f902c8d36a383d98f766" }, "downloads": -1, "filename": "django_dartium-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "0b8797b92bb92928f50389a051daa161", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 5640, "upload_time": "2017-02-01T02:18:41", "url": "https://files.pythonhosted.org/packages/27/fd/83137ce267d0c4cea98a90e8f1389f5b3a899d1bf31e27631a039dd7a34e/django_dartium-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2a1aa871459f557acbd4134646e3f0bf", "sha256": "2c33ebc7b21dc70054dfc7947a6285c902dfacf8dbd60a17f8420909469a6792" }, "downloads": -1, "filename": "django-dartium-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2a1aa871459f557acbd4134646e3f0bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3900, "upload_time": "2017-02-01T02:18:40", "url": "https://files.pythonhosted.org/packages/ac/1c/57b96206afdac25d596d65a1a6b90bc5225ade052b66f25238456c35303e/django-dartium-0.1.3.tar.gz" } ] }