def portal_main(request): sys_info = get_sys_info() if sys_info: return redirect(reverse('portals.frontend.views.portal_home', args=[sys_info.main_portal_address])) else: return HttpResponseNotFound(loader.get_template('f/msg_box.html').render(RequestContext(request, { 'msg': _('Please set a main portal site address in "System information" using the admin interface.'), })))
def portal_request_context(request, portal, obj=None): return RequestContext(request, { 'portal': portal, 'sys_info': get_sys_info(), 'ITEMS_PER_PAGE': ITEMS_PER_PAGE, 'portal_feed_uri': request.build_absolute_uri(domain_reverse(portal, 'portals.frontend.views.feed_news', args=[portal.address])), 'portal_podcast_feed_uri': request.build_absolute_uri(domain_reverse(portal, 'portals.frontend.views.feed_podcast', args=[portal.address])), 'obj': obj, })
def portal_request_context(request, portal, obj=None): return RequestContext( request, { "portal": portal, "sys_info": get_sys_info(), "ITEMS_PER_PAGE": ITEMS_PER_PAGE, "portal_feed_uri": request.build_absolute_uri( domain_reverse(portal, "portals.frontend.views.feed_news", args=[portal.address]) ), "portal_podcast_feed_uri": request.build_absolute_uri( domain_reverse(portal, "portals.frontend.views.feed_podcast", args=[portal.address]) ), "obj": obj, }, )
def d(request, address, *args): sys_info = get_sys_info() if not sys_info or sys_info.main_portal_address != address: return redirect(reverse("portals.frontend.views.portal_home", args=[address])) else: return f(request, address, *args)
def d(request, address, *args): sys_info = get_sys_info() if not sys_info or sys_info.main_portal_address != address: return redirect(reverse('portals.frontend.views.portal_home', args=[address])) else: return f(request, address, *args)