From 889d15406cb989d35b39560751f1d8373a11a5c0 Mon Sep 17 00:00:00 2001 From: eliott Date: Mon, 28 Apr 2008 18:08:54 -0700 Subject: removed flag out of date from backend. Flagging a package out of date is not needed in the backend. Backend only needs to unflag. --- packages/views.py | 38 -------------------------------------- templates/packages/details.html | 7 ++----- templates/packages/flag.html | 26 -------------------------- templates/packages/flaghelp.html | 14 -------------- templates/packages/outofdate.txt | 13 ------------- urls.py | 2 -- 6 files changed, 2 insertions(+), 98 deletions(-) delete mode 100644 templates/packages/flag.html delete mode 100644 templates/packages/flaghelp.html delete mode 100644 templates/packages/outofdate.txt diff --git a/packages/views.py b/packages/views.py index 87d61f93..2ac34745 100644 --- a/packages/views.py +++ b/packages/views.py @@ -135,44 +135,6 @@ def files(request, pkgid): files = PackageFile.objects.filter(pkg=pkgid) return render_response(request, 'packages/files.html', {'pkg':pkg,'files':files}) -def flaghelp(request): - return render_response(request, 'packages/flaghelp.html') - -def flag(request, pkgid): - pkg = get_object_or_404(Package, id=pkgid) - context = {'pkg': pkg} - if request.POST.has_key('confirmemail'): - email = request.POST['confirmemail'] - if request.POST.has_key('usermessage'): - message = request.POST['usermessage'] - else: - message = None - # validate - errors = {} - validate(errors, 'Email Address', email, validators.isValidEmail, False, request) - if errors: - context['errors'] = errors - return render_response(request, 'packages/flag.html', context) - - context['confirmemail'] = email - pkg.needupdate = 1 - pkg.save() - if pkg.maintainer_id > 0: - # send notification email to the maintainer - t = loader.get_template('packages/outofdate.txt') - c = Context({ - 'email': request.POST['confirmemail'], - 'message': message, - 'pkgname': pkg.pkgname, - 'weburl': 'http://www.archlinux.org/packages/' + str(pkg.id) + '/' - }) - send_mail('arch: Package [%s] marked out-of-date' % pkg.pkgname, - t.render(c), - 'Arch Website Notification ', - [pkg.maintainer.email], - fail_silently=True) - return render_response(request, 'packages/flag.html', context) - def unflag(request, pkgid): pkg = get_object_or_404(Package, id=pkgid) pkg.needupdate = 0 diff --git a/templates/packages/details.html b/templates/packages/details.html index 66315583..c3b214e0 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -9,15 +9,12 @@

{{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}