Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Tinotenda Tariro Mhishi9,877 Points
Add the lookups method to your TopicListFilter. What am I getting wrong
Add the lookups method to your TopicListFilter. Remember that this method takes self, request, and model_admin as arguments, and that you need to return a tuple of tuples. need help please.
from django.contrib import admin from . import models class TextInline(admin.StackedInline): model = models.Text class QuizInline(admin.StackedInline): model = models.Quiz class AnswerInline(admin.StackedInline): model = models.Answer class TopicListFilter(admin.SimpleListFilter): title = 'topic' parameter_name = 'topic' def lookups(self, request, model_admin): return (('Python'),('Ruby')('Java')) class CourseAdmin(admin.ModelAdmin): inlines = [TextInline, QuizInline] list_filter = ['created_at', 'is_live'] admin.site.register(models.Course, CourseAdmin)