Skip to content

Commit e8247f4

Browse files
committed
Update success response to 202 status. Fix documentation errors.
1 parent 6ee6a13 commit e8247f4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ webmention for Django projects.
88

99
* Add `webmention` to `INSTALLED_APPS`
1010
* Run `manage.py migrate webmention`
11-
* Add `(r'^webmention', include('webmention.urls'), namespace='webmention')` to top-level `urls.py`
11+
* Add `url(r'^webmention', include('webmention.urls', namespace='webmention'))` to top-level `urls.py`
1212
* Run `manage.py test webmention` to ensure unit tests all pass
1313

1414
## Usage

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Installation
1111
- Add ``webmention`` to ``INSTALLED_APPS``
1212
- Run ``manage.py migrate webmention``
1313
- Add
14-
``(r'^webmention', include('webmention.urls'), namespace='webmention')``
14+
``url(r'^webmention', include('webmention.urls', namespace='webmention'))``
1515
to top-level ``urls.py``
1616
- Run ``manage.py test webmention`` to ensure unit tests all pass
1717

webmention/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def receive(request):
2525

2626
response_body = fetch_and_validate_source(source, target)
2727
webmention.update(source, target, response_body)
28-
return HttpResponse('webmention successful')
28+
return HttpResponse(status_code=202, reason_phrase='The webmention was successfully received')
2929
except (SourceFetchError, TargetNotFoundError) as e:
3030
webmention.invalidate()
3131
return HttpResponseBadRequest(str(e))

0 commit comments

Comments
 (0)