Have the hook handle happen in the root_view proxy view itself
This way it isn't set in stone at a module level, especially if this gets imported before the whole application inits, or if run during tests and possibly imported multiple times.
This commit is contained in:
parent
cb76655ce2
commit
c5b8ff2c75
@ -37,6 +37,16 @@ def default_root_view(request, page):
|
|||||||
'pagination': pagination})
|
'pagination': pagination})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def root_view(request):
|
||||||
|
"""
|
||||||
|
Proxies to the real root view that's displayed
|
||||||
|
"""
|
||||||
|
view = hook_handle("frontpage_view") or default_root_view
|
||||||
|
return view(request)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def simple_template_render(request):
|
def simple_template_render(request):
|
||||||
"""
|
"""
|
||||||
A view for absolutely simple template rendering.
|
A view for absolutely simple template rendering.
|
||||||
@ -52,5 +62,3 @@ def terms_of_service(request):
|
|||||||
|
|
||||||
return render_to_response(request,
|
return render_to_response(request,
|
||||||
'mediagoblin/terms_of_service.html', {})
|
'mediagoblin/terms_of_service.html', {})
|
||||||
|
|
||||||
root_view = hook_handle("frontpage_view") or default_root_view
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user