index.txt 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .. Flask-Avatar documentation master file, created by
  2. sphinx-quickstart on Sat Jul 2 20:55:02 2016.
  3. You can adapt this file completely to your liking, but it should at least
  4. contain the root `toctree` directive.
  5. Welcome to Flask-Avatar's documentation!
  6. ========================================
  7. It's easy to generate avatar for flask.
  8. 1.1 Installation
  9. ~~~~~~~~~~~~~~~~
  10. To install Flask-Avatar:
  11. .. code-block:: shell
  12. pip install flask-avatar
  13. Or alternatively, you can download the repository and install manually by doing:
  14. .. code-block:: sehll
  15. git clone git@github.com:honmaple/flask-avatar.git
  16. cd flask-avatar
  17. python setup.py install
  18. 1.2 Usage
  19. ~~~~~~~~~
  20. .. code-block:: python
  21. from flask_avatar import Avatar
  22. [...]
  23. Avatar(app)
  24. Templates:
  25. .. code-block:: html
  26. {{ url_for('avatar',text = user.username )}}
  27. 1.3 Config
  28. ~~~~~~~~~~
  29. AVATAR_URL = "The avatar url,default 'avatar'"
  30. .. toctree::
  31. :maxdepth: 2
  32. Indices and tables
  33. ==================
  34. * :ref:`genindex`
  35. * :ref:`modindex`
  36. * :ref:`search`