diff --git a/src/adega/settings.py b/src/adega/settings.py index c24ec3370414cf4ca945fafdc003b3cba79374f8..a99567c382a09a7b29f5a419ebb2ca3f188d7a3b 100644 --- a/src/adega/settings.py +++ b/src/adega/settings.py @@ -81,10 +81,21 @@ WSGI_APPLICATION = 'adega.wsgi.application' # Database # https://docs.djangoproject.com/en/1.11/ref/settings/#databases +#DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.sqlite3', +# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), +# } +#} + DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'adega', + 'USER': 'adega', + 'PASSWORD': '123456', + 'HOST': 'localhost', + 'PORT': '', } } diff --git a/src/degree/models.py b/src/degree/models.py index 8f6c4178fea247fe8da3b32881d6a8e00eb47038..1c9ee1608c5d42635b041539b6e77b528d2c3bde 100644 --- a/src/degree/models.py +++ b/src/degree/models.py @@ -26,6 +26,19 @@ class CourseCurriculum(models.Model): period = models.PositiveIntegerField(null = True) type_course = models.CharField(max_length = 255) +class HistoryData(models.Model): + degree = models.ForeignKey(Degree) + student = models.ForeignKey(Student) + year = models.PositiveIntegerField(null = True, blank = True) + semester = models.PositiveIntegerField(null = True, blank = True) + situation = models.CharField(max_length=255) + letter = models.CharField(max_length=2) + course_code = models.CharField(max_length=5) + credits = models.PositiveIntegerField() + course_type = models.CharField(max_length=255) + frequency = models.FloatField() + #course = models.ForeignKey(Course) + class CourseCurriculumMongo(Document): start_year = fields.IntField() diff --git a/src/student/models.py b/src/student/models.py index 77db826ba0664e321810de10d4a42ec7bedb90e1..68d3ea8462b99d2fe8c437cf52ce1fd10f852bdb 100644 --- a/src/student/models.py +++ b/src/student/models.py @@ -14,6 +14,7 @@ class Student(models.Model): evasion_semester = models.PositiveIntegerField(null = True, blank = True) current_curriculum = models.ForeignKey(Curriculum) admission = models.ForeignKey(Admission) + admission_form = models.CharField(max_length=255) klasses = models.ManyToManyField('klass.Klass', through = 'klass.StudentKlass') def get_time_in_degree(self):