Giter Club home page Giter Club logo

django-etherpad-lite's Introduction

Etherpad Lite for Django

This app is in a pre-alpha state - some assembly is required.

This Django app provides a basic integration with etherpad lite. It presently allows django users created by the django.contrib.auth app to be mapped to etherpad users and groups, the creation of pads and secure sessions.

Patches, forks, questions and suggestions are always welcome.

Installation

For now installation is all manual.

First you will need to install etherpad-lite, or have the server url and apikey of an existing etherpad-lite instance.

Lets assume if you are looking at this you already know how to install Django and start new Django projects.

You will need to clone this repo into your Django project, and add etherpadlite to the INSTALLED_APPS in your settings.py.

Set a cookie domain in your settings.py file that will be used by your django install and etherpad servers:

# Set the session cookie domain
SESSION_COOKIE_DOMAIN = '.example.com'

Finally you will need to add lines to your urls.py file. You can either add this line:

 url(r'^', include('etherpadlite.urls')),

Or, if you are already serving your home page via a different app, these lines:

 url(r'^etherpad', include('etherpadlite.urls')),
 url(r'^accounts/profile/$', include('etherpadlite.urls')),
 url(r'^logout$', include('etherpadlite.urls')),

Once you have done this, you will need to, at minimum, create a group and add a first etherpad-lite server via the django admin interface in order to take full advantage of this modules functionality:

  1. Add a group: admin/auth/group/add/
  2. Add an etherpad server: admin/etherpadlite/padserver/add/
  3. Add an etherpad group corresponding to the auth group: admin/etherpadlite/padgroup/add/

At this point, any users you add to the django project who are members of an etherpad enabled group will be able to take full advantage of the modules features.

Etherpad-lite settings generation

WARNING: This feature requires dict-style settings.DATABASES setting in your project.

django-etherpad-lite offers a management command which generates a settings.json for Etherpad-lite uses project's database configuration. It is then possible to generate a proper configuration using python manage.py generate_etherpad_settings > /path/to/etherpad/configuration/settings.json and then start Etherpad-lite using -s option: node node/server.js -s settings.json:

$ python manage.py generate_etherpad_settings
{
    "minify": true,
    "dbType": "postgres",
    "ip": "0.0.0.0",
    "maxAge": 21600000,
    "port": 9001,
    "loglevel": "INFO",
    "abiword": null,
    "defaultPadText": "",
    "dbSettings": {
        "host": "localhost",
        "password": "database_password",
        "user": "database_user",
        "database": "database_name"
    },
    "editOnly": false,
    "requireSession": false
}

This configuration can be overriden by including a ETHERPAD_CONFIGURATION setting in your settings.py. Every option corresponds to an option in the Etherpad-lite default configuration.

ETHERPAD_CONFIGURATION = {
    'port': '8088'
}

One exception is the database setting: while it's possible to override the dbType and dbSettings settings (e.g. if you prefer to use a real key-value store like Redis), for most use cases it's recommended to set the databaseAlias settings (which defaults to default) to let django-etherpad-lite extract and set database options from your project's settings:

ETHERPAD_CONFIGURATION = {
    'databaseAlias': 'nondefault',
}

Support

Some documentation exists in the github wiki.

Report issues to the issue queue.

A note on multi-server support

I intend to support multiple etherpad-lite services with this App. For the moment etherpad instances must be served from the same domain name or ip address as the django app.

Licensing

Copyright 2012 Sofian Benaissa.

Etherpad Lite for Django is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

django-etherpad-lite's People

Contributors

leylaso avatar rassie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

django-etherpad-lite's Issues

Example Deployment

Thinking about using this in an application, any chance I can take a peek at an example deployment to see the capabilities?

Django 1.5 compatibility

Hello,

Trying to run this with Django 1.5 it fails to start the development server with the TypeError: __init__() got an unexpected keyword argument 'verify_exists'. I guess that’s because this functionality is removed from this version:

django.db.models.fields.URLField.verify_exists will be removed. The feature was deprecated in 1.3.1 due to intractable security and performance issues and will follow a slightly accelerated deprecation timeframe.

https://docs.djangoproject.com/en/1.5/internals/deprecation/#id2

django-etherpad-lite + heroku

Do you have django-etherpad-lite hosted on a webserver somewhere?

I've tried to host it on Heroku and I'm having a really hard time getting it up and running.

You can see here: http://tulsa-etherpad.herokuapp.com

After you create a pad using this app you receive a js error that says,

An error occured while loading the pad
Uncaught Error: The module at "ep_etherpad-lite/static/js/jquery" does not exist. in http://tulsa-etherpad.herokuapp.com/static/js/require-kernel.js (line 569)

Does anyone have any thoughts on this ?

Do I need to share the database to make it function?

Hello,

The README.txt goes into some length to describe how I could share the DATABASE settings inbetween Etherpad and the Django-Etherpad bridge.

I managed to set up my project this way. But do I need to do this? From what I can see, the app mostly uses the API-client, which doesn’t require direct database access? So could I keep the two on separate databases?

Thanks,

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.