@ gladysbixy
models.py
{`
из импортных моделей django.db
class AdditionalExamGroups(models.Model):
id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, blank=True)
batch_id = models.IntegerField(null=True, blank=True)
exam_type = models.CharField(max_length=255, blank=True)
is_published = models.IntegerField(null=True, blank=True)
result_published = models.IntegerField(null=True, blank=True)
students_list = models.CharField(max_length=255, blank=True)
exam_date = models.DateField(null=True, blank=True)
class Meta:
db_table = u'additional_exam_groups'
class AdditionalExamScores(models.Model):
id = models.IntegerField(primary_key=True)
student_id = models.IntegerField(null=True, blank=True)
additional_exam_id = models.IntegerField(null=True, blank=True)
marks = models.DecimalField(null=True, max_digits=9, decimal_places=2, blank=True)
grading_level_id = models.IntegerField(null=True, blank=True)
remarks = models.CharField(max_length=255, blank=True)
is_failed = models.IntegerField(null=True, blank=True)
created_at = models.DateTimeField(null=True, blank=True)
updated_at = models.DateTimeField(null=True, blank=True)
class Meta:
db_table = u'additional_exam_scores'
class AdditionalExams(models.Model):
id = models.IntegerField(primary_key=True)
additional_exam_group_id = models.IntegerField(null=True, blank=True)
subject_id = models.IntegerField(null=True, blank=True)
start_time = models.DateTimeField(null=True, blank=True)
end_time = models.DateTimeField(null=True, blank=True)
maximum_marks = models.IntegerField(null=True, blank=True)
minimum_marks = models.IntegerField(null=True, blank=True)
grading_level_id = models.IntegerField(null=True, blank=True)
weightage = models.IntegerField(null=True, blank=True)
event_id = models.IntegerField(null=True, blank=True)
created_at = models.DateTimeField(null=True, blank=True)
updated_at = models.DateTimeField(null=True, blank=True)
class Meta:
db_table = u'additional_exams'
class AdditionalFields(models.Model):
id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=255, blank=True)
status = models.IntegerField(null=True, blank=True)
class Meta:
db_table = u'additional_fields'
class ApplyLeaves(models.Model):
id = models.IntegerField(primary_key=True)
employee_id = models.IntegerField(null=True, blank=True)
employee_leave_types_id = models.IntegerField(null=True, blank=True)
is_half_day = models.IntegerField(null=True, blank=True)
start_date = models.DateField(null=True, blank=True)
end_date = models.DateField(null=True, blank=True)
reason = models.CharField(max_length=255, blank=True)
approved = models.IntegerField(null=True, blank=True)
viewed_by_manager = models.IntegerField(null=True, blank=True)
manager_remark = models.CharField(max_length=255, blank=True)
class Meta:
db_table = u'apply_leaves'
class ArchivedEmployeeAdditionalDetails(models.Model):
id = models.IntegerField(primary_key=True)
employee_id = models.IntegerField(null=True, blank=True)
additional_field_id = models.IntegerField(null=True, blank=True)
additional_info = models.CharField(max_length=255, blank=True)
class Meta:
db_table = u'archived_employee_additional_details'
class ArchivedEmployeeBankDetails(models.Model):
id = models.IntegerField(primary_key=True)
employee_id = models.IntegerField(null=True, blank=True)
bank_field_id = models.IntegerField(null=True, blank=True)
bank_info = models.CharField(max_length=255, blank=True)
class Meta:
db_table = u'archived_employee_bank_details'
class Students(models.Model):
id = models.IntegerField(primary_key=True)
admission_no = models.CharField(max_length=255, blank=True)
class_roll_no = models.CharField(max_length=255, blank=True)
admission_date = models.DateField(null=True, blank=True)
first_name = models.CharField(max_length=255, blank=True)
middle_name = models.CharField(max_length=255, blank=True)
last_name = models.CharField(max_length=255, blank=True)
batch_id = models.IntegerField(null=True, blank=True)
date_of_birth = models.DateField(null=True, blank=True)
gender = models.CharField(max_length=255, blank=True)
blood_group = models.CharField(max_length=255, blank=True)
birth_place = models.CharField(max_length=255, blank=True)
nationality_id = models.IntegerField(null=True, blank=True)
language = models.CharField(max_length=255, blank=True)
religion = models.CharField(max_length=255, blank=True)
student_category_id = models.IntegerField(null=True, blank=True)
address_line1 = models.CharField(max_length=255, blank=True)
address_line2 = models.CharField(max_length=255, blank=True)
city = models.CharField(max_length=255, blank=True)
state = models.CharField(max_length=255, blank=True)
pin_code = models.CharField(max_length=255, blank=True)
country_id = models.IntegerField(null=True, blank=True)
phone1 = models.CharField(max_length=255, blank=True)
phone2 = models.CharField(max_length=255, blank=True)
email = models.CharField(max_length=255, blank=True)
immediate_contact_id = models.IntegerField(null=True, blank=True)
is_sms_enabled = models.IntegerField(null=True, blank=True)
photo_filename = models.CharField(max_length=255, blank=True)
photo_content_type = models.CharField(max_length=255, blank=True)
photo_data = models.TextField(blank=True)
status_description = models.CharField(max_length=255, blank=True)
is_active = models.IntegerField(null=True, blank=True)
is_deleted = models.IntegerField(null=True, blank=True)
created_at = models.DateTimeField(null=True, blank=True)
updated_at = models.DateTimeField(null=True, blank=True)
class Meta:
db_table = u'students'
class Users(models.Model):
id = models.IntegerField(primary_key=True)
username = models.CharField(max_length=255, blank=True)
first_name = models.CharField(max_length=255, blank=True)
last_name = models.CharField(max_length=255, blank=True)
email = models.CharField(max_length=255, blank=True)
admin = models.IntegerField(null=True, blank=True)
student = models.IntegerField(null=True, blank=True)
employee = models.IntegerField(null=True, blank=True)
hashed_password = models.CharField(max_length=255, blank=True)
salt = models.CharField(max_length=255, blank=True)
reset_password_code = models.CharField(max_length=255, blank=True)
reset_password_code_until = models.DateTimeField(null=True, blank=True)
created_at = models.DateTimeField(null=True, blank=True)
updated_at = models.DateTimeField(null=True, blank=True)
class Meta:
db_table = u'users'
}` Я пропустил множество таблиц, потому что им скучно отступать ...
`admin.py 'вы можете найти в предыдущем посте