Name | django-assets-manager JSON |
Version |
1.0.0
JSON |
| download |
home_page | |
Summary | Assets management for django |
upload_time | 2023-05-13 05:00:54 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | MIT |
keywords |
django
assets
sprites
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
=======================================
Simple assets manager with dependencies
=======================================
Install
-------
`pip install django-assets-manager`
Usage
-----
Settings
^^^^^^^^
.. code:: python
INSTALLED_APPS = (
# ...
'django_assets_manager',
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'django_assets_manager.finders.CdnFinder',
)
ASSETS_MANAGER_FILES = {
"utils": {
"js": "static://js/utils.js",
},
"cooleffect": {
"js": ["static://js/cooleffect.js"],
"css": ["static://css/cooleffect.css"],
"depends": ["utils", "jquery"],
},
"jquery": {
"js": "//code.jquery.com/jquery-2.1.4.min.js",
"cache": {
"paths": {
"//code.jquery.com/jquery-2.1.4.min.js": "jquery-2.1.4.min.js",
}
},
},
}
ASSETS_MANAGER_SPRITES = (
{
'name': 'main',
'output': 'images/sprites.png',
'scss_output': 'css/_sprites.scss',
'extra_sizes': ((2, '@2x'),),
'width': 640,
'height': 640,
'images': (
{
'name': 'logo',
'src': 'img/logo.png',
},
{
'name': 'bar_bg',
'src': 'img/bar_bg.png',
'mode': 'repeat-x',
},
),
},
)
Template
^^^^^^^^
.. code:: html
{% load assets_manager %}
{% assets "cooleffect" %}
<!-- or -->
{% assets_css "cooleffect" %}
{% assets_js "cooleffect" %}
Raw data
{
"_id": null,
"home_page": "",
"name": "django-assets-manager",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "django,assets,sprites",
"author": "",
"author_email": "Miroslav Bend\u00edk <miroslav.bendik@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ed/40/bfb7396d3f89ff89784567a55a7276cc120b55840c53bfeaa6b51b8fe49e/django_assets_manager-1.0.0.tar.gz",
"platform": null,
"description": "=======================================\nSimple assets manager with dependencies\n=======================================\n\nInstall\n-------\n\n`pip install django-assets-manager`\n\nUsage\n-----\n\nSettings\n^^^^^^^^\n\n.. code:: python\n\n\tINSTALLED_APPS = (\n\t\t# ...\n\t\t'django_assets_manager',\n\t)\n\n\tSTATICFILES_FINDERS = (\n\t\t'django.contrib.staticfiles.finders.FileSystemFinder',\n\t\t'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n\t\t'django_assets_manager.finders.CdnFinder',\n\t)\n\n\tASSETS_MANAGER_FILES = {\n\t\t\"utils\": {\n\t\t\t\"js\": \"static://js/utils.js\",\n\t\t},\n\t\t\"cooleffect\": {\n\t\t\t\"js\": [\"static://js/cooleffect.js\"],\n\t\t\t\"css\": [\"static://css/cooleffect.css\"],\n\t\t\t\"depends\": [\"utils\", \"jquery\"],\n\t\t},\n\t\t\"jquery\": {\n\t\t\t\"js\": \"//code.jquery.com/jquery-2.1.4.min.js\",\n\t\t\t\"cache\": {\n\t\t\t\t\"paths\": {\n\t\t\t\t\t\"//code.jquery.com/jquery-2.1.4.min.js\": \"jquery-2.1.4.min.js\",\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t}\n\n\tASSETS_MANAGER_SPRITES = (\n\t\t{\n\t\t\t'name': 'main',\n\t\t\t'output': 'images/sprites.png',\n\t\t\t'scss_output': 'css/_sprites.scss',\n\t\t\t'extra_sizes': ((2, '@2x'),),\n\t\t\t'width': 640,\n\t\t\t'height': 640,\n\t\t\t'images': (\n\t\t\t\t{\n\t\t\t\t\t'name': 'logo',\n\t\t\t\t\t'src': 'img/logo.png',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t'name': 'bar_bg',\n\t\t\t\t\t'src': 'img/bar_bg.png',\n\t\t\t\t\t'mode': 'repeat-x',\n\t\t\t\t},\n\t\t\t),\n\t\t},\n\t)\n\nTemplate\n^^^^^^^^\n\n.. code:: html\n\n\t{% load assets_manager %}\n\t{% assets \"cooleffect\" %}\n\t<!-- or -->\n\t{% assets_css \"cooleffect\" %}\n\t{% assets_js \"cooleffect\" %}\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Assets management for django",
"version": "1.0.0",
"project_urls": {
"changelog": "https://github.com/mireq/django-assets-manager/blob/master/CHANGELOG.md",
"documentation": "https://github.com/mireq/django-assets-manager",
"homepage": "https://github.com/mireq/django-assets-manager",
"repository": "https://github.com/mireq/django-assets-manager"
},
"split_keywords": [
"django",
"assets",
"sprites"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "15d20a57642351f55cc7cf27067a4ff7235588c97f17f9f21cf036067c49b3cc",
"md5": "aaf33240fe63cae7c15a61208e628a2d",
"sha256": "992ac1a250a44da108f7cf98d3f2ac954409504f0aed346cf864767b61912e76"
},
"downloads": -1,
"filename": "django_assets_manager-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "aaf33240fe63cae7c15a61208e628a2d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 11545,
"upload_time": "2023-05-13T05:00:52",
"upload_time_iso_8601": "2023-05-13T05:00:52.030372Z",
"url": "https://files.pythonhosted.org/packages/15/d2/0a57642351f55cc7cf27067a4ff7235588c97f17f9f21cf036067c49b3cc/django_assets_manager-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ed40bfb7396d3f89ff89784567a55a7276cc120b55840c53bfeaa6b51b8fe49e",
"md5": "f108b0fc86ddaac06fe8d2e46de84424",
"sha256": "87ed987a2d3a1a8c7e72754937b725681b57492bae0d034c937e3341d0427b99"
},
"downloads": -1,
"filename": "django_assets_manager-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "f108b0fc86ddaac06fe8d2e46de84424",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 19929,
"upload_time": "2023-05-13T05:00:54",
"upload_time_iso_8601": "2023-05-13T05:00:54.394879Z",
"url": "https://files.pythonhosted.org/packages/ed/40/bfb7396d3f89ff89784567a55a7276cc120b55840c53bfeaa6b51b8fe49e/django_assets_manager-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-13 05:00:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mireq",
"github_project": "django-assets-manager",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "django-assets-manager"
}