Skip to content

Commit 4c8b2b1

Browse files
PetrDlouhyAlvaroLQueiroz
authored andcommitted
add README and CHANGELOG note for absolute URLs in API
1 parent 8782244 commit 4c8b2b1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.9.0
4+
5+
- Added URLs for actor, target and action_object in the unread notification list API view
6+
37
## 1.8.0
48

59
- Added support for Django 4.1

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,11 @@ There are two possible API calls that can be made:
311311
3 notifications and mark them read (remove from list on next
312312
request).
313313

314+
The list outputs `target_url`, `actor_url`, `action_object_url`.
315+
This URL is generated from standard Django `Model.get_absolute_url()` or
316+
you can override the URL just for notifications by implementing
317+
`Model.get_url_for_notifications(notification, request)`.
318+
314319
### How to use:
315320

316321
1. Put `{% load notifications_tags %}` in the template before you

0 commit comments

Comments
 (0)