🗣 dalec-discourse
Django Aggregate a Lot of External Content -- Discourse
Aggregate last discourse post from a given discourse instance.
Plugin of 🤖 dalec.
Installation
Install the module:
pip install dalec-discourse
In django settings INSTALLED_APPS, add:
INSTALLED_APPS = [
...
"dalec",
"dalec_prime",
"dalec_discourse",
...
]
Usage
General usage:
{% load dalec %}
{% dalec "discourse" content_type [channel=None] [channel_object=None] [template=None] %}
Real examples:
Topics
Retrieves latest topics:
{% dalec "discourse" "topic" %}
Retrieves latest topics from a category:
{% dalec "discourse" "topic" channel="category" channel_object="15" %}
Categories
Retrieves discourse categories:
{% dalec "discourse" "category" %}
User topics and replies
Retrieves user topics and replies:
{% dalec "discourse" "user_topic_and_reply" channel="user" channel_object="zorro" %}
Settings
Django settings must define:
DALEC_DISCOURSE_BASE_URL: discourse instance url (ex:https://discourse.org/)DALEC_DISCOURSE_API_USERNAME: discourse username (ex:admin)DALEC_DISCOURSE_API_TOKEN: discourse api token (ex:azeazeaezdfqsmlkrjzr)
It could also define the login/password attribute, and then this auth method will be used (may be usefull for htaccess access for instance):
DISCOURSE_AUTH_USERNAMEDISCOURSE_AUTH_PASSWORD
Metadata
Release files for dalec-discourse 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dalec-discourse-0.1.3.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dalec_discourse-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.8 kB
Release files / dalec-discourse-0.1.3.tar.gz
| Download URL | dalec-discourse-0.1.3.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6edd04312d70c5c863ccbca7942fb5f25444d98db7818d3ba43412ed3771588e
|
|
BLAKE2b-256 checksum How to use checksums |
b7b5cc00a4e05494f653905203836296163b246e700a6837f9e266eda5cd0afe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / dalec_discourse-0.1.3-py3-none-any.whl
| Download URL | dalec_discourse-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0146dcb8283b2410bcd2700ce81ebd3b679a1602fdb7a7827bee26cc01718410
|
|
BLAKE2b-256 checksum How to use checksums |
9b7aeb86eeb774ed439473057668d3ab17e13f900dd47be128aa397a080bcfa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|