(request)
return params
Additional context applied to each request.
Additional context applied to each request.
Additional context applied to each request .
def forum(request):
    """
    Additional context applied to each request.
    """

    # Will inject the counts into every session
    if request.user.is_anonymous:
        counts = dict(planet_count=0)
    else:
        counts = request.session.get(settings.SESSION_COUNT_KEY, {})

    params = dict(user=request.user,
                  TRAFFIC=get_traffic(),
                  VERSION=VERSION,
                  request=request,
                  site_name=settings.SITE_NAME,
                  site_domain=settings.SITE_DOMAIN,
                  google_tracker=settings.GOOGLE_TRACKER,
                  IS_MODERATOR=is_moderator(request.user),
                  counts=counts,
                  )

    return params
def forum ( request ) : # Will inject the counts into every session if request . user . is_anonymous : counts = dict ( planet_count = 0 ) else : counts = request . session . get ( settings . SESSION_COUNT_KEY , { } ) params = dict ( user = request . user , TRAFFIC = get_traffic ( ) , VERSION = VERSION , request = request , site_name = settings . SITE_NAME , site_domain = settings . SITE_DOMAIN , google_tracker = settings . GOOGLE_TRACKER , IS_MODERATOR = is_moderator ( request . user ) , counts = counts , ) return params