Groups
Groups
Sign in
Groups
Groups
Django users
Conversations
About
Send feedback
Help
pass context to overridden templates
23 views
Skip to first unread message
cjdcordeiro
unread,
May 2, 2017, 6:48:42 PM
5/2/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi guys,
I'm using django-notification-hq, so my app's urls.py has:
...
url
(
r
'^inbox/'
,
include
(
notifications
.
urls
,
namespace
=
'notifications'
)),
...
I've modified those default templates but I am unable to pass context to them.
I found this:
https://github.com/django-crispy-forms/django-crispy-forms/issues/646
It isn't old so I'm afraid this is yet not possible? Any workarounds?
Cheers,
Cris
cjdcordeiro
unread,
May 3, 2017, 9:53:48 AM
5/3/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Probably the best would be overriding the app's default class based view, but when I look at it (
https://github.com/django-notifications/django-notifications/blob/master/notifications/views.py#L29
) it doesn't have a get_context method or anything I can play with to change the default context....
ideas? anyone?
Florian Schweikert
unread,
May 4, 2017, 3:52:17 AM
5/4/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
On 03/05/17 15:53, cjdcordeiro wrote:
> Probably the best would be overriding the app's default class based
> view, but when I look at it
> (
https://github.com/django-notifications/django-notifications/blob/master/notifications/views.py#L29
)
> it doesn't have a get_context method or anything I can play with to
> change the default context....
>
> ideas? anyone?
As NotificationViewList is a ListView it should have get_context_data
see:
https://docs.djangoproject.com/en/1.11/ref/class-based-views/generic-display/#listview
Reply all
Reply to author
Forward
0 new messages