Fixed #24055 -- Keep reference to view class for resolve()

https://code.djangoproject.com/ticket/24055
Changed both. Thanks.