From f739d002be4ed4f38bf355d126db33c534d1bdd8 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 23 Nov 2012 10:12:53 -0800 Subject: [PATCH] Remove the all pastes listing. The spammers kill things for all of us. Change-Id: I37104005d24aa4a21d9dae770e4669e07666c7cb --- lodgeit/controllers/pastes.py | 21 --------------------- lodgeit/urls.py | 7 ------- lodgeit/views/layout.html | 1 - 3 files changed, 29 deletions(-) diff --git a/lodgeit/controllers/pastes.py b/lodgeit/controllers/pastes.py index 8d12941..085f95d 100644 --- a/lodgeit/controllers/pastes.py +++ b/lodgeit/controllers/pastes.py @@ -117,27 +117,6 @@ class PasteController(object): 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): """Render a diff view for two pastes.""" getform = local.request.form.get diff --git a/lodgeit/urls.py b/lodgeit/urls.py index b7eb1e8..ee95dda 100644 --- a/lodgeit/urls.py +++ b/lodgeit/urls.py @@ -24,10 +24,6 @@ urlmap = Map([ # captcha for new paste Rule('/_captcha.png', endpoint='pastes/show_captcha'), - # paste list - Rule('/all/', endpoint='pastes/show_all'), - Rule('/all//', endpoint='pastes/show_all'), - # xmlrpc and json Rule('/xmlrpc/', endpoint='xmlrpc/handle_request'), Rule('/json/', endpoint='json/handle_request'), @@ -42,7 +38,4 @@ urlmap = Map([ # language Rule('/language//', endpoint='pastes/set_language'), - - # rss - Rule('/rss.xml', endpoint='pastes/rss'), ]) diff --git a/lodgeit/views/layout.html b/lodgeit/views/layout.html index fc3ef28..25091a5 100644 --- a/lodgeit/views/layout.html +++ b/lodgeit/views/layout.html @@ -23,7 +23,6 @@