Flask-Discussion
Flask-Discussion is an extension for Flask that adds support for several discussion/comment systems to your application.
Supported comment systems:
Quickstart
First install the extension:
pip install Flask-Discussion
And then initialize it in your application:
from flask import Flask
from flask_discussion import Discussion
discussion = Discussion()
def init_app():
app = Flask(__name__)
# Set config values
# .....
discussion.init_app(app)
This will register the extension templates (which contain the macros for each comment system) with your application, making them available in your own templates.
If you want to be able to swap comment systems through the configuration of
your application, you may use the macro defined in
flask_discussion/helper.html:
{% import "flask_discussion/helper.html" as discussion %}
<html>
<body>
{{ discussion.render_comments(title="Page title", identifier="my-page", url="http://mypage.com") }}
</body>
</html>
Note that the macro receives any keyword argument and will relay the appropriate information to the corresponding system-specific macro (i.e. each comment system may use only specific information, therefore you should provide all possible values for all comment systems).
However, if you only want to use a specific comment system, you may import its macros directly. For instance, for Disqus:
{% import "flask_discussion/disqus.html" as disqus %}
<html>
<body>
{{ disqus.render_comments(identifier="my-page", url="http://mypage.com", title="Page title") }}
</body>
</html>
Documentation
Documentation is available at https://flask-discussion.readthedocs.io.
Metadata
Release files for Flask-Discussion 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| Flask-Discussion-0.1.1.tar.gz | 10.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Flask_Discussion-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / Flask-Discussion-0.1.1.tar.gz
| Download URL | Flask-Discussion-0.1.1.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58fdeab7faf19598e458ac48dceea1e9eaa0fa64c63fc8ec1b543c5aed46bbeb
|
|
BLAKE2b-256 checksum How to use checksums |
ae3cd0dcffdd0f8b7f51dc5c47a73eace783be8f39b19a99b92f16ac46e9eadd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5rc1
|
Release files / Flask_Discussion-0.1.1-py3-none-any.whl
| Download URL | Flask_Discussion-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fc8873f0dfa81340d60655854eb9e6078bb9fa6e4db072fbd4aac7d5a88c99e
|
|
BLAKE2b-256 checksum How to use checksums |
4c6a1619581d831b3bd3eb161f3a28cba867af5fdb9859b499881d34f90f2121
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5rc1
|
Security for Flask-Discussion 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.