class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='AttendanceLab',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateField()),
                ('from_time', models.TimeField()),
                ('to_time', models.TimeField()),
                ('lab', models.CharField(max_length=10)),
                ('batch', models.CharField(max_length=5)),
                ('year', models.CharField(max_length=3)),
                ('attendance',
                 djongo.models.fields.ArrayModelField(
                     model_container=attendance.models.Attendance)),
            ],
        ),
        migrations.CreateModel(
            name='AttendanceSubject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateField()),
                ('from_time', models.TimeField()),
                ('to_time', models.TimeField()),
                ('subject', models.CharField(max_length=10)),
                ('division', models.CharField(max_length=5)),
                ('year', models.CharField(max_length=3)),
                ('slots', models.IntegerField()),
                ('attendance',
                 djongo.models.fields.ArrayModelField(
                     model_container=attendance.models.Attendance)),
            ],
        ),
    ]
Esempio n. 2
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('attendance', '0002_auto_20190410_1056'),
    ]

    operations = [
        migrations.CreateModel(
            name='Students',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dates', models.DateTimeField(verbose_name=django.utils.timezone.now)),
            ],
        ),
        migrations.RemoveField(
            model_name='attendance',
            name='dates',
        ),
        migrations.RemoveField(
            model_name='attendance',
            name='students',
        ),
        migrations.AddField(
            model_name='attendance',
            name='begin_dates',
            field=models.DateTimeField(default=django.utils.timezone.now),
        ),
        migrations.AddField(
            model_name='attendance',
            name='end_dates',
            field=models.DateTimeField(default=attendance.models.future),
        ),
        migrations.AddField(
            model_name='attendance',
            name='key',
            field=models.CharField(default=' ', max_length=50),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='students',
            name='attendance',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='attendance.Attendance'),
        ),
        migrations.AddField(
            model_name='students',
            name='students',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
Esempio n. 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Bind',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.GenericIPAddressField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='GeneralHoliday',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('holiday', models.DateField(default=attendance.models.today_date)),
            ],
        ),
        migrations.CreateModel(
            name='Attendance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField(default='')),
                ('ip', models.GenericIPAddressField(default='')),
                ('date_today', models.DateField(default=attendance.models.today_date, verbose_name='Date')),
                ('created_at', models.DateTimeField(default=attendance.models.time_stamp)),
                ('created_by', models.CharField(default='', max_length=20)),
            ],
            options={
                'unique_together': {('created_by', 'date_today')},
            },
        ),
    ]
Esempio n. 4
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Faculty',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('last_name',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('profile_img',
                 models.ImageField(
                     blank=True,
                     default='/attendance/static/img/dummy.png',
                     null=True,
                     upload_to=attendance.models.upload_in_profiles)),
                ('about_me',
                 models.CharField(blank=True, max_length=150, null=True)),
                ('contact', models.IntegerField(blank=True, null=True)),
                ('positive_reviews',
                 models.IntegerField(blank=True, default=0, null=True)),
                ('neutral_reviews',
                 models.IntegerField(blank=True, default=0, null=True)),
                ('negative_reviews',
                 models.IntegerField(blank=True, default=0, null=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'faculty',
            },
        ),
    ]
