Thank you!
I thought there was a simpler method of adding context through the urlconf but after having a look at the source this is what I came up with. Apparently there's only getcontextdata() so I used a lambda to add what I needed.
Update: I should probably have used extra_context={'model': 'Frontpage'}
url(
r'^$',
TemplateView.as_view(
template_name='pages/front.html',
get_context_data=lambda: {'model': 'Frontpage'},
),
name='front',
),
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Rusza ogromna inwestycja. Spalarnia na 90 tys. ton odpadów ogrzeje duże miasto | 0 | 12.28 | 06-12-2025 |