Commit b4bd00d8 authored by eric's avatar eric

Installation instructions and less intrusive context processors

parent 6d5a1c76
......@@ -5,13 +5,58 @@ Web platform, initially for the OSP 2013 Summerschool bearing this name.
<http://relearn.be/>
Relearn.be is structured as a wiki where each page constitutes an Etherpad.
The pad is available to logged in users (‘write-mode’).
The text of the pad is available to everyone (‘read-mode’).
The integration between Django and Etherpad is based on <https://github.com/sfyn/django-etherpad-lite>
- - -
## Installation instructions
# First create and install a virtual environment. Then:
mkdir -p ~/venvs/
cd ~/venvs/
virtualenv relearn
source ~/venvs/relearn/bin/activate
pip install django
pip install https://github.com/rassie/PyEtherpadLite/zipball/master
pip install https://github.com/codingisacopingstrategy/django-etherpad-lite/zipball/master
cd relearn
cd ~/relearn/relearn.be/relearn
cp local_settings.py.example local_settings.py
# Add database details to local_settings.py
cd ..
python manage.py syncdb
# --> and then install etherpad
mkdir -p ~/src
cd ~/src
git clone https://github.com/ether/etherpad-lite.git
# run it with:
~/src/etherpad-lite/bin/run.sh
Your Etherpad is running at http://12.0.0.1:9001/
in Etherpad’s folder, you will find a file called APIKEY.txt
you need it’s contents later
(check context-processor)
Run the surver:
python manage.py runserver
visit the admin at: http://127.0.0.1:800/admin/
you can login with the superuser
Etherpadlite > Servers > Add
url: http://127.0.0.1:9001/
api_key:
Auth > Group > Add
Add your superuser to group you just created
Etherpadlite > Group > Add
Create an Etherpad Group based upon the group you just created.
Now relearn is served at http://127.0.0.1:8000/
......@@ -6,6 +6,8 @@ from gitcommits.models import commits
def pads(request):
hash = {}
if 'admin' in request.path:
return hash
# If the user is logged in:
if hasattr(request, 'user') and not isinstance(request.user, AnonymousUser):
# This magic exists to synch between the django author and the etherpad author
......@@ -38,6 +40,8 @@ def filter_commits(commits):
return filtered_commits
def compose_commits(request):
if 'admin' in request.path:
return {}
commit_stream = commits("osp.relearn.off-grid") + commits("osp.relearn.gesturing-paths") + commits("osp.relearn.be") + commits("osp.relearn.can-it-scale-to-the-universe")
commit_stream.sort(reverse=True, key=lambda c: c['commit_time'])
return { 'commits' : filter_commits(commit_stream) }
import os
PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
API_PATH = 'http://osp.constantvzw.org/api/'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add one of postgresql_psycopg2, mysql, sqlite3, oracle
'NAME': '',
'ENGINE': 'django.db.backends.sqlite3', # Add one of postgresql_psycopg2, mysql, sqlite3, oracle
'NAME': os.path.join(PROJECT_DIR, 'sqlite.db'),
'USER': '',
'PASSWORD': '',
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
......@@ -16,4 +20,4 @@ EMAIL_HOST = ''
EMAIL_PORT = 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_USE_TLS = True
\ No newline at end of file
EMAIL_USE_TLS = True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment