1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
Flask-Silk
~~~~~~~~~~
.. module:: flask_silk
Flask-Silk is small Flask extension. It adds `silk`_ icons to your Flask
application or blueprint, or extension!
Silk is very awesome. It will be good for your Flask extensions. But if
someone use many Flask extensions which contains silk icons, they will lose
their storage space too much. They can solve the problem with Flask-Silk.
If you want to preview silk icons, visit :doc:`/dict`.
.. note::
Silk is licensed under `Creative Commons Attribution 2.5 License
<http://creativecommons.org/licenses/by/2.5>`_ or
`3.0 License <http://creativecommons.org/licenses/by/3.0>`_. Before using
the icons, read the license.
.. _silk: http://www.famfamfam.com/lab/icons/silk
Installation
============
Install via `PyPI <http://pypi.python.org/pypi/Flask-Silk>`_::
$ easy_install Flask-Silk
Or check out development version::
$ git clone git://github.com/sublee/flask-silk.git
How to Use
==========
If you want to contain silk icons to your application, follow the below
example::
from flask import Flask
from flask.ext.silk import Silk
app = Flask(__name__)
silk = Silk(app)
In your application, you can get an icon's url by::
url_for('silkicon', filename='bug.png')
It also works with Flask blueprint::
from flask import Blueprint
from flask.ext.silk import Silk
blu = Blueprint(__name__, __name__)
silk = Silk(blu)
API
===
.. autoclass:: Silk
:members:
.. autofunction:: send_silkicon
Indices and tables
==================
* :doc:`/dict`
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
|