Commit 3f8f4396 authored by svilayphiou's avatar svilayphiou
Browse files

Update to Django2.0 → a tour to check bugs due to upgrade is still needed

parent 2b0bf092
......@@ -37,26 +37,25 @@ Infrastructures entrelacées, an exhibition by the collective Artivistic at SKOL
## Installation instructions
Requires Django 1.5
Requires Django 2.0
First create and install a virtual environment [1]. Then:
sudo aptitude install python-dev libxml2-dev libxslt-dev libz-dev
pip install "django<1.6" south Markdown html5tidy python-dateutil rdflib pytz six isodate lxml
pip install "django<2.1" django-markdown python-dateutil rdflib
# old pip install html5tidy pytz six isodate lxml
pip install https://github.com/devjones/PyEtherpadLite/archive/master.zip
pip install https://github.com/aleray/markdown-figures/archive/master.zip
mkdir -p ~/src/
cd ~/src
git clone http://gitlab.constantvzw.org/osp/tools.ethertoff.git
# Or use cloning over ssh (requires account):
# git@gitlab.constantvzw.org:osp/tools.ethertoff.git
cd tools.ethertoff # [2]
cd ethertoff
cp local_settings.py.example local_settings.py
# Change database details in local_settings.py
cd ..
python manage.py syncdb
python manage.py migrate etherpadlite
# python manage.py syncdb
python manage.py migrate
Change the info of your domain name and website name in the Sites section on
<http://localhost:8000/admin>. **Do not add "http://" in your domain name,
......@@ -74,19 +73,25 @@ And then do the following (replace the "domain" and "name" with your own info):
site = Site.objects.create(domain='example.com', name='example.com')
site.save()
--> and then install etherpad
## Install Etherpad-lite
mkdir -p ~/src
cd ~/src
git clone https://github.com/ether/etherpad-lite.git
# --> install node js
## --> install node js
Install Make:
sudo aptitude install build-essentials
Linux Binaries (.tar.gz) from http://nodejs.org/download/
## Launch Etherpad-lite
run Etherpad with:
~/src/etherpad-lite/bin/run.sh
......@@ -95,7 +100,11 @@ Your Etherpad is running at http://127.0.0.1:9001/
In Etherpad’s folder, you will find a file called APIKEY.txt
you need its contents later
## Launch Ethertoff
Run the server:
python manage.py runserver
......@@ -108,20 +117,18 @@ Now, on the Django admin:
url: http://127.0.0.1:9001/
# if on a server
url: http://domainname/ether/
api_key: the contents of the file APIKEY.txt
api_key: the contents of the file APIKEY.txt in Etherpad files
Go back to the admin home, and then add a new group:
Auth > Groups > Add
Go back to the admin home, and then add the superuser (and all needed users)
to the group you just created
Go back to the admin home, and then add the superuser (and all needed users) to the group you just created
Auth > Users
Go back to the admin home, and then create an Etherpad Group based upon the group and the server you just created.
Etherpadlite > Groups > Add
Now Ethertoff is served at http://127.0.0.1:8000/ locally, or on your domain
name on a server.
Now Ethertoff is served at http://127.0.0.1:8000/ locally, or on your domain name on a server.
You can set the site name, that appears on the header, in the ‘sites’ app in the admin.
......@@ -144,15 +151,15 @@ example.com / -> django
/ether/ -> etherpad
/static/ -> django static files
To test if everything is working, you can use screen to run gunicorn and
etherpad scripts at the same time, and then use a daemon like Supervisor to run them in the
background.
To test if everything is working, you can use screen to run gunicorn and Etherpad scripts at the same time, and then use a daemon like Supervisor to run them in the background.
## MYSQL
pip install "distribute>0.6.24"
sudo aptitude install libmysqlclient-dev python-dev
pip install MySQL-python
# pip install "distribute>0.6.24"
sudo aptitude install libmysqlclient-dev python-dev
pip install MySQL-python mysqlclient
## DJANGO
......@@ -182,6 +189,8 @@ folder /static/.
To run the server in the background, use Supervisor daemon.
## ETHERPAD
Etherpad, finally, runs as its own server. You probably need to use
a supervisor such as supervisord to make sure it keeps running.
......@@ -190,6 +199,8 @@ is not intended for use on servers. Finally, you will need to reverse
proxy the Etherpad process from your main web server, mapping it to
a folder such as /ether/.
## SUPERVISOR
To run django and etherpad in the background.
......
......@@ -11,4 +11,4 @@ class PadCreate(forms.Form):
class GroupCreate(forms.ModelForm):
class Meta:
model = Group
exclude = ('permissions')
exclude = ('permissions',)
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'PadServer'
db.create_table(u'etherpadlite_padserver', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('title', self.gf('django.db.models.fields.CharField')(max_length=256)),
('url', self.gf('django.db.models.fields.URLField')(max_length=256)),
('apikey', self.gf('django.db.models.fields.CharField')(max_length=256)),
('notes', self.gf('django.db.models.fields.TextField')(blank=True)),
))
db.send_create_signal(u'etherpadlite', ['PadServer'])
# Adding model 'PadGroup'
db.create_table(u'etherpadlite_padgroup', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.Group'])),
('groupID', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
('server', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['etherpadlite.PadServer'])),
))
db.send_create_signal(u'etherpadlite', ['PadGroup'])
# Adding model 'PadAuthor'
db.create_table(u'etherpadlite_padauthor', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
('authorID', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
('server', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['etherpadlite.PadServer'])),
))
db.send_create_signal(u'etherpadlite', ['PadAuthor'])
# Adding M2M table for field group on 'PadAuthor'
m2m_table_name = db.shorten_name(u'etherpadlite_padauthor_group')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('padauthor', models.ForeignKey(orm[u'etherpadlite.padauthor'], null=False)),
('padgroup', models.ForeignKey(orm[u'etherpadlite.padgroup'], null=False))
))
db.create_unique(m2m_table_name, ['padauthor_id', 'padgroup_id'])
# Adding model 'Pad'
db.create_table(u'etherpadlite_pad', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=256)),
('display_slug', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
('display_name', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
('server', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['etherpadlite.PadServer'])),
('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['etherpadlite.PadGroup'])),
))
db.send_create_signal(u'etherpadlite', ['Pad'])
def backwards(self, orm):
# Deleting model 'PadServer'
db.delete_table(u'etherpadlite_padserver')
# Deleting model 'PadGroup'
db.delete_table(u'etherpadlite_padgroup')
# Deleting model 'PadAuthor'
db.delete_table(u'etherpadlite_padauthor')
# Removing M2M table for field group on 'PadAuthor'
db.delete_table(db.shorten_name(u'etherpadlite_padauthor_group'))
# Deleting model 'Pad'
db.delete_table(u'etherpadlite_pad')
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'etherpadlite.pad': {
'Meta': {'ordering': "['display_slug', 'name']", 'object_name': 'Pad'},
'display_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'display_slug': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadGroup']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadServer']"})
},
u'etherpadlite.padauthor': {
'Meta': {'object_name': 'PadAuthor'},
'authorID': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'authors'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['etherpadlite.PadGroup']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadServer']"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
},
u'etherpadlite.padgroup': {
'Meta': {'object_name': 'PadGroup'},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.Group']"}),
'groupID': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadServer']"})
},
u'etherpadlite.padserver': {
'Meta': {'object_name': 'PadServer'},
'apikey': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '256'})
}
}
complete_apps = ['etherpadlite']
\ No newline at end of file
# Generated by Django 2.0.6 on 2018-06-21 14:07
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel(
name='Pad',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
('display_slug', models.CharField(blank=True, max_length=256, verbose_name='Name as used in URL (use :: for namespacing)')),
('display_name', models.CharField(blank=True, max_length=256, verbose_name='Name as used in Display (use → for namespacing)')),
],
options={
'ordering': ['display_slug', 'name'],
},
),
migrations.CreateModel(
name='PadAuthor',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('authorID', models.CharField(blank=True, max_length=256)),
],
options={
'verbose_name': 'author',
},
),
migrations.CreateModel(
name='PadGroup',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('groupID', models.CharField(blank=True, max_length=256)),
('group', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='auth.Group')),
],
options={
'verbose_name': 'group',
},
),
migrations.CreateModel(
name='PadServer',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=256)),
('url', models.URLField(max_length=256, verbose_name='URL')),
('apikey', models.CharField(max_length=256, verbose_name='API key')),
('notes', models.TextField(blank=True, verbose_name='description')),
],
options={
'verbose_name': 'server',
},
),
migrations.AddField(
model_name='padgroup',
name='server',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='etherpadlite.PadServer'),
),
migrations.AddField(
model_name='padauthor',
name='group',
field=models.ManyToManyField(blank=True, null=True, related_name='authors', to='etherpadlite.PadGroup'),
),
migrations.AddField(
model_name='padauthor',
name='server',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='etherpadlite.PadServer'),
),
migrations.AddField(
model_name='padauthor',
name='user',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='pad',
name='group',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='etherpadlite.PadGroup'),
),
migrations.AddField(
model_name='pad',
name='server',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='etherpadlite.PadServer'),
),
]
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Pad.name'
db.alter_column(u'etherpadlite_pad', 'name', self.gf('django.db.models.fields.CharField')(max_length=50))
def backwards(self, orm):
# Changing field 'Pad.name'
db.alter_column(u'etherpadlite_pad', 'name', self.gf('django.db.models.fields.CharField')(max_length=256))
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'etherpadlite.pad': {
'Meta': {'ordering': "['display_slug', 'name']", 'object_name': 'Pad'},
'display_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'display_slug': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadGroup']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadServer']"})
},
u'etherpadlite.padauthor': {
'Meta': {'object_name': 'PadAuthor'},
'authorID': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'authors'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['etherpadlite.PadGroup']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadServer']"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
},
u'etherpadlite.padgroup': {
'Meta': {'object_name': 'PadGroup'},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.Group']"}),
'groupID': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadServer']"})
},
u'etherpadlite.padserver': {
'Meta': {'object_name': 'PadServer'},
'apikey': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '256'})
}
}
complete_apps = ['etherpadlite']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
# Note: Don't use "from appname.models import ModelName".
# Use orm.ModelName to refer to models in this application,
# and orm['appname.ModelName'] for models in other applications.
# and orm['appname.ModelName'] for models in other applications.
for pad in orm.Pad.objects.all():
pad.name = pad.name[:42]
pad.save()
def backwards(self, orm):
"Write your backwards methods here."
raise RuntimeError("Cannot reverse this migration.")
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'etherpadlite.pad': {
'Meta': {'ordering': "['display_slug', 'name']", 'object_name': 'Pad'},
'display_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'display_slug': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadGroup']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadServer']"})
},
u'etherpadlite.padauthor': {
'Meta': {'object_name': 'PadAuthor'},
'authorID': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'authors'", 'null': 'True', 'symmetrical': 'False', 'to': u"orm['etherpadlite.PadGroup']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadServer']"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
},
u'etherpadlite.padgroup': {
'Meta': {'object_name': 'PadGroup'},
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.Group']"}),
'groupID': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'server': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['etherpadlite.PadServer']"})
},
u'etherpadlite.padserver': {
'Meta': {'object_name': 'PadServer'},
'apikey': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '256'})
}
}
complete_apps = ['etherpadlite']
symmetrical = True
......@@ -3,7 +3,7 @@
from django.db import models
from django.db.models.signals import pre_delete
from django.contrib.auth.models import User, Group
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _