Check if request.view_name exists before sending it to the template engine
This commit is contained in:
parent
17a71ddfb6
commit
ae4af3669b
@ -33,6 +33,9 @@ def tagcloud(request):
|
||||
return {'tagcloud': tagcloud}
|
||||
|
||||
def viewname(request):
|
||||
return {
|
||||
'view_name': request.view_name,
|
||||
}
|
||||
if hasattr(request, 'view_name'):
|
||||
return {
|
||||
'view_name': request.view_name,
|
||||
}
|
||||
else:
|
||||
return {}
|
||||
|
Loading…
Reference in New Issue
Block a user