pré remplissage
authorWilly MANGA <willy.manga@auf.org>
Thu, 29 May 2014 16:05:58 +0000 (17:05 +0100)
committerWilly MANGA <willy.manga@auf.org>
Thu, 29 May 2014 16:05:58 +0000 (17:05 +0100)
projets_django/bacgl_django/messagerie/migrations/0001_initial.py [new file with mode: 0644]
projets_django/bacgl_django/messagerie/migrations/0002_auto__add_auth.py [new file with mode: 0644]
projets_django/bacgl_django/messagerie/migrations/0003_copieDonneeAuth.py [new file with mode: 0644]
projets_django/bacgl_django/messagerie/models.py

diff --git a/projets_django/bacgl_django/messagerie/migrations/0001_initial.py b/projets_django/bacgl_django/messagerie/migrations/0001_initial.py
new file mode 100644 (file)
index 0000000..65ad9f2
--- /dev/null
@@ -0,0 +1,20 @@
+# -*- 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):
+        pass
+
+    def backwards(self, orm):
+        pass
+
+    models = {
+        
+    }
+
+    complete_apps = ['messagerie']
\ No newline at end of file
diff --git a/projets_django/bacgl_django/messagerie/migrations/0002_auto__add_auth.py b/projets_django/bacgl_django/messagerie/migrations/0002_auto__add_auth.py
new file mode 100644 (file)
index 0000000..2529366
--- /dev/null
@@ -0,0 +1,40 @@
+# -*- 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 'Auth'
+        db.create_table('messagerie_auth', (
+            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+            ('user', self.gf('django.db.models.fields.CharField')(max_length=384)),
+            ('password', self.gf('django.db.models.fields.CharField')(max_length=384)),
+            ('actif', self.gf('django.db.models.fields.IntegerField')()),
+            ('expire', self.gf('django.db.models.fields.IntegerField')()),
+            ('source', self.gf('django.db.models.fields.CharField')(max_length=192)),
+        ))
+        db.send_create_signal('messagerie', ['Auth'])
+
+
+    def backwards(self, orm):
+        # Deleting model 'Auth'
+        db.delete_table('messagerie_auth')
+
+
+    models = {
+        'messagerie.auth': {
+            'Meta': {'object_name': 'Auth'},
+            'actif': ('django.db.models.fields.IntegerField', [], {}),
+            'expire': ('django.db.models.fields.IntegerField', [], {}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '384'}),
+            'source': ('django.db.models.fields.CharField', [], {'max_length': '192'}),
+            'user': ('django.db.models.fields.CharField', [], {'max_length': '384'})
+        }
+    }
+
+    complete_apps = ['messagerie']
\ No newline at end of file
diff --git a/projets_django/bacgl_django/messagerie/migrations/0003_copieDonneeAuth.py b/projets_django/bacgl_django/messagerie/migrations/0003_copieDonneeAuth.py
new file mode 100644 (file)
index 0000000..783a6bc
--- /dev/null
@@ -0,0 +1,58 @@
+# -*- 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: Remember to use orm['appname.ModelName'] rather than "from appname.models..."
+
+    def backwards(self, orm):
+        "Write your backwards methods here."
+
+    models = {
+        'ancien_messagerie.auth': {
+            'Meta': {'object_name': 'Auth', 'db_table': "u'auth'"},
+            'actif': ('django.db.models.fields.IntegerField', [], {}),
+            'expire': ('django.db.models.fields.IntegerField', [], {}),
+            'id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}),
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '384'}),
+            'source': ('django.db.models.fields.CharField', [], {'max_length': '192'}),
+            'user': ('django.db.models.fields.CharField', [], {'max_length': '384'})
+        },
+        'ancien_messagerie.mailbox': {
+            'Meta': {'object_name': 'Mailbox', 'db_table': "u'mailbox'"},
+            'actif': ('django.db.models.fields.IntegerField', [], {}),
+            'domain': ('django.db.models.fields.CharField', [], {'max_length': '384'}),
+            'expire': ('django.db.models.fields.IntegerField', [], {}),
+            'homedir': ('django.db.models.fields.CharField', [], {'max_length': '768'}),
+            'id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}),
+            'source': ('django.db.models.fields.CharField', [], {'max_length': '192'}),
+            'user': ('django.db.models.fields.CharField', [], {'max_length': '384'})
+        },
+        'ancien_messagerie.virtual': {
+            'Meta': {'object_name': 'Virtual', 'db_table': "u'virtual'"},
+            'actif': ('django.db.models.fields.IntegerField', [], {}),
+            'destination': ('django.db.models.fields.CharField', [], {'max_length': '768'}),
+            'domain': ('django.db.models.fields.CharField', [], {'max_length': '384'}),
+            'expire': ('django.db.models.fields.IntegerField', [], {}),
+            'id': ('django.db.models.fields.IntegerField', [], {'primary_key': 'True'}),
+            'source': ('django.db.models.fields.CharField', [], {'max_length': '192'}),
+            'user': ('django.db.models.fields.CharField', [], {'max_length': '384'})
+        },
+        'messagerie.auth': {
+            'Meta': {'object_name': 'Auth'},
+            'actif': ('django.db.models.fields.IntegerField', [], {}),
+            'expire': ('django.db.models.fields.IntegerField', [], {}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'password': ('django.db.models.fields.CharField', [], {'max_length': '384'}),
+            'source': ('django.db.models.fields.CharField', [], {'max_length': '192'}),
+            'user': ('django.db.models.fields.CharField', [], {'max_length': '384'})
+        }
+    }
+
+    complete_apps = ['ancien_messagerie', 'messagerie']
+    symmetrical = True
index beeb308..ac94e4b 100644 (file)
@@ -1,2 +1,16 @@
 from django.db import models
 
+CHOIX_BINAIRE = (
+                (1, "Actif"),
+                (0, "Inactif"),
+                )
+
+class Auth(models.Model):
+        user = models.CharField(max_length=384)
+        password = models.CharField(max_length=384)
+        actif = models.IntegerField(choices=CHOIX_BINAIRE)
+        expire = models.IntegerField(choices=CHOIX_BINAIRE)
+        source = models.CharField(max_length=192)
+
+        def __unicode__():
+                return self.user