{ "info": { "author": "Keryn Knight", "author_email": "python-package@kerynknight.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.5", "Framework :: Django :: 1.6", "Framework :: Django :: 1.7", "Framework :: Django :: 1.8", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP" ], "description": "django-jackfrost 0.4.0\n======================\n\nConvert your Django views into a collection of static HTML files. Or, put\nanother way, a Django based static-site-generator with few opinions.\n\nThis is my attempt at a different type of static site renderer, instead\nleveraging the availability of Django's `staticfiles`_ functionality to leave\nspecifics to someone else :)\nThe theory is thus that you could choose a third party storage from, say,\n`django-storages`_ and plug it into ``jackfrost`` and have things Just Work.\n\nI don't actually know if that's true though.\n\n.. |travis_stable| image:: https://travis-ci.org/kezabelle/django-jackfrost.svg?branch=0.4.0\n :target: https://travis-ci.org/kezabelle/django-jackfrost\n\n.. |travis_master| image:: https://travis-ci.org/kezabelle/django-jackfrost.svg?branch=master\n :target: https://travis-ci.org/kezabelle/django-jackfrost\n\n\n============== ======\nRelease Status\n============== ======\nstable (0.4.0) |travis_stable|\nmaster |travis_master|\n============== ======\n\nAlternatives\n============\n\n- There's `django-medusa`_, though it doesn't appear to be active anymore.\n- also `django-bakery`_, which takes a different approach whereby one must\n extend specific views or models.\n\nDifferences\n-----------\n\n- Unlike `django-medusa`_ there is no autodiscovery, and no requirement that\n renderers go in a specific place.\n- Unlike `django-bakery`_, existing views and models ought to be usable unchanged,\n because of the renderer approach I've taken, which is more similar to\n `django-medusa`_ or `Django RSS Feeds`_.\n\nDependencies\n============\n\n- `Django`_\n- `pytest`_\n\nInstalling\n==========\n\n`pip`_ installing the latest release via PyPI::\n\n pip install django-jackfrost==0.4.0\n\n\nIf you want to get the latest, unstable version, you can use\nsomething like this (again with `pip`_) I think::\n\n pip install git+https://github.com/kezabelle/django-jackfrost.git#egg=django-jackfrost\n\n\nPut ``jackfrost`` into your ``INSTALLED_APPS``::\n\n INSTALLED_APPS = (\n 'django.contrib.auth',\n # ...\n 'jackfrost',\n # ...\n )\n\nwhich will enable the management command::\n\n python manage.py collectstaticsite --processes=N\n\n\nConfiguration & usage\n---------------------\n\nSet ``JACKFROST_STORAGE`` to whatever storage backend you'd like to use, in\nyour project's settings. By default, a subclass of\n``django.contrib.staticfiles.storage.StaticFilesStorage`` which puts output into\na ``jackfrost`` directory will be used.\n\nIf your storage backend needs any arguments that can't be gleaned from individual\nsettings, you can set ``JACKFROST_STORAGE_KWARGS`` to a dictionary of\narguments to be used when instantiating the ``JACKFROST_STORAGE``\n\n\nSelecting renderers\n^^^^^^^^^^^^^^^^^^^\n\nAdd a ``JACKFROST_RENDERERS`` setting, which should be a list or tuple of\ndotted paths to python classes or functions, much like ``MIDDLEWARE_CLASSES``,\n``TEMPLATE_CONTEXT_PROCESSORS`` etc::\n\n JACKFROST_RENDERERS = (\n 'myapp.renderers.MyModelRenderer',\n 'my_other_app.utils.SomeOtherRenderer',\n )\n\nIn theory, I don't care whether your ``JACKFROST_RENDERERS`` are functions\nor classes; if it's a class it must implement ``__call__``. Either way,\nit should, when called, return a number of URL paths to be consumed.\n\n\nRenderers for models\n^^^^^^^^^^^^^^^^^^^^\n\nIf you have a model which has a ``get_absolute_url`` method, your renderer\ncan be as simple as::\n\n from jackfrost.models import ModelRenderer\n\n class MyModelRenderer(ModelRenderer):\n def get_model(self):\n return MyModel\n\nIf you need to customise the queryset, there is a ``get_queryset`` method\nwhich can be replaced. There is also a ``get_urls`` method, if you need to\ngo totally off-reservation.\n\n\nReading from `sitemaps`_\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nGiving ``jackfrost`` the dotted path to a standard `Django sitemap`_ as\none of the ``JACKFROST_RENDERERS`` should do the right thing, and get the\nURLs out of the sitemap itself without you needing to do anything or write\na new renderer.\n\n\nReading from `django-medusa`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIn theory, giving ``jackfrost`` the dotted path to a subclass of the `django-medusa`_\n`BaseStaticSiteRenderer`_ should do the right thing, and get the URLs out of\nthe medusa renderer itself, without you doing anything. It will avoid going\nthrough the medusa rendering process, instead it'll go through mine.\n\n\nReading from `Django RSS Feeds`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nGiving ``jackfrost`` the dotted path to a subclass of a `Feed`_\nshould do the right thing, and get the URLs out by asking the `Feed`_ for the\n``item_link`` for everything in ``items``, without you doing anything.\n\n\nWriting a renderer\n^^^^^^^^^^^^^^^^^^\n\nThe most basic renderer would be::\n\n def myrenderer_yielding():\n yield reverse('app:name')\n\nor::\n\n def myrenderer():\n return [reverse('app:name')]\n\nRenderers may also be classes::\n\n class MyRenderer(object):\n __slots__ = ()\n\n def __init__(self):\n pass\n\n def __call__(self):\n yield reverse('app:name')\n\n\nListening for renders\n^^^^^^^^^^^^^^^^^^^^^\n\nThere are 8 signals in total:\n\n* ``build_started`` is fired when the management command is run.\n* ``reader_started`` is fired when a ``URLReader`` instance begins working.\n* ``read_page`` is fired when a ``URLReader`` successfully gets a URL's content.\n* ``reader_finished`` is fired when a ``URLReader`` instance completes.\n* ``writer_started`` is fired when a ``URLWriter`` instance begins working.\n* ``write_page`` is fired just after the content is written to the storage backend.\n* ``writer_finished`` is fired when the ``URLWriter`` completes\n* ``build_finished`` fires at the end of the management command.\n\nRendering on model change\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAdditionally, there is a listener, ``jackfrost.utils.build_page_for_obj`` which\nis suitable for being used as a ``pre_save`` or ``post_save`` receiver for\na ``Model`` instance, and will attempt to build just the ``get_absolute_url`` for\nthat object.\n\nDefining when a model may build\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf a ``Model`` instance implements a ``jackfrost_can_build`` method, this is\nchecked before building the static page. If ``jackfrost_can_build`` returns\n``False``, the page won't get built. Any other value will result in it being\nbuilt.\n\nDefining different URLs\n^^^^^^^^^^^^^^^^^^^^^^^\n\nIf a ``Model`` instance implements a ``jackfrost_urls`` method, this\nis used instead of the ``get_absolute_url``, and should return an iterable of\nall the URLs to consider building.\n\nIf the ``Model`` instance has a ``get_list_url`` method, that page will also be\nbuilt. Useful for updating any ``ListView`` pages, etc.\n\nExtras\n------\n\nWhere possible, ``jackfrost`` will attempt to compensate for redirects (301, 302 etc)\nby writing an HTML page with a ```` tag pointing at the final\nendpoint. The template used is called `301.html`.\n\nAdditionally, static pages for 401, 403, 404 and 500 errors will be built\nfrom their respective templates, if they exist. Useful if you want to wire\nup Apache ``ErrorDocument`` directives or whatever.\n\n\nRunning the tests (87% coverage)\n--------------------------------\n\nGiven a complete clone::\n\n python setup.py test\n\n.. _django-medusa: https://github.com/mtigas/django-medusa\n.. _staticfiles: https://docs.djangoproject.com/en/stable/ref/contrib/staticfiles/\n.. _Django: https://docs.djangoproject.com/en/stable/\n.. _pip: https://pip.pypa.io/en/stable/\n.. _django-storages: https://django-storages.readthedocs.org/en/latest/\n.. _pytest: http://pytest.org/latest/\n.. _django-bakery: http://django-bakery.readthedocs.org/en/latest/\n.. _they don't: https://github.com/datadesk/django-bakery/issues/15\n.. _sitemaps: https://docs.djangoproject.com/en/stable/ref/contrib/sitemaps/\n.. _Django sitemap: https://docs.djangoproject.com/en/stable/ref/contrib/sitemaps/\n.. _BaseStaticSiteRenderer: https://github.com/mtigas/django-medusa/blob/master/django_medusa/renderers/base.py\n.. _Django RSS Feeds: https://docs.djangoproject.com/en/stable/ref/contrib/syndication/\n.. _Feed: https://docs.djangoproject.com/en/stable/ref/contrib/syndication/#feed-class-reference\n\n\n----\n\nLicense\n-------\n\n``django-jackfrost 0.4.0`` is available under the terms of the\nSimplified BSD License (alternatively known as the FreeBSD License, or\nthe 2-clause License)::\n\n Copyright (c) 2015, Keryn Knight\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n The views and conclusions contained in the software and documentation are those\n of the authors and should not be interpreted as representing official policies,\n either expressed or implied, of the FreeBSD Project.\n\n\n----\n\nChange log\n----------\n\n0.4.0\n^^^^^^\n\n* Added ``signals.write_page`` which is fired after the storage backend has\n written the content.\n* Added ``utils.eventlog_write`` for using `pinax.eventlog`_ and the\n aforementioned ``write_page`` signal to track built items.\n* Added a `ModelAdmin action`_ for building a selection of model instances\n into their static counterparts, from the admin changelist.\n* Made the receiver ``utils.build_page_for_obj`` actually work.\n* the ``models`` module will be compiled using Cython, if installed.\n\n.. _pinax.eventlog: https://github.com/pinax/pinax-eventlog\n.. _ModelAdmin action: https://docs.djangoproject.com/en/stable/ref/contrib/admin/actions/\n\n0.3.0\n^^^^^^\n\n* Replaced ``jackfrost_absolute_url`` method in ``ModelRenderer`` with\n ``jackfrost_urls``, which allows models to add every URL they want to cause\n to be visited.\n\n\n0.2.1\n^^^^^^\n\n* Added support for Django 1.6\n* Added celery tasks for building both a single URL, and all URLs.\n\n0.2.0\n^^^^^^\n\n* Initial release.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/kezabelle/django-jackfrost/releases", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kezabelle/django-jackfrost", "keywords": "django,static,freeze,generator", "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "django-jackfrost", "package_url": "https://pypi.org/project/django-jackfrost/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-jackfrost/", "project_urls": { "Download": "https://github.com/kezabelle/django-jackfrost/releases", "Homepage": "https://github.com/kezabelle/django-jackfrost" }, "release_url": "https://pypi.org/project/django-jackfrost/0.4.0/", "requires_dist": null, "requires_python": null, "summary": "A static site generator for Django views", "version": "0.4.0" }, "last_serial": 1631595, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "7587a5c3633689a2b32fa391787cf052", "sha256": "f8659775e6e7a0d2fc758745b1693d785cddeb77ff7bc4138c18388fcc0709c6" }, "downloads": -1, "filename": "django_jackfrost-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7587a5c3633689a2b32fa391787cf052", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 32995, "upload_time": "2015-06-14T10:54:25", "url": "https://files.pythonhosted.org/packages/1e/4e/9e5d6307ded83385938018e03399054265c106e33237825eaab40379cb59/django_jackfrost-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dfe47b9f76fc1c22fa507dd5b0f52f9d", "sha256": "d37c432bb104a17cf86e881acfa17716c43d9c1a4c992d15251170bfc70c94c3" }, "downloads": -1, "filename": "django-jackfrost-0.2.1.tar.gz", "has_sig": false, "md5_digest": "dfe47b9f76fc1c22fa507dd5b0f52f9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19194, "upload_time": "2015-06-14T10:54:21", "url": "https://files.pythonhosted.org/packages/19/2d/e13c3bceb8f7de4ca969b1341b6a6af8b9f17467e1698e102a4716f09212/django-jackfrost-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "175922aeca45c74fbf3c94bc559ba842", "sha256": "237659319958f6536bc83590798dd481aae222f63dd6b160d6d51afdf6d271e7" }, "downloads": -1, "filename": "django_jackfrost-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "175922aeca45c74fbf3c94bc559ba842", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 33425, "upload_time": "2015-06-20T14:50:20", "url": "https://files.pythonhosted.org/packages/ec/40/007852ca6b119b339c6a191c9e0daca0f4cbfb0313c66b8d25160e2d5fb3/django_jackfrost-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1a0ee85a8b98015b72f4c8613fea1346", "sha256": "99d373d0ccfdac02333e1c2f6f182b238571951bdbb6f3adbc35b7180a05ea2a" }, "downloads": -1, "filename": "django-jackfrost-0.3.0.tar.gz", "has_sig": false, "md5_digest": "1a0ee85a8b98015b72f4c8613fea1346", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19736, "upload_time": "2015-06-20T14:50:16", "url": "https://files.pythonhosted.org/packages/6e/cf/e4fbf5df527f0fec3b79497e63741bf0321af5cc92e4f597714ecb459053/django-jackfrost-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "ab69e3ac345aa3731092da8b6c1bd17d", "sha256": "7ba671000f49debbd28dafe533783394e0593a387824b28e9866de89472fbf7c" }, "downloads": -1, "filename": "django_jackfrost-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ab69e3ac345aa3731092da8b6c1bd17d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 39746, "upload_time": "2015-07-13T18:18:39", "url": "https://files.pythonhosted.org/packages/21/bb/ff7c20f0e4d7a2b54e023f17b73289dc3318131d779adbcc41a47b777341/django_jackfrost-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "200d086df9d87f069549acde02b8c7b4", "sha256": "f7d0d2cfe3c9fc1268614cf314bd034b77b9f8dc8371a60955032578e967ad4f" }, "downloads": -1, "filename": "django-jackfrost-0.4.0.tar.gz", "has_sig": false, "md5_digest": "200d086df9d87f069549acde02b8c7b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22464, "upload_time": "2015-07-13T18:18:36", "url": "https://files.pythonhosted.org/packages/d2/3e/de2f5dd7f9d8b14d31f525bd11d62d9d259af0cba6f87d458e0a78d42bb1/django-jackfrost-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ab69e3ac345aa3731092da8b6c1bd17d", "sha256": "7ba671000f49debbd28dafe533783394e0593a387824b28e9866de89472fbf7c" }, "downloads": -1, "filename": "django_jackfrost-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ab69e3ac345aa3731092da8b6c1bd17d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 39746, "upload_time": "2015-07-13T18:18:39", "url": "https://files.pythonhosted.org/packages/21/bb/ff7c20f0e4d7a2b54e023f17b73289dc3318131d779adbcc41a47b777341/django_jackfrost-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "200d086df9d87f069549acde02b8c7b4", "sha256": "f7d0d2cfe3c9fc1268614cf314bd034b77b9f8dc8371a60955032578e967ad4f" }, "downloads": -1, "filename": "django-jackfrost-0.4.0.tar.gz", "has_sig": false, "md5_digest": "200d086df9d87f069549acde02b8c7b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22464, "upload_time": "2015-07-13T18:18:36", "url": "https://files.pythonhosted.org/packages/d2/3e/de2f5dd7f9d8b14d31f525bd11d62d9d259af0cba6f87d458e0a78d42bb1/django-jackfrost-0.4.0.tar.gz" } ] }