From c783a5938c8901a0b77047f7c37d7e5c66fdf738 Mon Sep 17 00:00:00 2001 From: Benedikt Willi Date: Tue, 4 Jun 2024 17:46:45 +0200 Subject: [PATCH] Update README.md to reflect new import style for notification URLs - Switched from `url` to `path` for including notification URLs in examples - Removed redundant import statement for `notifications.urls` - Corrected template tag name in the documentation --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0543efd..ed39c07 100644 --- a/README.md +++ b/README.md @@ -78,19 +78,13 @@ INSTALLED_APPS = ( Add the notifications urls to your urlconf: ```python -import notifications.urls - urlpatterns = [ ... - url('^inbox/notifications/', include(notifications.urls, namespace='notifications')), + path('inbox/notifications/', include("notifications.urls", namespace='notifications')), ... ] ``` -The method of installing these urls, importing rather than using -`'notifications.urls'`, is required to ensure that the urls are -installed in the `notifications` namespace. - To run schema migration, execute `python manage.py migrate notifications`. @@ -261,7 +255,7 @@ Mark the current object as read. ### Template tags -Put `{% load notifications\_tags %}` in the template before +Put `{% load notifications_tags %}` in the template before you actually use notification tags. ### `notifications_unread`