{"id":15187621,"url":"https://github.com/robpol86/flask-statics-helper","last_synced_at":"2025-10-02T02:31:40.271Z","repository":{"id":18466807,"uuid":"21661576","full_name":"Robpol86/Flask-Statics-Helper","owner":"Robpol86","description":"Provides Bootstrap3 and other static resources in a modular fashion.","archived":true,"fork":false,"pushed_at":"2014-11-26T20:27:07.000Z","size":5779,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-01T02:02:32.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Robpol86.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-09T17:19:19.000Z","updated_at":"2023-01-28T11:30:29.000Z","dependencies_parsed_at":"2022-09-11T20:20:50.377Z","dependency_job_id":null,"html_url":"https://github.com/Robpol86/Flask-Statics-Helper","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robpol86%2FFlask-Statics-Helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robpol86%2FFlask-Statics-Helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robpol86%2FFlask-Statics-Helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robpol86%2FFlask-Statics-Helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Robpol86","download_url":"https://codeload.github.com/Robpol86/Flask-Statics-Helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234929141,"owners_count":18908881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-27T18:41:03.489Z","updated_at":"2025-10-02T02:31:34.255Z","avatar_url":"https://github.com/Robpol86.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask-Statics-Helper\n\nProvides Bootstrap3 and other static resources in a modular fashion.\n\nThe main purpose of this extension is to \"modularize\" static resources (css and js files) on a per-template basis. In a\nlarge Flask application, all views/templates don't use the same static resource such as d3js. If only one view uses d3js\nout of five or more, there is no reason to have the d3js `\u003cscript /\u003e` tag included in all views.\n\nThis extension also provides a base template to be extended by your Flask application's templates for Bootstrap3 (like\nother Bootstrap3 extensions such as [this](https://github.com/mbr/flask-bootstrap) or\n[this](https://github.com/ryanolson/flask-bootstrap3)).\n\n* Python 2.6, 2.7, 3.3, and 3.4 supported on Linux and OS X.\n* Python 2.7, 3.3, and 3.4 supported on Windows (both 32 and 64 bit versions of Python).\n\n[![Build Status Windows](https://img.shields.io/appveyor/ci/Robpol86/Flask-Statics-Helper.svg?style=flat-square)]\n(https://ci.appveyor.com/project/Robpol86/Flask-Statics-Helper)\n[![Build Status](https://img.shields.io/travis/Robpol86/Flask-Statics-Helper/master.svg?style=flat-square)]\n(https://travis-ci.org/Robpol86/Flask-Statics-Helper)\n[![Coverage Status](https://img.shields.io/codecov/c/github/Robpol86/Flask-Statics-Helper/master.svg?style=flat-square)]\n(https://codecov.io/github/Robpol86/Flask-Statics-Helper)\n[![Latest Version](https://img.shields.io/pypi/v/Flask-Statics-Helper.svg?style=flat-square)]\n(https://pypi.python.org/pypi/Flask-Statics-Helper/)\n[![Downloads](https://img.shields.io/pypi/dm/Flask-Statics-Helper.svg?style=flat-square)]\n(https://pypi.python.org/pypi/Flask-Statics-Helper/)\n\n## Quickstart\n\nInstall:\n```bash\npip install Flask-Statics-Helper\n```\n\nEnable:\n```python\n# example.py\nfrom flask import Flask\nfrom flask.ext.statics import Statics\n\napp = Flask(__name__)\nStatics(app)\n```\n\nUse with Bootstrap3 (automatically enables jQuery):\n```html+django\n{% extends 'flask_statics_helper/bootstrap.html' %}\n{% set STATICS_ENABLE_RESOURCE_CSSHAKE = True %}\n{% block title %}My Application{% endblock %}\n\n{% block navbar %}\n    \u003cdiv class=\"navbar navbar-inverse navbar-static-top\" role=\"navigation\"\u003e\n        \u003cdiv class=\"container\"\u003e\n            \u003cdiv class=\"navbar-header\"\u003e \u003c!-- navbar-header --\u003e\n                \u003cbutton type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\"\n                        data-target=\".navbar-collapse\"\u003e\n                    \u003cspan class=\"sr-only\"\u003eToggle navigation\u003c/span\u003e\n                    \u003cspan class=\"icon-bar\"\u003e\u003c/span\u003e\n                    \u003cspan class=\"icon-bar\"\u003e\u003c/span\u003e\n                    \u003cspan class=\"icon-bar\"\u003e\u003c/span\u003e\n                \u003c/button\u003e\n                \u003ca class=\"navbar-brand\" href=\"/\"\u003eMy Application\u003c/a\u003e\n            \u003c/div\u003e \u003c!-- /navbar-header --\u003e\n            \u003cdiv class=\"collapse navbar-collapse\"\u003e \u003c!-- navbar-collapse --\u003e\n                \u003cul class=\"nav navbar-nav\"\u003e\n                    \u003cli\u003e\u003ca href=\"/\"\u003eHome\u003c/a\u003e\u003c/li\u003e\n                \u003c/ul\u003e\n            \u003c/div\u003e \u003c!-- /navbar-collapse --\u003e\n        \u003c/div\u003e\n    \u003c/div\u003e\n{% endblock %}\n\n{% block container %}\n    \u003cdiv class=\"jumbotron\"\u003e\n        \u003ch2 class=\"shake shake-constantly\"\u003eHello World.\u003c/h2\u003e\n    \u003c/div\u003e\n{% endblock %}\n```\n\n## Available Resources\n\n* [Bootstrap](http://getbootstrap.com/) 3.3.1\n* [jQuery](http://jquery.com/) 2.1.1\n* [Angular JS](https://angularjs.org/) 1.3.4\n* [Bootstrap Growl](https://github.com/mouse0270/bootstrap-growl) 2.0.0\n* [Bootstrap X-Editable](http://vitalets.github.io/x-editable/) 1.5.1\n* [BootstrapValidator](http://bootstrapvalidator.com/) 0.5.3\n* [CSShake](https://github.com/elrumordelaluz/csshake) (cloned July 9, 2014)\n* [D3](http://d3js.org/) 3.4.13\n* [Data Tables](http://datatables.net/) 1.10.4\n* [Font Awesome](http://fortawesome.github.io/Font-Awesome/) 4.2.0\n* [WHHG Font](http://www.webhostinghub.com/glyphs/) (cloned November 26, 2014)\n* [typeahead.js](https://github.com/twitter/typeahead.js) 0.10.5\n\n## Configuration\n\nThe only `app.config` specific setting is `STATICS_MINIFY`. Everything else may be set to True either in individual\ntemplates (so that css/js is included only for that template) or you may set it to True in the `app.config` if you want\nthe resource enabled for all templates for some reason or another.\n\nThe following config settings are searched for in the Flask application's configuration dictionary:\n* `STATICS_MINIFY` -- Have minified resources selected instead of uncompressed resources.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS` -- include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_BOOTSTRAP` -- include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_BOOTSTRAP_EDITABLE` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_BOOTSTRAP_GROWL` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_BOOTSTRAP_TYPEAHEAD` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_BOOTSTRAP_VALIDATOR` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_CSSHAKE` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_D3` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_DATATABLES` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_FONT_AWESOME` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_JQUERY` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_WHHG_FONT` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_ANIMATE` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_COOKIES` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_CSP` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_LOADER` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_MESSAGES` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_MOCKS` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_RESOURCE` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_ROUTE` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_SANITIZE` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_SCENARIO` --  include resource in all templates.\n* `STATICS_ENABLE_RESOURCE_ANGULARJS_TOUCH` --  include resource in all templates.\n\n## Changelog\n\n#### 1.0.0\n\n* Windows compatibility.\n* Updated Bootstrap to 3.3.1.\n* Updated Angular JS to 1.3.4.\n* Updated BootstrapValidator to 0.5.3.\n* Updated D3 to 3.4.13.\n* Updated Data Tables to 1.10.4.\n* Updated Font Awesome to 4.2.0.\n* Updated WHHG Font to latest as of November 26, 2014.\n\n#### 0.3.0\n\n* Replaced Bootstrap 3 Typeahead with Twitter typeahead.js.\n\n#### 0.2.0\n\n* Added BootstrapValidator resource.\n\n#### 0.1.1\n\n* Added Python 2.6 and 3.x support.\n\n#### 0.1.0\n\n* Initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobpol86%2Fflask-statics-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobpol86%2Fflask-statics-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobpol86%2Fflask-statics-helper/lists"}