Re: pass context to overridden templates
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 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/50149974-8169-8e3a-9b0f-8f0ed25624d7%40ist-total.org. For more options, visit https://groups.google.com/d/optout.
Re: pass context to overridden templates
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? On Wednesday, May 3, 2017 at 12:48:42 AM UTC+2, cjdcordeiro wrote: > > 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 > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9d857382-a5a9-4047-93fb-3d688611e5c5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
pass context to overridden templates
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 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3f62f83c-0dd0-4926-b78a-28c0747fd146%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.