Exemplo n.º 1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('photo',
                 models.FileField(upload_to=account.models.upload_avatar)),
                ('money', models.PositiveIntegerField()),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('account', '0017_auto_20200607_0612'),
    ]

    operations = [
        migrations.AddField(
            model_name='account',
            name='description',
            field=models.CharField(default='', max_length=200),
        ),
        migrations.AddField(
            model_name='account',
            name='karma',
            field=models.PositiveIntegerField(default=0),
        ),
        migrations.AddField(
            model_name='account',
            name='profile_image',
            field=models.ImageField(blank=True, upload_to=account.models.upload_location),
        ),
    ]
Exemplo n.º 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('type', models.PositiveIntegerField(choices=[(1, 'Cliente'), (2, 'Comum'), (3, 'Admin')], default=2, verbose_name='Tipo')),
                ('full_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='Nome Completo')),
                ('avatar', models.ImageField(blank=True, null=True, upload_to=account.models.path_avatar, verbose_name='Avatar')),
                ('birdayth', models.DateField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'Profile',
                'verbose_name_plural': 'Profiles',
            },
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True,
                                          max_length=150,
                                          null=True)),
                ('age', models.CharField(max_length=15)),
                ('contact', models.PositiveIntegerField(blank=True,
                                                        null=True)),
                ('active', models.BooleanField(default=True)),
                ('course',
                 models.CharField(choices=[('python', 'Python'),
                                           ('django', 'Python Django'),
                                           ('js', 'JavaScript')],
                                  max_length=250,
                                  null=True)),
                ('email',
                 models.CharField(max_length=150,
                                  null=True,
                                  validators=[account.models.validation_email
                                              ])),
            ],
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('qcm', '0001_initial'),
        ('group', '0001_initial'),
        ('account', '0001_initial'),
        ('socle', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Answerplayer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.CharField(blank=True, max_length=255, null=True, verbose_name='Réponse')),
                ('score', models.PositiveIntegerField(default=0, editable=False)),
                ('timer', models.CharField(editable=False, max_length=255)),
                ('is_correct', models.BooleanField(default=0, editable=False)),
            ],
        ),
        migrations.CreateModel(
            name='Qrandom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=50, verbose_name='Titre')),
                ('texte', ckeditor_uploader.fields.RichTextUploadingField(blank=True, verbose_name='Enoncé')),
                ('is_publish', models.BooleanField(default=1, verbose_name='Publié ?')),
                ('qtype', models.PositiveIntegerField(default=2, editable=False)),
                ('calculator', models.BooleanField(default=0, verbose_name='Calculatrice ?')),
                ('tool', models.BooleanField(default=0, verbose_name="Barre d'outils ?")),
                ('duration', models.PositiveIntegerField(blank=True, default=20, verbose_name='Durée')),
                ('knowledge', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='qrandom', to='socle.Knowledge')),
                ('teacher', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='qrandom', to='account.Teacher')),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.TextField(blank=True, default='', max_length=255, verbose_name='Réponse écrite')),
                ('calculator', models.BooleanField(default=0, verbose_name='Calculatrice ?')),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('qtype', models.PositiveIntegerField(default=3, editable=False)),
                ('answer', models.CharField(blank=True, max_length=255, null=True, verbose_name='Réponse attendu')),
                ('imagefile', models.ImageField(blank=True, default='', upload_to=tool.models.question_directory_path, verbose_name='Image')),
                ('audio', models.FileField(blank=True, default='', upload_to=tool.models.question_directory_path, verbose_name='Audio')),
                ('video', models.TextField(blank=True, default='', verbose_name='Vidéo intégrée')),
                ('is_publish', models.BooleanField(default=1, verbose_name='Publié ?')),
                ('is_radio', models.BooleanField(default=0, verbose_name='Type de réponse ?')),
                ('is_correction', models.BooleanField(default=0, verbose_name='Correction ?')),
                ('duration', models.PositiveIntegerField(blank=True, default=20, verbose_name='Durée')),
                ('point', models.PositiveIntegerField(blank=True, default=1000, verbose_name='Point')),
                ('is_correct', models.BooleanField(default=1, verbose_name='Réponse correcte ?')),
                ('ranking', models.PositiveIntegerField(blank=True, default=0, editable=False, null=True)),
                ('size', models.PositiveIntegerField(choices=[(16, '16'), (24, '24'), (32, '32'), (40, '40'), (48, '48'), (56, '56')], default=32, verbose_name='Taille de police')),
                ('theme', models.BooleanField(default=0, verbose_name='Thème ?')),
                ('knowledge', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='question', to='socle.Knowledge')),
                ('students', models.ManyToManyField(blank=True, editable=False, related_name='questions', through='tool.Answerplayer', to='account.Student')),
            ],
        ),
        migrations.CreateModel(
            name='Slide',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=255, verbose_name='Titre')),
                ('content', ckeditor_uploader.fields.RichTextUploadingField(default='', verbose_name='Texte')),
                ('ranking', models.PositiveIntegerField(blank=True, default=0, editable=False, null=True)),
                ('duration', models.PositiveIntegerField(blank=True, default=0, verbose_name="Durée d'affichage")),
                ('is_publish', models.BooleanField(default=0, verbose_name='Publié ?')),
            ],
        ),
        migrations.CreateModel(
            name='Variable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=50, verbose_name='variable')),
                ('is_integer', models.BooleanField(default=1, verbose_name='Valeur entière ?')),
                ('maximum', models.IntegerField(default=10)),
                ('minimum', models.IntegerField(default=0)),
                ('words', models.CharField(blank=True, max_length=255, verbose_name='Liste de valeurs')),
                ('qrandom', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='variables', to='tool.Qrandom')),
            ],
        ),
        migrations.CreateModel(
            name='Videocopy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to=tool.models.videocopy_directory_path, verbose_name='Photo')),
                ('teacher', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='teacher_videocopy', to='account.Teacher')),
            ],
        ),
        migrations.CreateModel(
            name='VariableImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(default='', upload_to=tool.models.variable_directory_path, verbose_name='Image')),
                ('variable', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='variable_img', to='tool.Variable')),
            ],
        ),
        migrations.CreateModel(
            name='Tool',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, default='', max_length=255, verbose_name='Titre')),
                ('remark', ckeditor_uploader.fields.RichTextUploadingField(blank=True, verbose_name='Texte*')),
                ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
                ('date_modified', models.DateTimeField(auto_now=True, verbose_name='Date de modification')),
                ('imagefile', models.ImageField(default='', upload_to=tool.models.tool_directory_path, verbose_name='Image')),
                ('is_publish', models.BooleanField(default=1, verbose_name='Publié ?')),
                ('is_asso', models.BooleanField(default=1, verbose_name="Nécessite l'adhésion SACADO ?")),
                ('url', models.CharField(blank=True, default='', max_length=255, verbose_name='url de substitution')),
                ('teachers', models.ManyToManyField(blank=True, editable=False, related_name='tools', to='account.Teacher')),
            ],
        ),
        migrations.CreateModel(
            name='Quizz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, default=account.models.generate_code, max_length=100, unique=True, verbose_name='Code')),
                ('title', models.CharField(max_length=255, verbose_name='Titre du quizz')),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('vignette', models.ImageField(blank=True, default='', null=True, upload_to=tool.models.quizz_directory_path, verbose_name="Vignette d'accueil")),
                ('is_music', models.BooleanField(default=0, verbose_name='En musique ?')),
                ('is_share', models.BooleanField(default=0, verbose_name='Mutualisé ?')),
                ('is_publish', models.BooleanField(default=0, verbose_name='Publié ?')),
                ('is_questions', models.BooleanField(default=0, editable=False)),
                ('is_numeric', models.BooleanField(default=0, verbose_name='Type de réponse')),
                ('is_mark', models.BooleanField(default=0, verbose_name='Récupérer les réponses ?')),
                ('is_lock', models.BooleanField(default=0, verbose_name='Verrouiller ?')),
                ('is_random', models.BooleanField(default=0, verbose_name='Aléatoire ?')),
                ('nb_slide', models.PositiveIntegerField(default=0, editable=False)),
                ('is_video', models.BooleanField(default=0, verbose_name='Type de passation')),
                ('is_back', models.BooleanField(default=0, verbose_name='Retour arrière ?')),
                ('is_ranking', models.BooleanField(default=0, verbose_name='Ordre aléatoire des questions ?')),
                ('is_shuffle', models.BooleanField(default=0, verbose_name='Ordre aléatoire des réponses ?')),
                ('is_result', models.BooleanField(default=0, verbose_name='Réponse en fin de quizz ?')),
                ('interslide', models.PositiveIntegerField(blank=True, default=10, verbose_name='Temps entre les questions')),
                ('start', models.DateTimeField(blank=True, null=True, verbose_name='Début de publication')),
                ('stop', models.DateTimeField(blank=True, null=True, verbose_name='Verrouillé dès le')),
                ('groups', models.ManyToManyField(blank=True, related_name='quizz', to='group.Group')),
                ('levels', models.ManyToManyField(blank=True, related_name='quizz', to='socle.Level')),
                ('parcours', models.ManyToManyField(blank=True, related_name='quizz', to='qcm.Parcours')),
                ('qrandoms', models.ManyToManyField(blank=True, editable=False, related_name='quizz', to='tool.Qrandom')),
                ('questions', models.ManyToManyField(blank=True, editable=False, related_name='quizz', to='tool.Question')),
                ('subject', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='quizz', to='socle.Subject')),
                ('teacher', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='teacher_quizz', to='account.Teacher')),
                ('themes', models.ManyToManyField(blank=True, related_name='quizz', to='socle.Theme')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Generate_quizz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, default=account.models.generate_code, max_length=100, unique=True, verbose_name='Code')),
                ('date_created', models.DateTimeField(auto_now=True)),
                ('is_game', models.BooleanField(default=0, editable=False)),
                ('group', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='generate_quizz', to='group.Group')),
                ('quizz', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='generate_quizz', to='tool.Quizz')),
                ('students', models.ManyToManyField(blank=True, editable=False, related_name='gquizz', to='account.Student')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Generate_qr',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qr_text', models.TextField(editable=False)),
                ('ranking', models.PositiveIntegerField(default=1, editable=False)),
                ('gquizz', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='generate_qr', to='tool.Generate_quizz')),
                ('qrandom', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='generate_qr', to='tool.Qrandom')),
                ('students', models.ManyToManyField(blank=True, editable=False, related_name='generate_qr', through='tool.Answerplayer', to='account.Student')),
            ],
        ),
        migrations.CreateModel(
            name='Display_question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_id', models.PositiveIntegerField(default=0)),
                ('timestamp', models.DateTimeField(auto_now=True)),
                ('gquizz', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='display_questions', to='tool.Generate_quizz')),
                ('students', models.ManyToManyField(blank=True, editable=False, related_name='display_questions', to='account.Student')),
            ],
        ),
        migrations.CreateModel(
            name='Diaporama',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, default=account.models.generate_code, max_length=100, unique=True, verbose_name='Code')),
                ('title', models.CharField(max_length=255, verbose_name='Titre du quizz')),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('vignette', models.ImageField(blank=True, default='', null=True, upload_to=tool.models.quizz_directory_path, verbose_name="Vignette d'accueil")),
                ('is_share', models.BooleanField(default=0, verbose_name='Mutualisé ?')),
                ('is_publish', models.BooleanField(default=0, verbose_name='Publié ?')),
                ('groups', models.ManyToManyField(blank=True, editable=False, related_name='presentation', to='group.Group')),
                ('levels', models.ManyToManyField(blank=True, related_name='presentation', to='socle.Level')),
                ('slides', models.ManyToManyField(blank=True, editable=False, related_name='diapositive', to='tool.Slide')),
                ('students', models.ManyToManyField(blank=True, editable=False, related_name='user_presentation', to='account.Student')),
                ('subject', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='presentation', to='socle.Subject')),
                ('teacher', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='teacher_presentation', to='account.Teacher')),
                ('themes', models.ManyToManyField(blank=True, related_name='presentation', to='socle.Theme')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Choice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('imageanswer', models.ImageField(blank=True, default='', null=True, upload_to=tool.models.choice_directory_path, verbose_name='Image')),
                ('answer', models.TextField(blank=True, default='', max_length=255, null=True, verbose_name='Réponse écrite')),
                ('is_correct', models.BooleanField(default=0, verbose_name='Réponse correcte ?')),
                ('question', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='choices', to='tool.Question')),
            ],
        ),
        migrations.AddField(
            model_name='answerplayer',
            name='gquizz',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='answerplayer', to='tool.Generate_quizz'),
        ),
        migrations.AddField(
            model_name='answerplayer',
            name='qrandom',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='questions_player', to='tool.Generate_qr'),
        ),
        migrations.AddField(
            model_name='answerplayer',
            name='question',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='questions_player', to='tool.Question'),
        ),
        migrations.AddField(
            model_name='answerplayer',
            name='student',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='questions_player', to='account.Student'),
        ),
    ]
Exemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('group', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('account', '0001_initial'),
        ('socle', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, default='', max_length=50, verbose_name='Titre')),
                ('annoncement', ckeditor_uploader.fields.RichTextUploadingField(blank=True, verbose_name='Texte*')),
                ('duration', models.PositiveIntegerField(blank=True, default=15, verbose_name='Durée estimée de lecture')),
                ('is_publish', models.BooleanField(default=0, verbose_name='Publié ?')),
                ('publish_start', models.DateTimeField(blank=True, default=django.utils.timezone.now, help_text='Changer les dates des cours peut remplacer les réglages de leur durée de disponibilité et leur placement dans les pages de cours ou le tableau de bord. Veuillez confirmer les dates d’échéance avant de modifier les dates des cours. ', max_length=255, verbose_name='Début à')),
                ('publish_end', models.DateTimeField(blank=True, max_length=255, null=True, verbose_name='Se termine à')),
                ('ranking', models.PositiveIntegerField(blank=True, default=1, null=True, verbose_name='Ordre')),
                ('is_task', models.BooleanField(default=0, verbose_name='Tache à rendre ?')),
                ('is_paired', models.BooleanField(default=0, verbose_name='Elèves créateurs ?')),
                ('is_active', models.BooleanField(default=0, verbose_name='Contenu en cours')),
                ('is_share', models.BooleanField(default=0, verbose_name='Mutualisé ?')),
                ('date_limit', models.DateTimeField(blank=True, null=True, verbose_name='Date limite du rendu')),
                ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
                ('date_modified', models.DateTimeField(auto_now=True, verbose_name='Date de modification')),
                ('notification', models.BooleanField(default=0, help_text='Envoie un message aux participants.', verbose_name='Informer des modifications ?')),
                ('author', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='author_course', to='account.Teacher')),
                ('creators', models.ManyToManyField(blank=True, related_name='creators_course', to='account.Student', verbose_name='Co auteurs élève')),
            ],
        ),
        migrations.CreateModel(
            name='Customanswerbystudent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('file', models.FileField(blank=True, default='', null=True, upload_to=qcm.models.file_directory_student, verbose_name='Fichier pdf ou texte')),
                ('answer', ckeditor_uploader.fields.RichTextUploadingField(blank=True, default='', null=True)),
                ('comment', models.TextField(default='', null=True)),
                ('point', models.CharField(default='', max_length=10, verbose_name='Note')),
                ('is_corrected', models.BooleanField(default=0, editable=False)),
                ('audio', models.FileField(blank=True, default='', null=True, upload_to=qcm.models.file_folder_path, verbose_name='Commentaire audio')),
            ],
        ),
        migrations.CreateModel(
            name='Customexercise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, default=account.models.generate_code, max_length=100, unique=True, verbose_name='Code')),
                ('instruction', ckeditor_uploader.fields.RichTextUploadingField(verbose_name='Consigne*')),
                ('calculator', models.BooleanField(default=0, verbose_name='Calculatrice ?')),
                ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
                ('date_modified', models.DateTimeField(auto_now=True, verbose_name='Date de modification')),
                ('start', models.DateTimeField(blank=True, null=True, verbose_name='A partir de')),
                ('date_limit', models.DateTimeField(blank=True, null=True, verbose_name='Date limite du rendu')),
                ('lock', models.DateTimeField(blank=True, null=True, verbose_name='Verrouillé dès le')),
                ('imagefile', models.ImageField(blank=True, default='', upload_to=qcm.models.vignette_directory_path, verbose_name="Vignette d'accueil")),
                ('duration', models.PositiveIntegerField(blank=True, default=15, verbose_name='Durée (min.)')),
                ('is_share', models.BooleanField(default=0, verbose_name='Mutualisé ?')),
                ('is_realtime', models.BooleanField(default=0, verbose_name='Temps réel ?')),
                ('is_python', models.BooleanField(default=0, verbose_name='Python ?')),
                ('is_scratch', models.BooleanField(default=0, verbose_name='Scratch ?')),
                ('is_file', models.BooleanField(default=0, verbose_name='Fichier ?')),
                ('is_image', models.BooleanField(default=0, verbose_name='Image/Scan ?')),
                ('is_text', models.BooleanField(default=0, verbose_name='Texte ?')),
                ('is_mark', models.BooleanField(default=0, verbose_name='Notation ?')),
                ('mark', models.PositiveIntegerField(default=0, verbose_name='Sur ?')),
                ('is_publish', models.BooleanField(default=0, verbose_name='Publié ?')),
                ('ranking', models.PositiveIntegerField(blank=True, default=0, editable=False, null=True)),
                ('text_cor', ckeditor_uploader.fields.RichTextUploadingField(blank=True, null=True, verbose_name='Correction écrite')),
                ('file_cor', models.ImageField(blank=True, default='', upload_to=qcm.models.vignette_directory_path, verbose_name='Fichier de correction')),
                ('video_cor', models.CharField(blank=True, default='', max_length=100, verbose_name='Code de la vidéo Youtube')),
                ('is_publish_cor', models.BooleanField(default=0, verbose_name='Publié ?')),
                ('knowledges', models.ManyToManyField(blank=True, related_name='knowledge_customexercises', to='socle.Knowledge', verbose_name='Savoir faire évalués')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Exercise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ranking', models.PositiveIntegerField(blank=True, default=0, editable=False, null=True)),
                ('knowledge', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='exercises', to='socle.Knowledge', verbose_name='Savoir faire associé - Titre')),
                ('level', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='exercises', to='socle.Level', verbose_name='Niveau')),
            ],
        ),
        migrations.CreateModel(
            name='Mastering',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('consigne', models.CharField(blank=True, default='', max_length=255, verbose_name='Consigne')),
                ('video', models.CharField(blank=True, default='', max_length=50, verbose_name='code de vidéo Youtube')),
                ('mediation', models.FileField(blank=True, default='', null=True, upload_to=qcm.models.directory_path_mastering, verbose_name='Fichier')),
                ('writing', models.BooleanField(default=0, verbose_name="Page d'écriture")),
                ('duration', models.PositiveIntegerField(blank=True, default=15, verbose_name='Durée estimée')),
                ('scale', models.PositiveIntegerField(default=3, editable=False)),
                ('ranking', models.PositiveIntegerField(default=0, editable=False)),
                ('courses', models.ManyToManyField(blank=True, related_name='courses_mastering', to='qcm.Course')),
                ('exercise', models.ForeignKey(blank=True, default='', editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='exercise', to='qcm.Exercise')),
            ],
        ),
        migrations.CreateModel(
            name='Masteringcustom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('consigne', models.CharField(blank=True, default='', max_length=255, verbose_name='Consigne')),
                ('video', models.CharField(blank=True, default='', max_length=50, verbose_name='code de vidéo Youtube')),
                ('mediation', models.FileField(blank=True, default='', null=True, upload_to=qcm.models.directory_path_mastering, verbose_name='Fichier')),
                ('writing', models.BooleanField(default=0, verbose_name="Page d'écriture")),
                ('duration', models.PositiveIntegerField(blank=True, default=15, verbose_name='Durée estimée')),
                ('scale', models.PositiveIntegerField(default=3, editable=False)),
                ('ranking', models.PositiveIntegerField(default=0, editable=False)),
                ('courses', models.ManyToManyField(blank=True, related_name='courses_mastering_custom', to='qcm.Course')),
                ('customexercise', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='customexercise_mastering_custom', to='qcm.Customexercise', verbose_name='Exercice')),
                ('exercise', models.ForeignKey(blank=True, default='', editable=False, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='exercise_mastering_custom', to='qcm.Exercise')),
            ],
        ),
        migrations.CreateModel(
            name='Parcours',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, default=account.models.generate_code, max_length=100, unique=True, verbose_name='Code')),
                ('title', models.CharField(max_length=255, verbose_name='Titre')),
                ('color', models.CharField(default='#00819F', max_length=255, verbose_name='Couleur')),
                ('is_share', models.BooleanField(default=0, verbose_name='Mutualisé ?')),
                ('is_publish', models.BooleanField(default=0, verbose_name='Publié ?')),
                ('is_archive', models.BooleanField(default=0, editable=False, verbose_name='Archivé ?')),
                ('is_achievement', models.BooleanField(default=0, verbose_name='Avancement ?')),
                ('linked', models.BooleanField(default=0, editable=False)),
                ('is_favorite', models.BooleanField(default=1, verbose_name='Favori ?')),
                ('is_evaluation', models.BooleanField(default=0, editable=False)),
                ('is_next', models.BooleanField(default=0, verbose_name='Suivant ?')),
                ('is_exit', models.BooleanField(default=0, verbose_name='Retour aux exercices ?')),
                ('is_stop', models.BooleanField(default=0, verbose_name='Limité ?')),
                ('duration', models.PositiveIntegerField(blank=True, default=2, verbose_name='Temps de chargement (min.)')),
                ('start', models.DateTimeField(blank=True, null=True, verbose_name='A partir de')),
                ('stop', models.DateTimeField(blank=True, null=True, verbose_name='Verrouillage')),
                ('zoom', models.BooleanField(default=1, verbose_name='Zoom ?')),
                ('maxexo', models.IntegerField(blank=True, default=-1, null=True, verbose_name='Tentatives')),
                ('vignette', models.ImageField(blank=True, default='', upload_to=qcm.models.vignette_directory_path, verbose_name="Vignette d'accueil")),
                ('ranking', models.PositiveIntegerField(blank=True, default=0, editable=False, null=True)),
                ('is_leaf', models.BooleanField(default=0, verbose_name='Inclus dans un dossier ?')),
                ('is_folder', models.BooleanField(default=0, verbose_name='Dossier')),
                ('author', models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='author_parcours', to='account.Teacher', verbose_name='Auteur')),
                ('coteachers', models.ManyToManyField(blank=True, related_name='coteacher_parcours', to='account.Teacher', verbose_name='Enseignant en co-animation')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Relationship',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ranking', models.PositiveIntegerField(default=0, editable=False)),
                ('is_publish', models.BooleanField(default=1)),
                ('start', models.DateTimeField(blank=True, null=True, verbose_name='A partir de')),
                ('date_limit', models.DateTimeField(blank=True, null=True, verbose_name='Date limite du rendu')),
                ('is_evaluation', models.BooleanField(default=0)),
                ('duration', models.PositiveIntegerField(default=15, verbose_name='Durée estimée en minutes')),
                ('situation', models.PositiveIntegerField(default=10, help_text='Pour valider le qcm', verbose_name='Nombre minimal de situations')),
                ('beginner', models.TimeField(blank=True, null=True, verbose_name='Heure du début')),
                ('instruction', models.TextField(blank=True, editable=False, null=True)),
                ('maxexo', models.IntegerField(blank=True, default=-1, null=True, verbose_name='Nombre max de réalisation par exercice')),
                ('is_lock', models.BooleanField(default=0, verbose_name='Exercice cloturé ?')),
                ('is_mark', models.BooleanField(default=0, verbose_name='Notation ?')),
                ('mark', models.CharField(default='', max_length=3, verbose_name='Sur ?')),
                ('is_correction_visible', models.BooleanField(default=0, editable=False)),
                ('exercise', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='exercise_relationship', to='qcm.Exercise')),
                ('parcours', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='parcours_relationship', to='qcm.Parcours')),
                ('skills', models.ManyToManyField(blank=True, editable=False, related_name='skills_relationship', to='socle.Skill')),
                ('students', models.ManyToManyField(blank=True, editable=False, related_name='students_relationship', to='account.Student')),
            ],
            options={
                'unique_together': {('exercise', 'parcours')},
            },
        ),
        migrations.CreateModel(
            name='Writtenanswerbystudent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('imagefile', models.ImageField(blank=True, default='', null=True, upload_to=qcm.models.file_directory_student, verbose_name='Scan ou image ou Photo')),
                ('answer', ckeditor_uploader.fields.RichTextUploadingField(blank=True, default='', null=True)),
                ('comment', models.TextField(default='', editable=False, null=True)),
                ('audio', models.FileField(blank=True, default='', null=True, upload_to=qcm.models.file_directory_path, verbose_name='Commentaire audio')),
                ('point', models.CharField(default='', max_length=10, verbose_name='Note')),
                ('is_corrected', models.BooleanField(default=0, editable=False)),
                ('relationship', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='relationship_written_answer', to='qcm.Relationship')),
                ('student', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='student_written_answer', to='account.Student')),
            ],
        ),
        migrations.CreateModel(
            name='Tracker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('exercise_id', models.PositiveIntegerField(default=0, editable=False, null=True)),
                ('is_custom', models.BooleanField(blank=True, default=0)),
                ('parcours', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='tracker', to='qcm.Parcours')),
                ('user', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='tracker', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Supportfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=255, null=True, verbose_name='Titre')),
                ('annoncement', ckeditor_uploader.fields.RichTextUploadingField(verbose_name='Précision sur le savoir faire')),
                ('code', models.CharField(blank=True, default='', max_length=100, unique=True, verbose_name='Code*')),
                ('situation', models.PositiveIntegerField(default=10, help_text='Pour valider le qcm', verbose_name='Nombre minimal de situations')),
                ('calculator', models.BooleanField(default=0, verbose_name='Calculatrice ?')),
                ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
                ('date_modified', models.DateTimeField(auto_now=True, verbose_name='Date de modification')),
                ('width', models.PositiveIntegerField(default=750, verbose_name='Largeur')),
                ('height', models.PositiveIntegerField(default=550, verbose_name='Hauteur')),
                ('ggbfile', models.FileField(blank=True, default='', upload_to=qcm.models.quiz_directory_path, verbose_name='Fichier ggb')),
                ('imagefile', models.ImageField(default='', upload_to=qcm.models.image_directory_path, verbose_name="Vignette d'accueil")),
                ('toolBar', models.BooleanField(default=0, verbose_name='Barre des outils ?')),
                ('menuBar', models.BooleanField(default=0, verbose_name='Barre de menu ?')),
                ('algebraInput', models.BooleanField(default=0, verbose_name='Multi-fenêtres ?')),
                ('resetIcon', models.BooleanField(default=0, verbose_name='Bouton Reset ?')),
                ('dragZoom', models.BooleanField(default=0, verbose_name='Zoom/déplacement ?')),
                ('is_title', models.BooleanField(default=0, editable=False, verbose_name="titre pour l'organisation des parcours")),
                ('is_subtitle', models.BooleanField(default=0, verbose_name="sous-titre pour l'organisation des parcours")),
                ('attach_file', models.FileField(blank=True, default='', upload_to=qcm.models.file_attach_path, verbose_name='Fichier pdf attaché')),
                ('duration', models.PositiveIntegerField(blank=True, default=15, verbose_name='Durée estimée - en minutes')),
                ('is_ggbfile', models.BooleanField(default=1, verbose_name='Type de support')),
                ('is_python', models.BooleanField(default=0, verbose_name='Python ?')),
                ('is_scratch', models.BooleanField(default=0, verbose_name='Scratch ?')),
                ('is_file', models.BooleanField(default=0, verbose_name='Fichier ?')),
                ('is_image', models.BooleanField(default=0, verbose_name='Iage/Scan ?')),
                ('is_text', models.BooleanField(default=0, verbose_name='Texte ?')),
                ('correction', ckeditor_uploader.fields.RichTextUploadingField(blank=True, default='', null=True, verbose_name='Corrigé')),
                ('ranking', models.PositiveIntegerField(blank=True, default=0, editable=False, null=True)),
                ('author', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='supportfiles', to='account.Teacher')),
                ('knowledge', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='supportfiles', to='socle.Knowledge', verbose_name='Savoir faire associé')),
                ('level', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='supportfiles', to='socle.Level', verbose_name='Niveau')),
                ('skills', models.ManyToManyField(blank=True, related_name='skills_supportfile', to='socle.Skill', verbose_name='Compétences ciblées')),
                ('theme', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='supportfiles', to='socle.Theme', verbose_name='Thème')),
            ],
        ),
        migrations.CreateModel(
            name='Studentanswer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('point', models.PositiveIntegerField(default=0)),
                ('numexo', models.PositiveIntegerField(default=10)),
                ('date', models.DateTimeField(default=django.utils.timezone.now)),
                ('secondes', models.CharField(editable=False, max_length=255)),
                ('is_reading', models.BooleanField(default=0, editable=False)),
                ('exercise', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='ggbfile_studentanswer', to='qcm.Exercise')),
                ('parcours', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='qcm.Parcours')),
                ('student', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='answers', to='account.Student')),
            ],
        ),
        migrations.CreateModel(
            name='Resultggbskill',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('point', models.PositiveIntegerField(default=0)),
                ('relationship', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='relationship_resultggbskills', to='qcm.Relationship')),
                ('skill', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='skill_resultggbskills', to='socle.Skill')),
                ('student', models.ForeignKey(default='', editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='student_resultggbskills', to='account.Student')),
            ],
        ),
        migrations.CreateModel(
            name='Remediationcustom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, default='', max_length=255, verbose_name='Titre')),
                ('video', models.CharField(blank=True, default='', max_length=255, verbose_name='url de la vidéo')),
                ('mediation', models.FileField(blank=True, default='', upload_to=qcm.models.file_folder_path, verbose_name='Fichier')),
                ('audio', models.BooleanField(default=0, verbose_name='Audio texte ?')),
                ('duration', models.PositiveIntegerField(blank=True, default=15, verbose_name='Durée estimée (en min.)')),
                ('consigne', models.BooleanField(default=0, verbose_name='Consigne ?')),
                ('courses', models.ManyToManyField(blank=True, related_name='courses_remediationcustom', to='qcm.Course', verbose_name='Cours')),
                ('customexercise', models.ForeignKey(blank=True, default='', on_delete=django.db.models.deletion.CASCADE, related_name='customexercise_remediation', to='qcm.Customexercise')),
            ],
        ),
        migrations.CreateModel(
            name='Remediation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, default='', max_length=255, verbose_name='Titre')),
                ('video', models.CharField(blank=True, default='', max_length=255, verbose_name='url de la vidéo')),
                ('mediation', models.FileField(blank=True, default='', upload_to=qcm.models.file_directory_path, verbose_name='Fichier')),
                ('audio', models.BooleanField(default=0, verbose_name='Audio texte ?')),
                ('duration', models.PositiveIntegerField(blank=True, default=15, verbose_name='Durée estimée (en min.)')),
                ('consigne', models.BooleanField(default=0, verbose_name='Consigne ?')),
                ('courses', models.ManyToManyField(blank=True, related_name='courses_remediation', to='qcm.Course', verbose_name='Cours')),
                ('relationship', models.ForeignKey(blank=True, default='', on_delete=django.db.models.deletion.CASCADE, related_name='relationship_remediation', to='qcm.Relationship')),
            ],
        ),
        migrations.AddField(
            model_name='parcours',
            name='exercises',
            field=models.ManyToManyField(blank=True, related_name='exercises_parcours', through='qcm.Relationship', to='qcm.Exercise'),
        ),
        migrations.AddField(
            model_name='parcours',
            name='folder_parcours',
            field=models.ManyToManyField(blank=True, related_name='_parcours_folder_parcours_+', to='qcm.Parcours', verbose_name='Nom de parcours'),
        ),
        migrations.AddField(
            model_name='parcours',
            name='groups',
            field=models.ManyToManyField(blank=True, editable=False, related_name='group_parcours', to='group.Group'),
        ),
        migrations.AddField(
            model_name='parcours',
            name='leaf_parcours',
            field=models.ManyToManyField(blank=True, related_name='_parcours_leaf_parcours_+', to='qcm.Parcours', verbose_name='Nom du dossier'),
        ),
        migrations.AddField(
            model_name='parcours',
            name='level',
            field=models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='level_parcours', to='socle.Level'),
        ),
        migrations.AddField(
            model_name='parcours',
            name='students',
            field=models.ManyToManyField(blank=True, related_name='students_to_parcours', to='account.Student', verbose_name='Elèves'),
        ),
        migrations.AddField(
            model_name='parcours',
            name='subject',
            field=models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subject_parcours', to='socle.Subject', verbose_name='Enseignement'),
        ),
        migrations.AddField(
            model_name='parcours',
            name='teacher',
            field=models.ForeignKey(blank=True, default='', editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='teacher_parcours', to='account.Teacher'),
        ),
        migrations.CreateModel(
            name='Masteringcustom_done',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('writing', ckeditor_uploader.fields.RichTextUploadingField(blank=True, verbose_name='Texte*')),
                ('mastering', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='mastering_custom_done', to='qcm.Masteringcustom', verbose_name='Exercice')),
                ('student', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='students_mastering_custom_done', to='account.Student')),
            ],
        ),
        migrations.CreateModel(
            name='Mastering_done',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('writing', ckeditor_uploader.fields.RichTextUploadingField(blank=True, verbose_name='Texte*')),
                ('mastering', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='mastering_done', to='qcm.Mastering', verbose_name='Exercice')),
                ('student', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='students_mastering_done', to='account.Student')),
            ],
        ),
        migrations.AddField(
            model_name='mastering',
            name='relationship',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='relationship_mastering', to='qcm.Relationship', verbose_name='Exercice'),
        ),
        migrations.CreateModel(
            name='Generalcomment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField()),
                ('teacher', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='teacher_generalcomment', to='account.Teacher')),
            ],
        ),
        migrations.CreateModel(
            name='Exerciselocker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, default=account.models.generate_code, max_length=100, unique=True, verbose_name='Code')),
                ('custom', models.BooleanField(default=0, editable=False)),
                ('lock', models.DateTimeField(blank=True, editable=False, null=True)),
                ('customexercise', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='customexercise_exerciselocker', to='qcm.Customexercise')),
                ('relationship', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='relationship_exerciselocker', to='qcm.Relationship')),
                ('student', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='student_exerciselocker', to='account.Student')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='exercise',
            name='supportfile',
            field=models.ForeignKey(blank=True, default=1, on_delete=django.db.models.deletion.PROTECT, related_name='exercises', to='qcm.Supportfile', verbose_name='Fichier Géogebra'),
        ),
        migrations.AddField(
            model_name='exercise',
            name='theme',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='exercises', to='socle.Theme', verbose_name='Thème'),
        ),
        migrations.CreateModel(
            name='DocumentReport',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('document', models.CharField(editable=False, max_length=100)),
                ('document_id', models.PositiveIntegerField(default=3, editable=False)),
                ('report', ckeditor_uploader.fields.RichTextUploadingField(blank=True, default='RAS', verbose_name='Remarque*')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('is_done', models.BooleanField(default=0, verbose_name='Fait')),
                ('user', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='user_document_report', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Demand',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('demand', models.TextField(blank=True, verbose_name='Votre demande explicitée*')),
                ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Date de création')),
                ('file', models.FileField(blank=True, default='', null=True, upload_to=qcm.models.directory_path, verbose_name='Exercice souhaité')),
                ('done', models.BooleanField(blank=True, default=0, null=True, verbose_name='Fait')),
                ('code', models.CharField(blank=True, default='', max_length=10, null=True, verbose_name="id de l'exercice créé")),
                ('knowledge', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='demand', to='socle.Knowledge', verbose_name='Savoir faire associé - Titre')),
                ('level', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='demand', to='socle.Level', verbose_name='Niveau')),
                ('teacher', models.ForeignKey(default='', editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='demand', to='account.Teacher')),
                ('theme', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='demand', to='socle.Theme', verbose_name='Thème')),
            ],
        ),
        migrations.AddField(
            model_name='customexercise',
            name='parcourses',
            field=models.ManyToManyField(blank=True, related_name='parcours_customexercises', to='qcm.Parcours', verbose_name='Parcours attachés'),
        ),
        migrations.AddField(
            model_name='customexercise',
            name='skills',
            field=models.ManyToManyField(blank=True, related_name='skill_customexercises', to='socle.Skill', verbose_name='Compétences évaluées'),
        ),
        migrations.AddField(
            model_name='customexercise',
            name='students',
            field=models.ManyToManyField(blank=True, related_name='students_customexercises', to='account.Student'),
        ),
        migrations.AddField(
            model_name='customexercise',
            name='teacher',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='teacher_customexercises', to='account.Teacher'),
        ),
        migrations.CreateModel(
            name='Customanswerimage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('image', models.ImageField(blank=True, default='', null=True, upload_to=qcm.models.file_directory_to_student, verbose_name='Scan ou image ou Photo')),
                ('imagecanvas', models.TextField(blank=True, editable=False, null=True)),
                ('customanswerbystudent', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='customexercise_custom_answer_image', to='qcm.Customanswerbystudent')),
            ],
        ),
        migrations.AddField(
            model_name='customanswerbystudent',
            name='customexercise',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='customexercise_custom_answer', to='qcm.Customexercise'),
        ),
        migrations.AddField(
            model_name='customanswerbystudent',
            name='parcours',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='parcours_custom_answer', to='qcm.Parcours'),
        ),
        migrations.AddField(
            model_name='customanswerbystudent',
            name='student',
            field=models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='student_custom_answer', to='account.Student'),
        ),
        migrations.AddField(
            model_name='course',
            name='parcours',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='course', to='qcm.Parcours'),
        ),
        migrations.AddField(
            model_name='course',
            name='relationships',
            field=models.ManyToManyField(blank=True, related_name='relationships_courses', to='qcm.Relationship', verbose_name='Lier ce cours à'),
        ),
        migrations.AddField(
            model_name='course',
            name='students',
            field=models.ManyToManyField(blank=True, related_name='students_course', to='account.Student', verbose_name='Attribuer à/au'),
        ),
        migrations.AddField(
            model_name='course',
            name='teacher',
            field=models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='course', to='account.Teacher'),
        ),
        migrations.CreateModel(
            name='Constraint',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(default='', editable=False, max_length=8)),
                ('scoremin', models.PositiveIntegerField(default=80, editable=False)),
                ('relationship', models.ForeignKey(blank=True, default='', on_delete=django.db.models.deletion.CASCADE, related_name='relationship_constraint', to='qcm.Relationship')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField()),
                ('teacher', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='teacher_comment', to='account.Teacher')),
            ],
        ),
        migrations.CreateModel(
            name='Resultexercise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('point', models.PositiveIntegerField(default=0)),
                ('exercise', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='results_e', to='qcm.Exercise')),
                ('student', models.ForeignKey(default='', editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='results_e', to='account.Student')),
            ],
            options={
                'unique_together': {('student', 'exercise')},
            },
        ),
        migrations.AlterUniqueTogether(
            name='exercise',
            unique_together={('knowledge', 'supportfile')},
        ),
        migrations.AlterUniqueTogether(
            name='customanswerbystudent',
            unique_together={('student', 'parcours', 'customexercise')},
        ),
        migrations.CreateModel(
            name='Customannotation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('classe', models.CharField(editable=False, max_length=255)),
                ('style', models.CharField(editable=False, max_length=255)),
                ('attr_id', models.CharField(editable=False, max_length=255)),
                ('content', models.TextField(editable=False)),
                ('customanswerbystudent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='annotations', to='qcm.Customanswerbystudent')),
            ],
            options={
                'unique_together': {('customanswerbystudent', 'attr_id')},
            },
        ),
        migrations.CreateModel(
            name='Correctionskillcustomexercise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('point', models.PositiveIntegerField(default=-1, editable=False)),
                ('customexercise', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='customexercise_correctionskill', to='qcm.Customexercise')),
                ('parcours', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='parcours_customskill_answer', to='qcm.Parcours')),
                ('skill', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='skill_correctionskill', to='socle.Skill')),
                ('student', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='student_correctionskill', to='account.Student')),
            ],
            options={
                'unique_together': {('student', 'customexercise', 'skill')},
            },
        ),
        migrations.CreateModel(
            name='Correctionknowledgecustomexercise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('point', models.PositiveIntegerField(default=-1, editable=False)),
                ('customexercise', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='customexercise_correctionknowledge', to='qcm.Customexercise')),
                ('knowledge', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='knowledge_correctionknowledge', to='socle.Knowledge')),
                ('parcours', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='parcours_customknowledge_answer', to='qcm.Parcours')),
                ('student', models.ForeignKey(blank=True, editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='student_correctionknowledge', to='account.Student')),
            ],
            options={
                'unique_together': {('student', 'customexercise', 'knowledge')},
            },
        ),
        migrations.CreateModel(
            name='Annotation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('classe', models.CharField(editable=False, max_length=255)),
                ('style', models.CharField(editable=False, max_length=255)),
                ('attr_id', models.CharField(editable=False, max_length=255)),
                ('content', models.TextField(editable=False)),
                ('writtenanswerbystudent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='annotations', to='qcm.Writtenanswerbystudent')),
            ],
            options={
                'unique_together': {('writtenanswerbystudent', 'attr_id')},
            },
        ),
    ]
