You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
624 B
23 lines
624 B
from meta.views import Meta
|
|
|
|
def add_meta(view):
|
|
def wrapper(request, *args, **kwargs):
|
|
"""
|
|
meta = Meta(
|
|
title=title,
|
|
description=description,
|
|
keywords=keywords,
|
|
meta_extras = {
|
|
'viewport': 'width=device-width, initial-scale=1.0, minimum-scale=1.0'
|
|
}
|
|
'extra_custom_props': [
|
|
('http-equiv', 'Content-Type', 'text/html; charset=UTF-8'),
|
|
]
|
|
)
|
|
"""
|
|
|
|
|
|
r = view(request, *args, **kwargs)
|
|
r.context_data = {'foo': 'bar'}
|
|
return r.render()
|
|
return wrapper |