{ "info": { "author": "Matthew Tretter", "author_email": "m@tthewwithanm.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Utilities" ], "description": "Building Static Files\n---------------------\n\nSooner or later, you're going to need to add a build step to your Django apps;\nwhether it's because of Sass_, Less_, Coffee_, AMD_, or just to optimize your\nPNGs and JPEGs. There are a few__ popular__ ways to do some of these things with\nDjango, but each has its own specific goals, and you can easily find your build\nrequirements outside of their scope. django-staticbuilder takes a different\napproach by giving you a simple way to add a build step to your workflow, but\nhas absolutely no opinion about what that build step should be, making it easy\nto take advantage of whatever build tools you want.\n\nCheck out the full documentation on readthedocs__.\n\nThe heart of the staticbuilder build step is the ``buildstatic`` management\ncommand, and it is stupid simple. In fact, it only does two things: first, it\ncollects your static files into a build directory and, second, it runs some\nshell commands. (Seriously, look at `the source`__. It delegates most of its\nwork to Django's ``collectstatic``. And that's A Good Thing.)\n\nTo get started, add ``staticbuilder`` to your ``INSTALLED_APPS``:\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...\n 'staticbuilder',\n )\n\nTo specify the build directory, use the ``STATICBUILDER_BUILD_ROOT`` setting:\n\n.. code-block:: python\n\n STATICBUILDER_BUILD_ROOT = os.path.join(os.path.dirname(__file__), 'static_built')\n\nTo specify a list of shell commands to run with the ``STATICBUILDER_BUILD_COMMANDS``\nsetting:\n\n.. code-block:: python\n\n STATICBUILDER_BUILD_COMMANDS = [\n 'coffee -c /path/to/build_dir',\n 'uglifyjs /path/to/build_dir/a.js -c > /path/to/build_dir/a.js',\n ]\n\nor (to keep things a little more tidy):\n\n.. code-block:: python\n\n STATICBUILDER_BUILD_COMMANDS = ['./bin/mybuildscript']\n\nFinally, you'll need to add a special finder to your ``STATICFILES_FINDERS``\nlist:\n\n.. code-block:: python\n\n STATICFILES_FINDERS = (\n 'staticbuilder.finders.BuiltFileFinder',\n\n # The default Django finders:\n 'django.contrib.staticfiles.finders.FileSystemFinder',\n 'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n )\n\nThis finder is important\u2014it's how Django finds the built versions of your files\nwhen you run ``collectstatic``.\n\n\nDevelopment\n-----------\n\nIn order to ease development, this package includes a middleware class that will\nautomatically build your static files as part of the request-response cycle. In\norder to use it, just add it to your ``MIDDLEWARE_CLASSES`` setting:\n\n.. code-block:: python\n\n MIDDLEWARE_CLASSES = (\n ...\n 'staticbuilder.middleware.BuildOnRequest',\n )\n\nNow, whenever you access a view that returns an HTML response, staticbuilder\nwill check to see if your static files have changed since the last build. If\nthey have, it will trigger a new build. This way, your static files will always\nbe up-to-date.\n\nIn order to make sure your responses are delivered quickly when developing,\nyou'll probably want to have different ``STATICBUILDER_BUILD_COMMANDS`` when\n``DEBUG`` is ``True``. (For example, you probably don't need to compress your\nCSS and JS while developing.)\n\nThis middleware is automatically disabled when ``DEBUG`` is ``False``, so it\nwon't run in production.\n\n\nCollecting Without Building\n---------------------------\n\nThe ``buildstatic`` command is actually a two-step process: collecting static\nfiles into a build directory, and running some shell commands. The first step is\nactually another command: ``collectforbuild``. This command may be run by itself\nin the event that you want to do a different set of build steps than what you\nhave configured (during a deployment, for example).\n\nThe ``buildstatic`` command accepts an optional ``--nocollect`` flag that will\nskip the ``collectforbuild`` step altogether. Note that this means\n``collectforbuild`` will need to have been run at some point prior to\n``buildstatic --nocollect``.\n\n\n.. _Sass: http://sass-lang.com/\n.. _Less: http://lesscss.org/\n.. _Coffee: http://coffeescript.org/\n.. _AMD: http://requirejs.org/docs/whyamd.html\n__ https://github.com/jezdez/django_compressor\n__ https://github.com/cyberdelia/django-pipeline\n__ http://django-staticbuilder.readthedocs.org\n__ https://github.com/hzdg/django-staticbuilder/blob/master/staticbuilder/management/commands/buildstatic.py\n", "description_content_type": null, "docs_url": null, "download_url": "http://github.com/hzdg/django-staticbuilder/tarball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/hzdg/django-staticbuilder", "keywords": "javascript", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-staticbuilder", "package_url": "https://pypi.org/project/django-staticbuilder/", "platform": "", "project_url": "https://pypi.org/project/django-staticbuilder/", "project_urls": { "Download": "http://github.com/hzdg/django-staticbuilder/tarball/master", "Homepage": "http://github.com/hzdg/django-staticbuilder" }, "release_url": "https://pypi.org/project/django-staticbuilder/0.6.4/", "requires_dist": null, "requires_python": "", "summary": "Optimize your static files.", "version": "0.6.4" }, "last_serial": 3651975, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "6fb16aec97bc86e8e3e30e704ab73456", "sha256": "d30ba84c28cb0b79ab8108df6f2182e224935a109f1c937054e7694b5f545125" }, "downloads": -1, "filename": "django-staticbuilder-0.2.tar.gz", "has_sig": false, "md5_digest": "6fb16aec97bc86e8e3e30e704ab73456", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5094, "upload_time": "2013-03-22T12:39:25", "url": "https://files.pythonhosted.org/packages/80/53/53576a632e14564f07d72dc686965075079ce56e31ed540b93c786fb714f/django-staticbuilder-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "1999e1f5d1fe4ea6b2d5772e638135dd", "sha256": "d18c2b52d40d266d994961ef5688ad11bdbbdb32c8aea95f79d205b133426c58" }, "downloads": -1, "filename": "django-staticbuilder-0.3.tar.gz", "has_sig": false, "md5_digest": "1999e1f5d1fe4ea6b2d5772e638135dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5994, "upload_time": "2013-03-28T02:43:38", "url": "https://files.pythonhosted.org/packages/85/f8/0284057b19753b768f32601c127bed7b47adf391f0efd493542474cf2977/django-staticbuilder-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "ff704af103adb85cf8542820c424c07a", "sha256": "bbd1c4dd2dbd894b1fbfc2f0d4f2bf64aea732c6d051dd034906e75042179ef7" }, "downloads": -1, "filename": "django-staticbuilder-0.3.1.tar.gz", "has_sig": false, "md5_digest": "ff704af103adb85cf8542820c424c07a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14195, "upload_time": "2013-03-28T13:59:57", "url": "https://files.pythonhosted.org/packages/f2/35/6cc7df7a3e9541e176611db2436448e61dfe49824dc470ca2680ced5e5a7/django-staticbuilder-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "d8abe7d1fa8aa19842308e0182a43303", "sha256": "ffb0be47f884cfe594e29547f3ec39a2e54b63708882131ae7add0329db9028c" }, "downloads": -1, "filename": "django-staticbuilder-0.3.2.tar.gz", "has_sig": false, "md5_digest": "d8abe7d1fa8aa19842308e0182a43303", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14198, "upload_time": "2013-04-02T15:39:29", "url": "https://files.pythonhosted.org/packages/1d/d2/83021561023a43267aa364bb53eaafb8a4ea9948517e3942a7e6070ad097/django-staticbuilder-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "7f2b97d4aa76be802c4db2e48690d3da", "sha256": "949218c4cf0215d78d5e20426adaec5d6a52b4b2d16884f28de9bcdad90424b6" }, "downloads": -1, "filename": "django-staticbuilder-0.4.0.tar.gz", "has_sig": false, "md5_digest": "7f2b97d4aa76be802c4db2e48690d3da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15055, "upload_time": "2013-04-24T17:32:32", "url": "https://files.pythonhosted.org/packages/86/79/7f2228d5d0f72fe0d2933192bfcf519168d4fec9f765439599178363625c/django-staticbuilder-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "c26b94dd963af549177e10c7e4ee4578", "sha256": "d2bafd9bcbed458661290980e8cfab2bbf34fa7530c4e04d8b1762ffe9e9b0fd" }, "downloads": -1, "filename": "django-staticbuilder-0.5.0.tar.gz", "has_sig": false, "md5_digest": "c26b94dd963af549177e10c7e4ee4578", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15717, "upload_time": "2013-07-10T16:39:04", "url": "https://files.pythonhosted.org/packages/fa/a1/6413b52dec3747e0c16a1649d4db6fe147602da90b8423a8523188a8db5c/django-staticbuilder-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "3922b25d5f1e1e3fabbb3e6e1f944037", "sha256": "5b7d65304f51151c27d406655d422f485cf3049413e3bca3d52f71792818263b" }, "downloads": -1, "filename": "django-staticbuilder-0.6.0.tar.gz", "has_sig": false, "md5_digest": "3922b25d5f1e1e3fabbb3e6e1f944037", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15798, "upload_time": "2014-01-03T19:40:04", "url": "https://files.pythonhosted.org/packages/0a/ec/de2336672f7ddd857ff08af1ca8e3c4e8f22b5471785675d2f6572d724f0/django-staticbuilder-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "ecf28c455d592faee9b93e4b999756c9", "sha256": "a1b3f427dec1bee3865169fb8354745378dcfc751a2df6c12bf81728c386c3b1" }, "downloads": -1, "filename": "django-staticbuilder-0.6.1.tar.gz", "has_sig": false, "md5_digest": "ecf28c455d592faee9b93e4b999756c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15804, "upload_time": "2014-02-10T22:18:21", "url": "https://files.pythonhosted.org/packages/a3/0d/6781b801d6200246e016cdd8ae166fb81daf6ba1f4930e6dd29a6af26dc3/django-staticbuilder-0.6.1.tar.gz" } ], "0.6.3": [ { "comment_text": "", "digests": { "md5": "7f7029f1c8679825e7252b7df0f2aa8b", "sha256": "d2330d5d72d9bf4e518c7a2b0c041d27b3fdbbf3622f0dcf6ed794ec1c45ec57" }, "downloads": -1, "filename": "django-staticbuilder-0.6.3.tar.gz", "has_sig": false, "md5_digest": "7f7029f1c8679825e7252b7df0f2aa8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15740, "upload_time": "2018-01-17T17:04:04", "url": "https://files.pythonhosted.org/packages/1e/9c/f78a3538b9a45ce424505b39dc26a17df9172db08b54fbe6442652103895/django-staticbuilder-0.6.3.tar.gz" } ], "0.6.4": [ { "comment_text": "", "digests": { "md5": "095c0607afd852f9fb0d18ac3d3da8fe", "sha256": "d49355f316b1a72770af8df5cbe4ee5e6637eb6d857f7e2bb9334d24ab0408b8" }, "downloads": -1, "filename": "django-staticbuilder-0.6.4.tar.gz", "has_sig": false, "md5_digest": "095c0607afd852f9fb0d18ac3d3da8fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15833, "upload_time": "2018-01-17T17:27:09", "url": "https://files.pythonhosted.org/packages/81/3a/732f276816024bb9253039c5d5699d07fdd1a663e1c2ae423a35db817895/django-staticbuilder-0.6.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "095c0607afd852f9fb0d18ac3d3da8fe", "sha256": "d49355f316b1a72770af8df5cbe4ee5e6637eb6d857f7e2bb9334d24ab0408b8" }, "downloads": -1, "filename": "django-staticbuilder-0.6.4.tar.gz", "has_sig": false, "md5_digest": "095c0607afd852f9fb0d18ac3d3da8fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15833, "upload_time": "2018-01-17T17:27:09", "url": "https://files.pythonhosted.org/packages/81/3a/732f276816024bb9253039c5d5699d07fdd1a663e1c2ae423a35db817895/django-staticbuilder-0.6.4.tar.gz" } ] }