Esempio n. 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Classroom',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(choices=[('9 Boys Section 1', 'Class 9'),
                                           ('10 Boys Section 1', 'Class 10'),
                                           ('10 Boys Section 2', 'Class 10'),
                                           ('11 Boys Section 1', 'Class 11'),
                                           ('11 Boys Section 2', 'Class 11'),
                                           ('12 Boys Section 1', 'Class 12'),
                                           ('12 Boys Section 2', 'Class 12')],
                                  max_length=50)),
                ('section', models.CharField(max_length=50)),
                ('type',
                 models.CharField(choices=[('Class 9', 'Class 9'),
                                           ('Class 10', 'Class 10'),
                                           ('Class 11', 'Class 11'),
                                           ('Class 12', 'Class 12')],
                                  max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name', models.CharField(max_length=20)),
                ('last_name', models.CharField(max_length=20)),
            ],
            bases=(attendance.models.NamableModel, models.Model),
        ),
        migrations.CreateModel(
            name='Teacher22',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name', models.CharField(max_length=20)),
                ('last_name', models.CharField(max_length=20)),
            ],
            bases=(attendance.models.NamableModel, models.Model),
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name', models.CharField(max_length=20)),
                ('last_name', models.CharField(max_length=20)),
                ('classroom',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='attendance.Classroom')),
            ],
            options={
                'unique_together': {('first_name', 'last_name')},
            },
            bases=(attendance.models.NamableModel, models.Model),
        ),
        migrations.CreateModel(
            name='Attendance',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('date',
                 models.DateField(default=models.DateTimeField(
                     auto_now_add=True))),
                ('classroom',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='attendance.Classroom')),
                ('students',
                 models.ManyToManyField(related_name='attendances',
                                        to='attendance.Student')),
                ('teacher',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='attendance.Teacher')),
            ],
        ),
    ]
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')),
                ('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_student', models.BooleanField(default=False)),
                ('is_teacher', 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', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Week',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('month',
                 models.CharField(choices=[('January', 'Jan'),
                                           ('February', 'Feb'),
                                           ('March', 'Mar'), ('April', 'Apr'),
                                           ('May', 'May'), ('June', 'Jun'),
                                           ('July', 'Jul'), ('August', 'Aug'),
                                           ('September', 'Sep'),
                                           ('October', 'Oct'),
                                           ('November', 'Nov'),
                                           ('December', 'Dec')],
                                  max_length=100)),
                ('starting_date',
                 models.DateField(default=datetime.datetime.now)),
                ('year',
                 models.DateTimeField(default=attendance.models.get_year)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('user',
                 models.OneToOneField(
                     default=1,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Attendance',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('month',
                 models.CharField(choices=[('January', 'Jan'),
                                           ('February', 'Feb'),
                                           ('March', 'Mar'), ('April', 'Apr'),
                                           ('May', 'May'), ('June', 'Jun'),
                                           ('July', 'Jul'), ('August', 'Aug'),
                                           ('September', 'Sep'),
                                           ('October', 'Oct'),
                                           ('November', 'Nov'),
                                           ('December', 'Dec')],
                                  max_length=100)),
                ('year',
                 models.DateTimeField(default=attendance.models.get_year)),
                ('starting_date',
                 models.DateField(default=datetime.datetime.now)),
                ('monday',
                 models.CharField(choices=[('Present', 'P'), ('Absent', 'A')],
                                  default='P',
                                  max_length=10)),
                ('tuesday',
                 models.CharField(choices=[('Present', 'P'), ('Absent', 'A')],
                                  default='P',
                                  max_length=10)),
                ('wednesday',
                 models.CharField(choices=[('Present', 'P'), ('Absent', 'A')],
                                  default='P',
                                  max_length=10)),
                ('thursday',
                 models.CharField(choices=[('Present', 'P'), ('Absent', 'A')],
                                  default='P',
                                  max_length=10)),
                ('friday',
                 models.CharField(choices=[('Present', 'P'), ('Absent', 'A')],
                                  default='P',
                                  max_length=10)),
                ('saturday',
                 models.CharField(choices=[('Present', 'P'), ('Absent', 'A')],
                                  default='P',
                                  max_length=10)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='attendance.Student')),
            ],
        ),
    ]
