readded Course model to admin

parent 61070961
...@@ -3,16 +3,14 @@ from django.contrib import admin ...@@ -3,16 +3,14 @@ from django.contrib import admin
# Register your models here. # Register your models here.
from .models import Assignment, Course from .models import Assignment, Course
#class CourseInline(admin.TabularInline): class CourseInline(admin.TabularInline):
# model = Course model = Course
class AssignmentAdmin(admin.ModelAdmin): class AssignmentAdmin(admin.ModelAdmin):
model = Assignment model = Assignment
search_fields = ('name', 'max_points',) search_fields = ('name', 'max_points',)
list_display = ('name', 'max_points', 'description', 'passing_score') list_display = ('name', 'max_points', 'description', 'passing_score')
list_filter = ('name', 'max_points',) list_filter = ('name', 'max_points',)
# inlines = [CourseInline,]
#admin.site.register(Course) admin.site.register(Course)
admin.site.register(Assignment, AssignmentAdmin) admin.site.register(Assignment, AssignmentAdmin)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment