{ "info": { "author": "CodeRed LLC", "author_email": "info@coderedcorp.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only" ], "description": "django-sass\n===========\n\nThe absolute simplest way to use [Sass](https://sass-lang.com/) with Django.\nPure Python, minimal dependencies, and no special configuration required.\n\n[Source code on GitHub](https://github.com/coderedcorp/wagtail-cache)\n\n\nInstallation\n------------\n\n1. Install from pip.\n\n```\npip install django-sass\n```\n\n2. Add to your `INSTALLED_APPS` (you only need to do this in a dev environment,\nyou would not want this in your production settings file, although it adds zero\noverhead):\n\n```python\nINSTALLED_APPS = [\n ...,\n 'django_sass',\n]\n```\n\n3. Congratulations, you're done \ud83d\ude00\n\n\nUsage\n-----\n\nIn your app's static files, use Sass as normal. The only difference is that\nyou can **not** traverse upwards using `../` in `@import` statements. For example:\n\n```\napp1/\n|- static/\n |- app1/\n |- scss/\n |- _colors.scss\n |- app1.scss\napp2/\n|- static/\n |- app2/\n |- scss/\n |- _colors.scss\n |- app2.scss\n```\n\nIn `app2.scss` you could reference app1's and app2's `_colors.scss` import as so:\n\n```scss\n@import 'app1/scss/colors';\n@import 'app2/scss/colors';\n// Or since you are in app2, you can reference its colors with a relative path.\n@import 'colors';\n```\n\nThen to compile `app2.scss` and put it in the `css` directory,\nrun the following management command (the `-g` will build a source map, which\nis helpful for debugging CSS):\n\n```\npython manage.py sass app2/static/app2/scss/app2.scss app2/static/app2/css/app2.css -g\n```\n\nOr, you can compile the entire `scss` directory into\na corresponding `css` directory. This will traverse all subdirectories as well:\n\n```\npython manage.py sass app2/static/app2/scss/ app2/static/app2/css/\n```\n\nIn your Django HTML template, reference the CSS file as normal:\n\n```html\n{% load static %}\n\n```\n\n\u2728\u2728 **Congratulations, you are now a Django + Sass developer!** \u2728\u2728\n\nNow you can commit those CSS files to version control, or run `collectstatic` and deploy them as normal.\n\nFor an example project layout, see `testproject/` in this repository.\n\n\nWatch Mode\n----------\n\nTo have `django-sass` watch files and recompile them as they change (useful in development),\nadd the ``--watch`` flag.\n\n```\npython manage.py sass app2/static/app2/scss/ app2/static/app2/css/ --watch\n```\n\n\nExample: deploying compressed CSS to production\n-----------------------------------------------\n\nTo compile minified CSS, use the `-t` flag to specify compression level (one of:\n\"expanded\", \"nested\", \"compact\", \"compressed\"). The default is \"expanded\" which\nis human-readable.\n\n```\npython manage.py sass app2/static/app2/scss/ app2/static/app2/css/ -t compressed\n```\n\nYou may now optionally commit the CSS files to version control if so desired,\nor omit them, whatever fits your needs better. Then run `collectsatic` as normal.\n\n```\npython manage.py collectstatic\n```\n\nAnd now proceed with deploying your files as normal.\n\n\nLimitations\n-----------\n\n* `@import` statements must reference a path relative to a path in `STATICFILES_FINDERS`\n (which will usually be an app's `static/` directory or some other directory specified\n in `STATICFILES_DIRS`). Or they can reference a relative path equal to or below the\n current file. It does not support traversing up the filesystem (i.e. `../`).\n\n Legal imports:\n ```scss\n @import 'file-from-currdir';\n @import 'subdir/file';\n @import 'another-app/file';\n ```\n Illegal imports:\n ```scss\n @import '../file';\n ```\n\n* Only files ending in `.scss` are supported for now.\n\n* Only supports `-g`, `-p`, and `-t` options similar to `pysassc`. Ideally `django-sass` will\n be as similar as possible to the `pysassc` command line interface.\n\nFeel free to file an issue or make a pull request to improve any of these limitations. \ud83d\udc31\u200d\ud83d\udcbb\n\n\nWhy django-sass?\n----------------\n\nOther packages such as [django-libsass](https://github.com/torchbox/django-libsass)\nand [django-sass-processor](https://github.com/jrief/django-sass-processor),\nwhile nice packages, require `django-compressor` which itself depends on several\nother packages that require compilation to install.\n\n* If you simply want to use Sass in development without installing a web of unwanted\n dependencies, then `django-sass` is for you.\n* If you don't want to deploy any processors or compressors to your production server,\n then `django-sass` is for you.\n* If you don't want to change the way you reference and serve static files,\n then `django-sass` is for you.\n* And if you want the absolute simplest installation and setup possible for doing Sass,\n `django-sass` is for you too.\n\ndjango-sass only depends on libsass (which provides pre-built wheels for Windows, Mac,\nand Linux), and of course Django (any version).\n\n\nChangelog\n---------\n\n#### 0.2.0\n* New feature: `-g` option to build a source map (when input is a file, not a directory).\n\n#### 0.1.2\n* Fix: Write compiled CSS files as UTF-8.\n* Change: Default `-p` precision from 5 to 8 for better support building Bootstrap CSS.\n\n#### 0.1.1\n* Fix: Create full file path if not exists when specifying a file output.\n\n#### 0.1.0\n* Initial release\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/coderedcorp/django-sass", "keywords": "", "license": "BSD license", "maintainer": "", "maintainer_email": "", "name": "django-sass", "package_url": "https://pypi.org/project/django-sass/", "platform": "", "project_url": "https://pypi.org/project/django-sass/", "project_urls": { "Homepage": "https://github.com/coderedcorp/django-sass" }, "release_url": "https://pypi.org/project/django-sass/0.2.0/", "requires_dist": [ "django", "libsass", "pylint ; extra == 'dev'", "twine ; extra == 'dev'", "wheel ; extra == 'dev'" ], "requires_python": "", "summary": "The absolute simplest way to use Sass with Django. Pure Python, minimal dependencies, and no special configuration required!", "version": "0.2.0" }, "last_serial": 5685839, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "41a8a1989b1fdb6685d27088db89ac72", "sha256": "3c5b9b9f25af1298e216e40873660e8d3dd898bd9fe346f6fecf8e3a590e1a2d" }, "downloads": -1, "filename": "django_sass-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "41a8a1989b1fdb6685d27088db89ac72", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6894, "upload_time": "2019-05-10T20:22:59", "url": "https://files.pythonhosted.org/packages/77/4e/002b8d7b64822e60e83f09936c08f2f6911c45097b51e14fbb82c8c3569e/django_sass-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ee57341df33031760eba677dd9c8e1c", "sha256": "c47a5e6cd76e94d7a5a78d89896e6be427920f49c01800b4ace2847be9b5d982" }, "downloads": -1, "filename": "django-sass-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9ee57341df33031760eba677dd9c8e1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6338, "upload_time": "2019-05-10T20:23:02", "url": "https://files.pythonhosted.org/packages/45/b8/f909e4f7f79fc830e346a722ad500ba32a4300303f21665dc1cbb6795816/django-sass-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ee18c52fd0ebfe852028f4a6dc3b7275", "sha256": "1bc103fcb8a48f6686e8e0d27e51d6c8b854bfa790ea84fa973e8ed221a8f1a6" }, "downloads": -1, "filename": "django_sass-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ee18c52fd0ebfe852028f4a6dc3b7275", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6993, "upload_time": "2019-05-11T00:35:03", "url": "https://files.pythonhosted.org/packages/dd/ce/7a38b263a168fc64709e4941057ad7c67e2c76c84f4b2158d902da182233/django_sass-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8e9f1d07a4e40e648dff655e923963a7", "sha256": "972c7e8216e8cd1d0b3091d0e3ddd2f692b55c1de2a497bb24308c850e2ef166" }, "downloads": -1, "filename": "django-sass-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8e9f1d07a4e40e648dff655e923963a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6430, "upload_time": "2019-05-11T00:35:05", "url": "https://files.pythonhosted.org/packages/51/dd/cf045bd9c6c61a9e9825647d3c45a06bee95972b94b7fd36e6147fd9f5db/django-sass-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6a21592be5edca5c171bcf5f99b3da77", "sha256": "fa6bc84dae6450f8e9ad868d27acffa1f920391e89b06862652974f37f9e0dc0" }, "downloads": -1, "filename": "django_sass-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "6a21592be5edca5c171bcf5f99b3da77", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6562, "upload_time": "2019-08-02T20:18:06", "url": "https://files.pythonhosted.org/packages/aa/d1/b5debe2274d0572d440af693ef0c38ab57f7c511752f5622e36dd3612260/django_sass-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c10399a12f43e83db9aeda16f6dcc8e7", "sha256": "4d7987560304cfc57ae60e3eb2ca0ff6db3b65bc02511ea4b06bb591205f62a7" }, "downloads": -1, "filename": "django-sass-0.1.2.tar.gz", "has_sig": false, "md5_digest": "c10399a12f43e83db9aeda16f6dcc8e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6530, "upload_time": "2019-08-02T20:18:10", "url": "https://files.pythonhosted.org/packages/cf/99/33d0aee041ae91b05cdc075eb5875cbeee20e54a4292357813fdc0bd844a/django-sass-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "30921c90447229596592683cbba5680d", "sha256": "c295fb20796bf03be87a815f2c8d9d9de5738014a09513b9603e2fa171687d22" }, "downloads": -1, "filename": "django_sass-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "30921c90447229596592683cbba5680d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6783, "upload_time": "2019-08-16T04:56:20", "url": "https://files.pythonhosted.org/packages/41/1a/3df72acfd6478ca6a1e3359c467b4f086438682ee887058638ffa893b8f8/django_sass-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec99a8147831569e0f69d552b6eb6298", "sha256": "83a054b3d5f8f9b3694b484260a30f7caa927670d414d42fc67edd13d86e1852" }, "downloads": -1, "filename": "django-sass-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ec99a8147831569e0f69d552b6eb6298", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6765, "upload_time": "2019-08-16T04:56:21", "url": "https://files.pythonhosted.org/packages/53/9d/175929e2d1e16e8a1c080fc31ba135fcf477664224574c2ad4c0c9b62802/django-sass-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "30921c90447229596592683cbba5680d", "sha256": "c295fb20796bf03be87a815f2c8d9d9de5738014a09513b9603e2fa171687d22" }, "downloads": -1, "filename": "django_sass-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "30921c90447229596592683cbba5680d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6783, "upload_time": "2019-08-16T04:56:20", "url": "https://files.pythonhosted.org/packages/41/1a/3df72acfd6478ca6a1e3359c467b4f086438682ee887058638ffa893b8f8/django_sass-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec99a8147831569e0f69d552b6eb6298", "sha256": "83a054b3d5f8f9b3694b484260a30f7caa927670d414d42fc67edd13d86e1852" }, "downloads": -1, "filename": "django-sass-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ec99a8147831569e0f69d552b6eb6298", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6765, "upload_time": "2019-08-16T04:56:21", "url": "https://files.pythonhosted.org/packages/53/9d/175929e2d1e16e8a1c080fc31ba135fcf477664224574c2ad4c0c9b62802/django-sass-0.2.0.tar.gz" } ] }