def _refresh_mdn(request): if settings.MDN_LAZY_REFRESH and 'refresh' in request.GET: # If you can delay this, please teach me. I give up. refresh_mdn_cache() messages.success(request, 'Pulling new content from MDN. Please check back in a few minutes.' ' Thanks for all your awesome work! Devs appreciate it!')
def ecosystem(request): if request.method == 'POST': refresh_mdn_cache() return redirect(request.path) pages = MdnCache.objects.all() ctx = {'pages': pages, 'tutorials': tutorials} return jingo.render(request, 'zadmin/ecosystem.html', ctx)
def ecosystem(request): if request.method == 'POST': refresh_mdn_cache() return redirect(request.path) pages = MdnCache.objects.all() ctx = { 'pages': pages, 'tutorials': tutorials } return jingo.render(request, 'zadmin/ecosystem.html', ctx)