canonicalwebteam.discourse-docs-1.0.1
توضیحات
Flask extension to integrate discourse content generated to docs to your website.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | canonicalwebteam.discourse-docs-1.0.1 |
| نام | canonicalwebteam.discourse-docs |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Canonical webteam |
| ایمیل نویسنده | webteam@canonical.com |
| آدرس صفحه اصلی | https://github.com/canonical-webteam/canonicalwebteam.docs |
| آدرس اینترنتی | https://pypi.org/project/canonicalwebteam.discourse-docs/ |
| مجوز | - |
# canonicalwebteam.discourse_docs
Flask extension to integrate discourse content generated to docs to your website.
## Install
Install the project with pip: `pip install canonicalwebteam.discourse_docs`
You can add the extension on your project as follows, replacing, at least, `base_url` and `index_topic_id` with your own settings:
```python
import talisker.requests
from canonicalwebteam.discourse_docs import DiscourseDocs, DiscourseAPI
app = Flask("myapp")
session = talisker.requests.get_session()
discourse_docs = DiscourseDocs(
parser=DocParser(
api=DiscourseAPI(
base_url="https://forum.example.com/", session=session
),
index_topic_id=321,
url_prefix="/docs",
),
document_template="docs/document.html",
url_prefix="/docs",
)
discourse_docs.init_app(app)
```
Once this is added you will need to add the file `document.html` to your template folder.
نیازمندی
| مقدار | نام |
|---|---|
| >=1.0.2 | Flask |
| - | beautifulsoup4 |
| - | humanize |
| - | python-dateutil |
| - | validators |
نحوه نصب
نصب پکیج whl canonicalwebteam.discourse-docs-1.0.1:
pip install canonicalwebteam.discourse-docs-1.0.1.whl
نصب پکیج tar.gz canonicalwebteam.discourse-docs-1.0.1:
pip install canonicalwebteam.discourse-docs-1.0.1.tar.gz