summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnccps2018/config.py2
-rw-r--r--website/admin.py21
-rw-r--r--website/migrations/0004_auto_20181012_0951.py (renamed from website/migrations/0004_auto_20181010_0942.py)2
3 files changed, 23 insertions, 2 deletions
diff --git a/nccps2018/config.py b/nccps2018/config.py
index aea66d7..726ad2f 100755
--- a/nccps2018/config.py
+++ b/nccps2018/config.py
@@ -1,6 +1,6 @@
DB_NAME_DEFAULT = 'nccps'
DB_USER_DEFAULT = 'root'
-DB_PASS_DEFAULT = 'aero123'
+DB_PASS_DEFAULT = 'user123'
DB_HOST_DEFAULT = '127.0.0.1'
DB_PORT_DEFAULT = ''
########################################
diff --git a/website/admin.py b/website/admin.py
index 8c38f3f..e244083 100644
--- a/website/admin.py
+++ b/website/admin.py
@@ -1,3 +1,24 @@
from django.contrib import admin
+from .models import( Profile,
+ AnswerPaper,
+ Question
+ )
+
+
+class ProfileAdmin(admin.ModelAdmin):
+ list_display = ['title','user', 'institute',
+ 'phone_number','position']
+
+
+class QuestionAdmin(admin.ModelAdmin):
+ list_display = ['question', 'correct_answer', 'question_day']
+
+
+class AnswerPaperAdmin(admin.ModelAdmin):
+ list_display = ['participant', 'answered_q', 'date']
+
# Register your models here.
+admin.site.register(Profile, ProfileAdmin)
+admin.site.register(AnswerPaper, AnswerPaperAdmin)
+admin.site.register(Question, QuestionAdmin) \ No newline at end of file
diff --git a/website/migrations/0004_auto_20181010_0942.py b/website/migrations/0004_auto_20181012_0951.py
index 7d3f607..162c38e 100644
--- a/website/migrations/0004_auto_20181010_0942.py
+++ b/website/migrations/0004_auto_20181012_0951.py
@@ -1,4 +1,4 @@
-# Generated by Django 2.1 on 2018-10-10 09:42
+# Generated by Django 2.1 on 2018-10-12 09:51
from django.db import migrations, models
import django.db.models.deletion