Dalec plugin to retrieve discourse data
Project description
🗣 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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dalec-discourse-0.1.3.tar.gz.
File metadata
- Download URL: dalec-discourse-0.1.3.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6edd04312d70c5c863ccbca7942fb5f25444d98db7818d3ba43412ed3771588e
|
|
| MD5 |
d874859929953d8fd27d91c094642a96
|
|
| BLAKE2b-256 |
b7b5cc00a4e05494f653905203836296163b246e700a6837f9e266eda5cd0afe
|
File details
Details for the file dalec_discourse-0.1.3-py3-none-any.whl.
File metadata
- Download URL: dalec_discourse-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0146dcb8283b2410bcd2700ce81ebd3b679a1602fdb7a7827bee26cc01718410
|
|
| MD5 |
854c465cfab5cf66741f0f6672f3d3f8
|
|
| BLAKE2b-256 |
9b7aeb86eeb774ed439473057668d3ab17e13f900dd47be128aa397a080bcfa9
|