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_USERNAME
DISCOURSE_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
dalec-discourse-0.1.0.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for dalec_discourse-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a9f96f09869d837a787658974b78ee0476d0bd6cad1ced2edc3aa134b0fc5b5 |
|
MD5 | 951a73d7271a20dd46e89dff277fe943 |
|
BLAKE2b-256 | 08ea83b52978b38f9d194a346fb04efaa3905c1cecbc795e8ee427bb045476be |