Rename a few variables under the webmention app to satisfy linters

This commit is contained in:
Danielle McLean 2018-04-19 10:16:02 +10:00
parent 5252c59910
commit 1cf0449371
Signed by: 00dani
GPG key ID: 8EB789DDF3ABD240
2 changed files with 5 additions and 6 deletions

View file

@ -4,5 +4,5 @@ from . import views
app_name = 'webmention'
urlpatterns = (
url('^$', views.accept, name='accept'),
url('^s/(?P<id>\d+)$', views.status, name='status')
url('^s/(?P<mention_id>\d+)$', views.status, name='status')
)

View file

@ -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())