I have included Django comments framework in my project, and added custom templates to include my base template instead of the default one.
However, in my base template, there are a few url template tags with dynamic parameters:
{% url galleries blog.pk blog.slug %}
Variable blog is included in the context in my views, but not in the comments framework, which causes No reverse match error when I try to add a comment.
What would be the best way to get variable blog always included in the base template?
Update:
url patterns for blog app:
url(r'^(?P<blog_id>\d+)/(?P<slug>[\-\d\w]+)/galleries/$', 'galleries', name = 'galleries'),
(r'^comments/', include('django.contrib.comments.urls')),