User Tours are walkthroughs we are able to give in our frontends. This sets up the backend support for them by creating the model, setting up the initial backfill, adds in a signal handler to init the UserTour model on User creation, and sets up some endpoints to get user tour information and update it. It is also being initialized with a waffle flag to control the rollout. The flag is intended to control all tours and not allow for opting into only some tours.
14 lines
377 B
Python
14 lines
377 B
Python
""" Django admin for User Tours. """
|
|
|
|
from django.contrib import admin
|
|
|
|
from lms.djangoapps.user_tours.models import UserTour
|
|
|
|
|
|
@admin.register(UserTour)
|
|
class UserTourAdmin(admin.ModelAdmin):
|
|
""" Admin for UserTour. """
|
|
list_display = ('user', 'course_home_tour_status', 'show_courseware_tour',)
|
|
readonly_fields = ('user',)
|
|
search_fields = ('user__username',)
|