forked from ungleich-public/dynamicweb
clone cms with menus, make menus standalone app
This commit is contained in:
parent
1ece5ce7c7
commit
afb096b7a3
1153 changed files with 318897 additions and 37 deletions
17
cms/middleware/utils.py
Normal file
17
cms/middleware/utils.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from cms.utils import apphook_reload
|
||||
|
||||
|
||||
class ApphookReloadMiddleware:
|
||||
"""
|
||||
If the URLs are stale, reload them.
|
||||
"""
|
||||
def __init__(self, get_response):
|
||||
self.get_response = get_response
|
||||
|
||||
def __call__(self, request):
|
||||
apphook_reload.ensure_urlconf_is_up_to_date()
|
||||
return self.get_response(request)
|
||||
|
||||
async def __acall__(self, request):
|
||||
apphook_reload.ensure_urlconf_is_up_to_date()
|
||||
return await self.get_response(request)
|
||||
Loading…
Add table
Add a link
Reference in a new issue