From 2b87f1bccd940bde79b75512fdd6dade8f1c8c59 Mon Sep 17 00:00:00 2001
From: Nabila Fakhirah <nabilafakhirah@gmail.com>
Date: Sun, 6 Oct 2019 20:22:45 +0700
Subject: [PATCH] membuat models baru untuk deskripsi diri

---
 .../0014_student_self_description.py          | 20 +++++++++++++++++++
 core/models/accounts.py                       |  1 +
 2 files changed, 21 insertions(+)
 create mode 100644 core/migrations/0014_student_self_description.py

diff --git a/core/migrations/0014_student_self_description.py b/core/migrations/0014_student_self_description.py
new file mode 100644
index 00000000..4ab840c0
--- /dev/null
+++ b/core/migrations/0014_student_self_description.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.10.5 on 2019-10-06 12:13
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('core', '0013_auto_20170602_1130'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='student',
+            name='self_description',
+            field=models.CharField(blank=True, db_index=True, max_length=500, null=True),
+        ),
+    ]
diff --git a/core/models/accounts.py b/core/models/accounts.py
index 7361aa32..ed3acc66 100644
--- a/core/models/accounts.py
+++ b/core/models/accounts.py
@@ -64,6 +64,7 @@ class Student(models.Model):
     major = models.CharField(max_length=30, blank=True, null=True)
     batch = models.CharField(max_length=4, blank=True, null=True)
     show_transcript = models.BooleanField(default=False)
+    self_description = models.CharField(max_length=500, blank=True, db_index=True, null=True)
     photo = models.FileField(upload_to=get_student_photo_file_path, null=True, blank=True, validators=[validate_image_file_extension])
 
     @property
-- 
GitLab