Esempio n. 7
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Attendance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('faculty_name', models.CharField(blank=True, max_length=2000, null=True)),
                ('rollnumber', models.TextField(blank=True, max_length=200, null=True)),
                ('date', models.DateField(auto_now_add=True, null=True)),
                ('time', models.TimeField(auto_now_add=True, null=True)),
                ('year', models.CharField(choices=[('1', '1'), ('2', '2'), ('3', '3')], max_length=200, null=True)),
                ('shift', models.CharField(choices=[('1', '1'), ('2', '2')], max_length=200, null=True)),
                ('lecture_number', models.CharField(max_length=200, null=True)),
                ('status', models.CharField(choices=[('Present', 'Present'), ('Absent', 'Absent')], default='Absent', max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Faculty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('firstname', models.CharField(blank=True, max_length=200, null=True)),
                ('lastname', models.CharField(blank=True, max_length=200, null=True)),
                ('username', models.CharField(blank=True, max_length=200, null=True)),
                ('assigned_subjects', models.TextField(blank=True, default=['None'], null=True)),
                ('email', models.CharField(max_length=200, null=True)),
                ('password', models.CharField(max_length=200, null=True)),
                ('profile_pic', models.ImageField(blank=True, null=True, upload_to=attendance.models.user_dir_path)),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('firstname', models.CharField(blank=True, max_length=200, null=True)),
                ('lastname', models.CharField(blank=True, max_length=200, null=True)),
                ('rollNumber', models.CharField(max_length=200, primary_key=True, serialize=False)),
                ('phoneNumber', models.CharField(max_length=200, null=True)),
                ('email', models.CharField(max_length=200, null=True)),
                ('gender', models.CharField(choices=[('MALE', 'MALE'), ('FEMALE', 'FEMALE')], max_length=100, null=True)),
                ('year', models.CharField(choices=[('1', '1'), ('2', '2'), ('3', '3')], max_length=100, null=True)),
                ('shift', models.CharField(choices=[('1', '1'), ('2', '2')], max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('subject_code', models.CharField(blank=True, choices=[('310901', '310901'), ('310902', '310902'), ('310903', '310903'), ('310904', '310904'), ('310905', '310905'), ('310906', '310906'), ('310907', '310907'), ('310908', '310908'), ('310909', '310909'), ('310910', '310910'), ('310911', '310911'), ('310912', '310912'), ('310913', '310913'), ('310914', '310914'), ('310915', '310915'), ('310916', '310916'), ('410901', '410901'), ('410902', '410902'), ('410903', '410903'), ('410904', '410904'), ('410905', '410905'), ('410906', '410906'), ('410907', '410907'), ('410908', '410908'), ('410909', '410909'), ('410910', '410910'), ('410911', '410911'), ('410912', '410912'), ('410913', '410913'), ('410914', '410914'), ('410915', '410915'), ('410916', '410916'), ('510901', '510901'), ('510902', '510902'), ('510903', '510903'), ('510904', '510904'), ('510905', '510905'), ('510906', '510906'), ('510907', '510907')], max_length=200, primary_key=True, serialize=False)),
                ('subject_name', models.CharField(choices=[('C and C++ Programming', 'C and C++ Programming'), ('Computer Organization', 'Computer Organization'), ('Principles of Programming Practices', 'Principles of Programming Practices'), ('Discrete Mathematics', 'Discrete Mathematics'), ('Probability & Statistics', 'Probability & Statistics'), ('Business Communications', 'Business Communications'), ('C & C++ Laboratory', 'C & C++ Laboratory'), ('Open Source Tools Laboratory', 'Open Source Tools Laboratory'), ('Java Programming', 'Java Programming'), ('Data Structures using C', 'Data Structures using C'), ('Web Technologies', 'Web Technologies'), ('System Analysis & Design', 'System Analysis & Design'), ('Management Theory & Practices', 'Management Theory & Practices'), ('Web Technologies Laboratory', 'Web Technologies Laboratory'), ('Java Programming Laboratory', 'Java Programming Laboratory'), ('Data Structures Laboratory', 'Data Structures Laboratory'), ('Advanced Java', 'Advanced Java'), ('DBMS', 'DBMS'), ('Operating Systems', 'Operating Systems'), ('OOAD', 'OOAD'), ('Operations Research', 'Operations Research'), ('HBASE Lab', 'HBASE Lab'), ('Advance Java Lab', 'Advance Java Lab'), ('UML Lab – umbrello', 'UML Lab – umbrello'), ('Advanced Web Technology', 'Advanced Web Technology'), ('Banking and FAM', 'Banking and FAM'), ('CN & Information Security', 'CN & Information Security'), ('Elective I ', 'Elective I '), ('Adv DBMS', 'Adv DBMS'), ('WT Lab', 'WT Lab'), ('Advance DBMS Lab', 'Advance DBMS Lab'), ('Network & Security Lab', 'Network & Security Lab'), ('Recent Technologies in IT', 'Recent Technologies in IT'), ('Software Testing and Quality Assurance', 'Software Testing and Quality Assurance'), ('Software Engineering', 'Software Engineering'), ('Data warehousing, data mining and BI', 'Data warehousing, data mining and BI'), ('Elective - II', 'Elective - II'), ('RTIT Lab', 'RTIT Lab'), ('STQA Lab', 'STQA Lab')], max_length=200, null=True)),
                ('semester', models.CharField(blank=True, choices=[('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')], max_length=200, null=True)),
                ('year', models.CharField(blank=True, choices=[('1', '1'), ('2', '2'), ('3', '3')], max_length=200, null=True)),
                ('type', models.CharField(blank=True, choices=[('Lecture', 'Lecture'), ('Practical', 'Practical'), ('Guest', 'Guest')], max_length=200, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Lecture',
            fields=[
                ('lecture_number', models.IntegerField(default=attendance.models.Lecture.increment_lecture_number, primary_key=True, serialize=False)),
                ('tfrom', models.TimeField(blank=True, null=True)),
                ('tto', models.TimeField(blank=True, null=True)),
                ('dt', models.DateField(blank=True, null=True)),
                ('year', models.CharField(blank=True, max_length=200, null=True)),
                ('shift', models.CharField(blank=True, max_length=200, null=True)),
                ('subject', models.CharField(blank=True, max_length=200, null=True)),
                ('faculty', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='attendance.faculty')),
            ],
        ),
    ]
Esempio n. 8
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='EventGroup',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('needed_credits',
                 models.IntegerField(
                     default=0,
                     validators=[attendance.models.validate_not_negative])),
                ('senior_credits',
                 models.IntegerField(
                     default=0,
                     validators=[attendance.models.validate_not_negative])),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('isbrother', models.BooleanField(default=0)),
                ('isexec', models.BooleanField(default=0)),
                ('isloa', models.BooleanField(default=0)),
                ('issenior', models.BooleanField(default=0)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('credits', models.IntegerField(default=1)),
                ('date', models.DateField(default=datetime.datetime.now)),
                ('group',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='attendance.EventGroup')),
            ],
        ),
        migrations.CreateModel(
            name='Signin',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('time',
                 models.DateTimeField(blank=True,
                                      default=datetime.datetime.now,
                                      null=True)),
                ('comment',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('event',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='attendance.Event')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('event', 'user')},
            },
        ),
    ]