djangofloor.context_processors

DjangoFloor’s specific context processors

Add some values to the template context, related to:

  • (enabled or disabled) default views provided by DjangoFloor,
  • notification objects,
  • authentication provided by HTTP headers,
  • websockets
djangofloor.context_processors.context_base(request)[source]

Provide the following variables to templates when you RequestContext:

  • df_has_index_view: True if an default index view is included
  • df_has_monitoring_view: True if the monitoring view is included
  • df_has_site_search_view: True if a site-wide search view is provided
  • df_project_name: name of your project
  • df_remote_username: username provided by a HTTP header
  • df_remote_authenticated: True if the user authenticated by a HTTP header
  • df_get_notifications: when used, return the list of Notifications of the user
  • df_user_agent: user agent provided by the HttpRequest
  • df_window_key: a random value provided by each HttpRequest (allowing to identify each browser window)
  • df_has_ws_topics: True if some websockets topics are provided to the HttpRequest
Parameters:request (django.http.HttpRequest) – a HTTP request
Returns:a dict to update the global template context
Return type:dict