Giter Club home page Giter Club logo

jsconnectdjango's Introduction

jsConnectDjango

Django implementation of jsConnect for VanillaForums.

It implements the std interface for a jsConnect addon you may need to provide your own backend for returning user photo URLs.

Updated for Python 3 and Django 1.7.x

Basic usage

Site-wide Vanilla Forums setup

Steps below should be enough to get you started with the basic jsConnect/SSO integration to your Django project.

  1. In your settings.py:

     JS_CONNECT_CLIENT_ID = '[client_id]'
     JS_CONNECT_SECRET = '[secret]'
    
  2. In your urls.py:

     url(r'jsconnect/', include('jsConnectDjango.urls'))
    
  3. In the Vanilla Forums dashboard go to jsConnect settings and populate Authenticate Url field:

     http://yourdomain.com/jsconnect/
    

Embedded Vanilla Forums setup

In order to use SSO for embedded Vanilla Forums instance, you need to generate a value for the vanilla_sso JavaScript variable and put it into the template containing embedded VF snippet.

There's a simple EmbeddedSsoMixin which will provide exactly that value in the vanilla_sso_string context variable.

 from jsConnectDjango.views import EmbeddedSsoMixin

 class EmbeddedForumView(EmbeddedSsoMixin, TemplateView):
    template_name = 'forum/embedded.html'

Then in the forum/embedded.html template:

<script type="text/javascript">
    var vanilla_sso = '{{ vanilla_sso_string }}';
</script>
<script type="text/javascript" src="http://YOURFORUM.vanillaforums.com/js/embed.js"></script>

jsconnectdjango's People

Contributors

aarono avatar adlorenz avatar buddelkiste avatar nopik avatar

Watchers

 avatar  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.