From 1cf0449371d2a51225f8295657aa126fa35726cd Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Thu, 19 Apr 2018 10:16:02 +1000 Subject: [PATCH] Rename a few variables under the webmention app to satisfy linters --- webmention/urls.py | 2 +- webmention/views.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/webmention/urls.py b/webmention/urls.py index 9af094e..bbe1eee 100644 --- a/webmention/urls.py +++ b/webmention/urls.py @@ -4,5 +4,5 @@ from . import views app_name = 'webmention' urlpatterns = ( url('^$', views.accept, name='accept'), - url('^s/(?P\d+)$', views.status, name='status') + url('^s/(?P\d+)$', views.status, name='status') ) diff --git a/webmention/views.py b/webmention/views.py index 80c15cd..9d02e98 100644 --- a/webmention/views.py +++ b/webmention/views.py @@ -54,15 +54,14 @@ def accept(request): mention.entry = entry mention.state = State.PENDING mention.save() - status = reverse('webmention:status', kwargs={'id': mention.id}) + status_url = reverse('webmention:status', kwargs={'id': mention.id}) res = HttpResponse(status=201) - res['Location'] = urljoin(origin, status) + res['Location'] = urljoin(origin, status_url) return res -@csrf_exempt @require_GET -def status(request, id): - mention = get_object_or_404(Webmention.objects, pk=id) +def status(request, mention_id): + mention = get_object_or_404(Webmention.objects, pk=mention_id) return HttpResponse(mention.get_state_display())