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

    initial = True

    dependencies = [
        ('accounts', '0001_initial'),
        ('course', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256, verbose_name='title')),
                ('description', models.TextField(blank=True, max_length=256, null=True, verbose_name='description')),
                ('deadline', models.DateTimeField(verbose_name='deadline')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('slug', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
                ('points', models.PositiveIntegerField(default=0, verbose_name='points')),
                ('course_offering', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='course.CourseOffering')),
            ],
            bases=(meta.models.ModelMeta, models.Model),
        ),
        migrations.CreateModel(
            name='AssignmentWork',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('submit_date', models.DateTimeField(blank=True, null=True, verbose_name='submit date')),
                ('submitted', models.BooleanField(default=False, verbose_name='submitted')),
                ('points', models.IntegerField(blank=True, default=-1, null=True, verbose_name='points')),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.Assignment')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.Student')),
            ],
        ),
        migrations.CreateModel(
            name='AssignmentWorkFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to=assignment.models.upload_work_path)),
                ('assignment_work', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='assignment.AssignmentWork')),
            ],
        ),
        migrations.CreateModel(
            name='AssignmentFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to=assignment.models.upload_path)),
                ('assignment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='assignment.Assignment')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='vsoln',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Assignment_Code', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Assignment_Code', models.CharField(max_length=10)),
                ('Grade',
                 models.CharField(choices=[('1', '1'), ('2', '2'), ('3', '3'),
                                           ('4', '4'), ('5', '5'), ('6', '6'),
                                           ('7', '7'), ('8', '8'), ('9', '9'),
                                           ('10', '10'), ('11', '11'),
                                           ('12', '12')],
                                  max_length=100)),
                ('Subject_Name',
                 models.CharField(choices=[
                     ('English', 'English'), ('Hindi', 'Hindi'),
                     ('Mathematics', 'Mathematics'), ('Physics', 'Physcis'),
                     ('Chemistry', 'Chemistry'),
                     ('Computer Science', 'Computer Science'),
                     ('Biology', 'Biology'), ('History', 'History'),
                     ('Geography', 'Geography'), ('Civics', 'Civics'),
                     ('Economics', 'Economics'),
                     ('Political Science', 'Political Science'),
                     ('Business Studies', 'Business Studies'),
                     ('Accountancy', 'Accountancy'), ('Sanskrit', 'Sanskrit'),
                     ('Social Studies', 'Social Studies'), ('EVS', ' EVS')
                 ],
                                  max_length=100)),
                ('Description', models.CharField(max_length=100)),
                ('Content',
                 models.FileField(upload_to=assignment.models.get_form_path)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('subject', '0008_remove_subject_waitinguserid'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('assignmentName', models.CharField(max_length=255)),
                ('assignmentDetail', models.TextField(null=True)),
                ('assignmentFile', models.FileField(blank=True, null=True, upload_to=assignment.models.get_file_path, verbose_name='파일')),
                ('assignmentFileName', models.CharField(max_length=64, null=True, verbose_name='첨부파일명')),
                ('assignmentUpdateDate', models.DateTimeField(auto_now_add=True)),
                ('assignmentDueDate', models.DateTimeField()),
                ('subjectId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subject.subject')),
            ],
            options={
                'db_table': 'Assignment',
            },
        ),
        migrations.CreateModel(
            name='Submit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('submitUpdateDate', models.DateTimeField(auto_now_add=True)),
                ('submitDetail', models.TextField(null=True)),
                ('submitFile', models.FileField(blank=True, null=True, upload_to=assignment.models.get_file_path, verbose_name='파일')),
                ('submitFileName', models.CharField(max_length=64, null=True, verbose_name='첨부파일명')),
                ('assignmentId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assignment.assignment')),
                ('submitUserId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'Submit',
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='User',
            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')),
                ('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_student', models.BooleanField(default=False)),
                ('is_teacher', models.BooleanField(default=False)),
                ('is_admin', models.BooleanField(default=False)),
                ('email', models.EmailField(max_length=100)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='AnswerRemark',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('Remarks',
                 models.TextField(default='No remarks added!',
                                  null=True,
                                  verbose_name='Remarks')),
            ],
        ),
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=225)),
                ('submission_date',
                 models.DateField(verbose_name='Submission Date')),
                ('date_added', models.DateField(auto_now_add=True)),
                ('question',
                 models.FileField(upload_to=assignment.models.Assignment.
                                  user_directory_path)),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('roll_no', models.PositiveIntegerField(unique=True)),
                ('sem',
                 models.PositiveIntegerField(default=5,
                                             verbose_name='Semister')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='StudentAnswer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('question',
                 models.FileField(upload_to=assignment.models.StudentAnswer.
                                  user_directory_path)),
                ('submitted_date',
                 models.DateField(auto_now_add=True, null=True)),
                ('assignment',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='assignment.assignment')),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='assignment_answers',
                                   to='assignment.student')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id',
                 models.CharField(default=assignment.models._createId,
                                  max_length=200,
                                  primary_key=True,
                                  serialize=False)),
                ('pdf_file', models.FileField(upload_to='activity/')),
                ('index', models.CharField(max_length=200)),
                ('status', models.CharField(max_length=200)),
                ('header',
                 models.CharField(choices=[('graded', 'graded'),
                                           ('ungraded', 'ungraded')],
                                  max_length=50)),
                ('q_number', models.IntegerField()),
                ('activity', models.CharField(max_length=200)),
                ('file_name', models.CharField(max_length=200)),
                ('date_submitted',
                 models.DateTimeField(
                     default=assignment.utils.Utils.get_date_time)),
                ('date_created',
                 models.DateTimeField(
                     default=assignment.utils.Utils.get_date_time)),
                ('course', models.CharField(max_length=200)),
            ],
            options={
                'ordering': ['-date_submitted'],
            },
        ),
        migrations.CreateModel(
            name='SelectCourse',
            fields=[
                ('id',
                 models.CharField(default=assignment.models._createId,
                                  max_length=200,
                                  primary_key=True,
                                  serialize=False)),
                ('courses',
                 models.CharField(max_length=200, verbose_name='Course name')),
                ('choose_back_color',
                 models.CharField(default='black',
                                  max_length=200,
                                  verbose_name='Course background')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('sem', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Semester',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('sem',
                 models.CharField(choices=[('', 'select semester'),
                                           ('semester one', 'SEMESTER ONE'),
                                           ('semester two', 'SEMESTER TWO')],
                                  max_length=100,
                                  verbose_name='semester')),
            ],
        ),
        migrations.CreateModel(
            name='StudentOtherCourse',
            fields=[
                ('id',
                 models.CharField(default=assignment.models._createId,
                                  max_length=200,
                                  primary_key=True,
                                  serialize=False)),
                ('choose_course', models.CharField(max_length=200)),
                ('selectcourse',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='assignment.selectcourse')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UploadedFile',
            fields=[
                ('id',
                 models.CharField(default=assignment.models._createId,
                                  max_length=200,
                                  primary_key=True,
                                  serialize=False)),
                ('pdf_file', models.FileField(upload_to='activity/')),
                ('file_name', models.CharField(max_length=200)),
                ('date_created',
                 models.DateTimeField(
                     default=assignment.utils.Utils.get_date_time)),
                ('course', models.CharField(max_length=200)),
                ('submission_date',
                 models.DateField(
                     default=assignment.utils.Utils.get_date_time)),
                ('attach_info', models.TextField(blank=True)),
                ('selectcourse',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='assignment.selectcourse')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='StudentResult',
            fields=[
                ('id',
                 models.CharField(default=assignment.models._createId,
                                  max_length=200,
                                  primary_key=True,
                                  serialize=False)),
                ('q_number', models.IntegerField()),
                ('title',
                 models.CharField(choices=[('', 'select activity'),
                                           ('Assignments', 'Assignments'),
                                           ('Exercises', 'Exercises'),
                                           ('Quizzes', 'Quizzes')],
                                  max_length=50)),
                ('status',
                 models.CharField(choices=[('', 'select status'),
                                           ('graded', 'graded'),
                                           ('not graded', 'not graded')],
                                  max_length=50)),
                ('scored', models.FloatField(verbose_name='score')),
                ('total', models.FloatField()),
                ('course', models.CharField(max_length=200)),
                ('marker', models.CharField(max_length=200)),
                ('date_graded',
                 models.DateField(default=assignment.utils.Utils.get_date)),
                ('date_graded1',
                 models.DateTimeField(
                     default=assignment.utils.Utils.get_date_time)),
                ('assignment',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='assignment.assignment')),
                ('studentothercourse',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='assignment.studentothercourse')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['title'],
            },
        ),
        migrations.AddField(
            model_name='selectcourse',
            name='semester',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='assignment.semester'),
        ),
        migrations.AddField(
            model_name='selectcourse',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='RegisterCourse',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('course',
                 models.CharField(choices=[
                     ('', 'Select a course'),
                     ('Integral Equations', 'Integral Equations'),
                     ('Real Functions', 'Real Functions')
                 ],
                                  max_length=100)),
                ('class_or_level',
                 models.CharField(choices=[('', 'Select class'),
                                           ('Math1', 'Math 1'),
                                           ('Math2', 'Math 2'),
                                           ('Math3', 'Math 3'),
                                           ('Math4', 'Math 4')],
                                  max_length=100)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('photo', models.ImageField(upload_to='images/')),
                ('attachment', models.FileField(upload_to='attachments/')),
                ('phone', models.CharField(max_length=10)),
                ('user',
                 models.OneToOneField(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ChooseActivity',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('activity', models.CharField(max_length=200)),
                ('index', models.CharField(max_length=200)),
                ('course', models.CharField(max_length=200)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='assignment',
            name='chooseactivity',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='assignment.chooseactivity'),
        ),
        migrations.AddField(
            model_name='assignment',
            name='studentothercourse',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='assignment.studentothercourse'),
        ),
        migrations.AddField(
            model_name='assignment',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]