Exemplo n.º 7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('note_type',
                 models.PositiveIntegerField(choices=[
                     (1, answers.models.UpVotes
                      ), (2, messages.models.ConversationReplies),
                     (3, answers.models.Answer), (4,
                                                  questions.models.Question),
                     (5,
                      account.models.Reports), (6,
                                                answers.models.SuggestEdits),
                     (7, answers.models.Thanks), (8, comments.models.Comment),
                     (9, questions.models.AnswerRequest
                      ), (10, notifications.models.UserTurnedOnNotifications),
                     (11, notifications.models.TopicTurnedOnNotifications
                      ), (12, questions.models.QuestionFollowing
                          ), (13, account.models.UserFollowings)
                 ])),
                ('notification_id', models.PositiveIntegerField(default=1)),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('read_status', models.BooleanField(default=False)),
                ('actor',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='actor',
                                   to=settings.AUTH_USER_MODEL)),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='owner',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='TopicTurnedOnNotifications',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('subscriber',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name=
                     'notifications_topicturnedonnotifications_subscriber',
                     to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name=
                     'notifications_topicturnedonnotifications_topic',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserTurnedOnNotifications',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('subscriber',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name=
                     'notifications_userturnedonnotifications_subscriber',
                     to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name=
                     'notifications_userturnedonnotifications_user',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 8
0
class Migration(migrations.Migration):

    dependencies = [
        ('account', '0002_auto_20200818_1847'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='profile',
            name='user_name',
        ),
        migrations.AlterField(
            model_name='profile',
            name='civil_status',
            field=models.CharField(max_length=100,
                                   null=True,
                                   verbose_name='Civil Status'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='contact_number',
            field=phonenumber_field.modelfields.PhoneNumberField(
                max_length=128,
                null=True,
                region=None,
                verbose_name='Contact Number'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='current_work_affiliation',
            field=models.CharField(max_length=100,
                                   null=True,
                                   verbose_name='Current Work Affiliation'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='facebook_account',
            field=models.CharField(max_length=80,
                                   null=True,
                                   verbose_name='Facebook Account'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='host_family',
            field=models.CharField(max_length=100,
                                   null=True,
                                   verbose_name='Host Family'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='name_address_office_school',
            field=models.CharField(max_length=150,
                                   null=True,
                                   verbose_name='Name and Address of Office'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='permanent_address',
            field=models.CharField(max_length=150,
                                   null=True,
                                   verbose_name='Permanent Address'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='present_address',
            field=models.CharField(max_length=150,
                                   null=True,
                                   verbose_name='Present Address'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='pylp_batch',
            field=models.PositiveIntegerField(null=True,
                                              verbose_name='PYLP Batch'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='pylp_year',
            field=models.IntegerField(
                null=True,
                validators=[
                    django.core.validators.MinValueValidator(1984),
                    account.models.max_value_current_year
                ],
                verbose_name='PYLP Year'),
        ),
        migrations.AlterField(
            model_name='profile',
            name='telephone_number',
            field=phonenumber_field.modelfields.PhoneNumberField(
                max_length=128,
                null=True,
                region=None,
                verbose_name='Telephone Number'),
        ),
    ]
Exemplo n.º 9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('is_model', models.BooleanField(default=False)),
                ('is_company', models.BooleanField(default=False)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', account.models.CustomUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Gender',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('gender', models.CharField(max_length=10)),
                ('tags', models.CharField(max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Pcompany',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('company_name', models.CharField(max_length=50)),
                ('address', models.TextField()),
                ('contact_number', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Pmodel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('height', models.CharField(blank=True, max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('career_summary', models.TextField(blank=True)),
                ('weight', models.CharField(blank=True, max_length=50)),
                ('eye_color', models.CharField(blank=True, max_length=50)),
                ('age', models.PositiveIntegerField(blank=True, default=1)),
                ('model_image', models.ImageField(upload_to='Users/Model')),
                ('gender',
                 models.ForeignKey(default=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='account.Gender')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('email',
                 models.EmailField(max_length=254,
                                   verbose_name='email address')),
                ('no_social', models.BooleanField(blank=True, null=True)),
                ('total_scores', models.PositiveIntegerField(default=0)),
                ('rank',
                 models.CharField(choices=[('Academy Student', 'academy'),
                                           ('Genin', 'genin'),
                                           ('Chuunin', 'chuunin'),
                                           ('Jounin', 'jounin'),
                                           ('ANBU', 'anbu'),
                                           ('Sannin', 'sannin'),
                                           ('Kage', 'kage')],
                                  default='academy',
                                  max_length=40)),
                ('slug', models.SlugField(max_length=60,
                                          null=True,
                                          unique=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('avatar',
                 models.ImageField(upload_to=account.models.avatar_upload_to)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FeedbackModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('mail_subject', models.CharField(max_length=150)),
                ('mail_text', models.TextField()),
                ('send_time', models.DateTimeField(blank=True, null=True)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('forum', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BlockUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reason', models.TextField(blank=True, default='', null=True, verbose_name='Block reason')),
                ('till_date', models.DateTimeField(verbose_name='Block till')),
                ('unlimited', models.BooleanField(default=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'User Block',
                'verbose_name_plural': 'User Blocks',
            },
        ),
        migrations.CreateModel(
            name='NewUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code_creation_date', models.DateTimeField(default=datetime.datetime.now)),
                ('verification_key', models.CharField(default='', max_length=40, verbose_name='verification key')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'New user email',
                'verbose_name_plural': 'New user emails',
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('avatar', models.ImageField(blank=True, default='avatars/default.jpeg', max_length=255, null=True, upload_to=account.models._avatar_file_name, verbose_name='Avatar')),
                ('name', models.CharField(blank=True, max_length=15, null=True, verbose_name='Name')),
                ('nickname', models.CharField(blank=True, max_length=15, null=True, verbose_name='Nickname (Display name)')),
                ('phone', models.CharField(blank=True, max_length=15, null=True, verbose_name='Mobile phone')),
                ('city', models.CharField(blank=True, max_length=15, null=True, verbose_name='Current city')),
                ('country', models.CharField(blank=True, max_length=15, null=True, verbose_name='Current country')),
                ('university', models.CharField(blank=True, max_length=50, null=True, verbose_name='Graduated university')),
                ('current_work_place', models.CharField(blank=True, max_length=50, null=True, verbose_name='Current work place')),
                ('student_number', models.PositiveIntegerField(blank=True, null=True, verbose_name='Student number')),
                ('stars', models.PositiveIntegerField(default=0, verbose_name='Stars')),
                ('access_level', models.CharField(choices=[('N', 'New'), ('J', 'Rejected'), ('A', 'Accepted')], max_length=1, verbose_name='User access level')),
                ('university_field', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='forum.UniversityField', verbose_name='Field')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Profile',
                'verbose_name_plural': 'Profiles',
            },
        ),
    ]
Exemplo n.º 12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('deleted', models.BooleanField(default=False)),
                ('photo', models.ImageField(blank=True, height_field='height', null=True, upload_to=account.models.upload_location, width_field='width')),
                ('height', models.IntegerField(default=0)),
                ('width', models.IntegerField(default=0)),
                ('bio', models.TextField(blank=True, null=True)),
                ('dob', models.DateField(blank=True, null=True)),
                ('slug', models.SlugField(unique=True)),
                ('gender', models.PositiveIntegerField(choices=[(0, 'Not Known'), (1, 'Male'), (2, 'Female'), (9, 'Others')], default=0)),
                ('follower', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=255), blank=True, null=True, size=None)),
                ('following', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=255), blank=True, null=True, size=None)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('deleted', models.BooleanField(default=False)),
                ('content', models.TextField(blank=True, null=True)),
                ('receiver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Receiver', to='account.Author')),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Sender', to='account.Author')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('deleted', models.BooleanField(default=False)),
                ('content', models.TextField()),
                ('seen', models.BooleanField(default=False)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.Author')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Exemplo n.º 13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='BaseUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('username',
                 models.CharField(
                     error_messages={
                         'unique': 'A user with that username already exists.'
                     },
                     help_text=
                     'Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.',
                     max_length=150,
                     unique=True,
                     validators=[
                         django.contrib.auth.validators.
                         UnicodeUsernameValidator()
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('phone_number', models.IntegerField()),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('photo',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=account.models.upload_avatar)),
                ('money', models.PositiveIntegerField(blank=True, null=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]