introduction.txt 616 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. 1 flask-avatar
  2. --------------
  3. 1.1 Installation
  4. ~~~~~~~~~~~~~~~~
  5. To install Flask-Avatar:
  6. .. code-block:: shell
  7. pip install flask-avatar
  8. Or alternatively, you can download the repository and install manually by doing:
  9. .. code-block:: sehll
  10. git clone git@github.com:honmaple/flask-avatar.git
  11. cd flask-avatar
  12. python setup.py install
  13. 1.2 Usage
  14. ~~~~~~~~~
  15. .. code-block:: python
  16. from flask_avatar import Avatar
  17. [...]
  18. Avatar(app)
  19. Templates:
  20. .. code-block:: html
  21. {{ url_for('avatar',text = user.username )}}
  22. 1.3 Config
  23. ~~~~~~~~~~
  24. AVATAR_URL = "The avatar url,default 'avatar'"