Toggle new program progress page with waffle switch

ECOM-7389
This commit is contained in:
Matthew Piatetsky
2017-03-20 12:54:13 -04:00
parent 173e592203
commit d31a8a4dbc
2 changed files with 34 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
"""Learner dashboard views"""
import waffle
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import Http404
@@ -73,4 +74,7 @@ def program_details(request, program_uuid):
'user_preferences': get_user_preferences(request.user)
}
return render_to_response('learner_dashboard/program_details.html', context)
if waffle.switch_is_active('new_program_progress'):
return render_to_response('learner_dashboard/program_details_2017.html', context)
else:
return render_to_response('learner_dashboard/program_details.html', context)