Revision 0c581627

b/README
39 39

  
40 40
Then run:
41 41
    python manage.py syncdb
42
    python manage.py schemamigration im --initial
42 43
    python manage.py loaddata admin_user
43 44
    python manage.py runserver
44 45

  
b/README.upgrade
12 12
    
13 13
    ALTER TABLE im_user ADD COLUMN 'password' VARCHAR(255);
14 14

  
15
0.7.10 -> 0.7.11
16
----------------
17
*setup south:
18
    python manage.py syncdb
19
    python manage.py migrate im 0001 --fake
20
    python manage.py migrate im
b/docs/source/adminguide.rst
22 22
  cd /pithos/pithos
23 23
  cp settings.py.dist settings.py
24 24
  python manage.py syncdb
25
  python manage.py schemamigration im --initial
25 26
  cd /pithos
26 27
  python setup.py build_sphinx
27 28

  
b/pithos/im/migrations/0001_initial.py
1
# encoding: utf-8
2
import datetime
3
from south.db import db
4
from south.v2 import SchemaMigration
5
from django.db import models
6

  
7
class Migration(SchemaMigration):
8

  
9
    def forwards(self, orm):
10
        
11
        # Adding model 'User'
12
        db.create_table('im_user', (
13
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
14
            ('uniq', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)),
15
            ('realname', self.gf('django.db.models.fields.CharField')(default='', max_length=255)),
16
            ('email', self.gf('django.db.models.fields.CharField')(default='', max_length=255)),
17
            ('affiliation', self.gf('django.db.models.fields.CharField')(default='', max_length=255)),
18
            ('state', self.gf('django.db.models.fields.CharField')(default='ACTIVE', max_length=16)),
19
            ('level', self.gf('django.db.models.fields.IntegerField')(default=4)),
20
            ('invitations', self.gf('django.db.models.fields.IntegerField')(default=0)),
21
            ('password', self.gf('django.db.models.fields.CharField')(default='', max_length=255)),
22
            ('is_admin', self.gf('django.db.models.fields.BooleanField')(default=False)),
23
            ('auth_token', self.gf('django.db.models.fields.CharField')(max_length=32, null=True, blank=True)),
24
            ('auth_token_created', self.gf('django.db.models.fields.DateTimeField')(null=True)),
25
            ('auth_token_expires', self.gf('django.db.models.fields.DateTimeField')(null=True)),
26
            ('created', self.gf('django.db.models.fields.DateTimeField')()),
27
            ('updated', self.gf('django.db.models.fields.DateTimeField')()),
28
        ))
29
        db.send_create_signal('im', ['User'])
30

  
31
        # Adding model 'Invitation'
32
        db.create_table('im_invitation', (
33
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
34
            ('inviter', self.gf('django.db.models.fields.related.ForeignKey')(related_name='invitations_sent', null=True, to=orm['im.User'])),
35
            ('realname', self.gf('django.db.models.fields.CharField')(max_length=255)),
36
            ('uniq', self.gf('django.db.models.fields.CharField')(max_length=255)),
37
            ('code', self.gf('django.db.models.fields.BigIntegerField')(db_index=True)),
38
            ('is_accepted', self.gf('django.db.models.fields.BooleanField')(default=False)),
39
            ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
40
            ('accepted', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
41
        ))
42
        db.send_create_signal('im', ['Invitation'])
43

  
44

  
45
    def backwards(self, orm):
46
        
47
        # Deleting model 'User'
48
        db.delete_table('im_user')
49

  
50
        # Deleting model 'Invitation'
51
        db.delete_table('im_invitation')
52

  
53

  
54
    models = {
55
        'im.invitation': {
56
            'Meta': {'object_name': 'Invitation'},
57
            'accepted': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
58
            'code': ('django.db.models.fields.BigIntegerField', [], {'db_index': 'True'}),
59
            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
60
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
61
            'inviter': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'invitations_sent'", 'null': 'True', 'to': "orm['im.User']"}),
62
            'is_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
63
            'realname': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
64
            'uniq': ('django.db.models.fields.CharField', [], {'max_length': '255'})
65
        },
66
        'im.user': {
67
            'Meta': {'object_name': 'User'},
68
            'affiliation': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
69
            'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
70
            'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
71
            'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
72
            'created': ('django.db.models.fields.DateTimeField', [], {}),
73
            'email': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
74
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
75
            'invitations': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
76
            'is_admin': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
77
            'level': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
78
            'password': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
79
            'realname': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
80
            'state': ('django.db.models.fields.CharField', [], {'default': "'ACTIVE'", 'max_length': '16'}),
81
            'uniq': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
82
            'updated': ('django.db.models.fields.DateTimeField', [], {})
83
        }
84
    }
85

  
86
    complete_apps = ['im']
b/pithos/settings.py.dist
154 154
    'pithos.im',
155 155
    'pithos.api',
156 156
    'pithos.public',
157
    'pithos.ui'
157
    'pithos.ui',
158
    'south'
158 159
)
159 160

  
160 161
# Set the expiration time of newly created auth tokens

Also available in: Unified diff