@app_view
@require_POST
@permission_required([('Admin', '%'), ('Apps', 'Configure')])
def blocklist(request, addon):
 if (addon.status != mkt.STATUS_BLOCKED):
  addon.create_blocklisted_version()
  messages.success(request, _('Created blocklisted version.'))
 else:
  messages.info(request, _('App already blocklisted.'))
 return redirect(addon.get_dev_url('versions'))

@ app_view @ require_POST @ permission_required ( [ ( 'Admin' , '%' ) , ( 'Apps' , 'Configure' ) ] ) def blocklist ( request , addon ) : if ( addon . status != mkt . STATUS_BLOCKED ) : addon . create_blocklisted_version ( ) messages . success ( request , _ ( 'Created blocklisted version.' ) ) else : messages . info ( request , _ ( 'App already blocklisted.' ) ) return redirect ( addon . get_dev_url ( 'versions' ) )
blocklists the app by creating a new version/file .