Remove the all pastes listing.

The spammers kill things for all of us.

Change-Id: I37104005d24aa4a21d9dae770e4669e07666c7cb
This commit is contained in:
Monty Taylor 2012-11-23 10:12:53 -08:00
parent 3ce38e48ef
commit f739d002be
3 changed files with 0 additions and 29 deletions

View File

@ -117,27 +117,6 @@ class PasteController(object):
current=identifier current=identifier
) )
def show_all(self, page=1):
"""Paginated list of pages."""
def link(page):
if page == 1:
return url_for('pastes/show_all')
return url_for('pastes/show_all', page=page)
form_args = local.request.args
query = Paste.find_all()
pastes = query.limit(10).offset(10 * (page - 1)).all()
if not pastes and page != 1:
raise NotFound()
return render_to_response('show_all.html',
pastes=pastes,
pagination=generate_pagination(page, 10, query.count(), link),
css=get_style(local.request)[1],
show_personal='show_personal' in form_args
)
def compare_paste(self, new_id=None, old_id=None): def compare_paste(self, new_id=None, old_id=None):
"""Render a diff view for two pastes.""" """Render a diff view for two pastes."""
getform = local.request.form.get getform = local.request.form.get

View File

@ -24,10 +24,6 @@ urlmap = Map([
# captcha for new paste # captcha for new paste
Rule('/_captcha.png', endpoint='pastes/show_captcha'), Rule('/_captcha.png', endpoint='pastes/show_captcha'),
# paste list
Rule('/all/', endpoint='pastes/show_all'),
Rule('/all/<int:page>/', endpoint='pastes/show_all'),
# xmlrpc and json # xmlrpc and json
Rule('/xmlrpc/', endpoint='xmlrpc/handle_request'), Rule('/xmlrpc/', endpoint='xmlrpc/handle_request'),
Rule('/json/', endpoint='json/handle_request'), Rule('/json/', endpoint='json/handle_request'),
@ -42,7 +38,4 @@ urlmap = Map([
# language # language
Rule('/language/<lang>/', endpoint='pastes/set_language'), Rule('/language/<lang>/', endpoint='pastes/set_language'),
# rss
Rule('/rss.xml', endpoint='pastes/rss'),
]) ])

View File

@ -23,7 +23,6 @@
<ul id="navigation"> <ul id="navigation">
{%- for href, id, caption in [ {%- for href, id, caption in [
('pastes/new_paste', 'new', _('New')), ('pastes/new_paste', 'new', _('New')),
('pastes/show_all', 'all', _('All')),
('static/about', 'about', _('About')), ('static/about', 'about', _('About')),
('static/help', 'help', '?') ('static/help', 'help', '?')
] %} ] %}