Git Product home page Git Product logo

dalec-discourse's Introduction

๐Ÿ—ฃ dalec-discourse

Stable Version Code style: black Imports: isort semver

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

dalec-discourse's People

Contributors

dylanncordel avatar weber-s avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.