Rename a few variables under the webmention app to satisfy linters
This commit is contained in:
parent
5252c59910
commit
1cf0449371
2 changed files with 5 additions and 6 deletions
|
@ -4,5 +4,5 @@ from . import views
|
||||||
app_name = 'webmention'
|
app_name = 'webmention'
|
||||||
urlpatterns = (
|
urlpatterns = (
|
||||||
url('^$', views.accept, name='accept'),
|
url('^$', views.accept, name='accept'),
|
||||||
url('^s/(?P<id>\d+)$', views.status, name='status')
|
url('^s/(?P<mention_id>\d+)$', views.status, name='status')
|
||||||
)
|
)
|
||||||
|
|
|
@ -54,15 +54,14 @@ def accept(request):
|
||||||
mention.entry = entry
|
mention.entry = entry
|
||||||
mention.state = State.PENDING
|
mention.state = State.PENDING
|
||||||
mention.save()
|
mention.save()
|
||||||
status = reverse('webmention:status', kwargs={'id': mention.id})
|
status_url = reverse('webmention:status', kwargs={'id': mention.id})
|
||||||
|
|
||||||
res = HttpResponse(status=201)
|
res = HttpResponse(status=201)
|
||||||
res['Location'] = urljoin(origin, status)
|
res['Location'] = urljoin(origin, status_url)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
@csrf_exempt
|
|
||||||
@require_GET
|
@require_GET
|
||||||
def status(request, id):
|
def status(request, mention_id):
|
||||||
mention = get_object_or_404(Webmention.objects, pk=id)
|
mention = get_object_or_404(Webmention.objects, pk=mention_id)
|
||||||
return HttpResponse(mention.get_state_display())
|
return HttpResponse(mention.get_state_display())
|
||||||
|
|
Loading…
Reference in a new issue