Merge pull request #349 from wraithan/remove_unused_blocklist_view
remove view that was added for testing redis
This commit is contained in:
Коммит
19f9ab72a7
|
@ -1,36 +0,0 @@
|
|||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block title %}{{ page_title('Add-on Name Blocklist') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Add-on Name Blocklist</h2>
|
||||
|
||||
{% if request.GET.addon %}
|
||||
<div>
|
||||
<b>{{ request.GET.addon }}</b>:
|
||||
{% if addon %}
|
||||
<ul>
|
||||
<li><a href="{{ addon.get_url_path() }}">{{ addon.name }}</a></li>
|
||||
<li>{{ addon.id }}</li>
|
||||
<li>Status: {{ amo.STATUS_CHOICES[addon.status] }}</li>
|
||||
<li>Disabled: {{ addon.disabled_by_user }}</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
Nothing matched.
|
||||
{% endif %}
|
||||
</div>
|
||||
<form method="post" action="">
|
||||
{{ csrf() }}
|
||||
<input name="addon" value="{{ request.GET.addon }}" type="hidden">
|
||||
<input type="submit" value="Reset">
|
||||
</form>
|
||||
{% else %}
|
||||
|
||||
<form action="">
|
||||
<input name="addon" placeholder="name">
|
||||
<input type="submit" value="Get Info">
|
||||
</form>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
|
@ -57,8 +57,6 @@ urlpatterns = patterns('',
|
|||
url('^elastic$', views.elastic, name='zadmin.elastic'),
|
||||
url('^mail$', views.mail, name='zadmin.mail'),
|
||||
url('^email-devs$', views.email_devs, name='zadmin.email_devs'),
|
||||
url('^addon-name-blocklist$', views.addon_name_blocklist,
|
||||
name='zadmin.addon-name-blocklist'),
|
||||
url('^addon-search$', views.addon_search, name='zadmin.addon-search'),
|
||||
url('^oauth-consumer-create$', views.oauth_consumer_create,
|
||||
name='zadmin.oauth-consumer-create'),
|
||||
|
|
|
@ -641,21 +641,6 @@ def email_devs(request):
|
|||
dict(form=form, preview_csv=preview_csv))
|
||||
|
||||
|
||||
@admin.site.admin_view
|
||||
def addon_name_blocklist(request):
|
||||
rn = ReverseNameLookup()
|
||||
addon = None
|
||||
if request.method == 'POST':
|
||||
rn.delete(rn.get(request.GET['addon']))
|
||||
if request.GET.get('addon'):
|
||||
id = rn.get(request.GET.get('addon'))
|
||||
if id:
|
||||
qs = Addon.objects.filter(id=id)
|
||||
addon = qs[0] if qs else None
|
||||
return jingo.render(request, 'zadmin/addon-name-blocklist.html',
|
||||
dict(rn=rn, addon=addon))
|
||||
|
||||
|
||||
@any_permission_required([('Admin', '%'),
|
||||
('AdminTools', 'View'),
|
||||
('ReviewerAdminTools', 'View'),
|
||||
|
|
|
@ -18,7 +18,6 @@ def admin_site_links():
|
|||
('Discovery Pane promo modules', url('discovery.module_admin')),
|
||||
('Monthly Pick', url('zadmin.monthly_pick')),
|
||||
('Upgrade jetpack add-ons', url('zadmin.jetpack')),
|
||||
('Name blocklist', url('zadmin.addon-name-blocklist')),
|
||||
('Bulk add-on validation', url('zadmin.validation')),
|
||||
('Fake mail', url('zadmin.mail')),
|
||||
('Flagged reviews', url('zadmin.flagged')),
|
||||
|
|
|
@ -233,7 +233,6 @@ def admin_site_links():
|
|||
'addons': [
|
||||
('Search for apps by name or id', reverse('zadmin.addon-search')),
|
||||
('Featured add-ons', reverse('zadmin.featured_apps')),
|
||||
('Name blocklist', reverse('zadmin.addon-name-blocklist')),
|
||||
('Fake mail', reverse('zadmin.mail')),
|
||||
('Flagged reviews', reverse('zadmin.flagged')),
|
||||
],
|
||||
|
|
Загрузка…
Ссылка в новой задаче