mirror of
https://github.com/Hopiu/django-notifications.git
synced 2026-05-20 10:21:53 +00:00
Add app_name in urls.py
This commit is contained in:
parent
c29345f5fa
commit
1ddf085612
2 changed files with 5 additions and 3 deletions
|
|
@ -65,11 +65,11 @@ Add the notifications urls to your urlconf::
|
|||
|
||||
import notifications
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = [
|
||||
...
|
||||
url('^inbox/notifications/', include(notifications.urls)),
|
||||
url('^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.
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ from django.conf.urls import url
|
|||
from . import views
|
||||
|
||||
|
||||
app_name = 'notifications'
|
||||
urlpatterns = [
|
||||
url(r'^$', views.AllNotificationsList.as_view(), name='all'),
|
||||
url(r'^unread/$', views.UnreadNotificationsList.as_view(), name='unread'),
|
||||
|
|
@ -15,3 +16,4 @@ urlpatterns = [
|
|||
url(r'^api/unread_count/$', views.live_unread_notification_count, name='live_unread_notification_count'),
|
||||
url(r'^api/unread_list/$', views.live_unread_notification_list, name='live_unread_notification_list'),
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue