<s> from __future__ import absolute_import <EOL> from django . core . urlresolvers import reverse <EOL> from sentry . plugins import plugins <EOL> from sentry . web . frontend . base import ProjectView <EOL> class ProjectPluginResetView ( ProjectView ) : <EOL> required_scope = '<STR_LIT>' <EOL> def post ( self , request , organization , team , project , slug ) : <EOL> try : <EOL> plugin = plugins . get ( slug ) <EOL> except KeyError : <EOL> return self . redirect ( reverse ( '<STR_LIT>' , args = [ project . organization . slug , project . slug , slug ] ) ) <EOL> if not plugin . is_enabled ( project ) : <EOL> return self . redirect ( reverse ( '<STR_LIT>' , args = [ project . organization . slug , project . slug , slug ] ) ) <EOL> plugin . reset_options ( project = project ) <EOL> return self . redirect ( reverse ( '<STR_LIT>' , args = [ project . organization . slug , project . slug , slug ] ) ) </s>
