django_libretto/templatetags/navigation.py
def current(context, urlName, className = 'active', **kwargs):
	'''
	Return a class name (string) if the current URL matches the route name specified in ``className``.
	If any URL keyword arguments are provided, they must be matched as well.

	:param urlName: The route name that the current URL should match. Example: 'accounts:login'.
	:param className: The string that is returned if the current URL matches the specified one.
	:param kwargs: Any extra URL keyword arguments that must also be present in the current URL for it to match.
	:returns: ``className`` if the current URL matches, or an empty string otherwise.
	'''
	matches = pathMatches(context['request'].path, urlName, **kwargs)
	return className if matches else ''
def current(context, urlName, className = 'active', **kwargs):
	'''
	Return a class name (string) if the current URL matches the route name specified in ``className``.
	If any URL keyword arguments are provided, they must be matched as well.

	:param urlName: The route name that the current URL should match. Example: 'accounts:login'.
	:param className: The string that is returned if the current URL matches the specified one.
	:param kwargs: Any extra URL keyword arguments that must also be present in the current URL for it to match.
	:returns: ``className`` if the current URL matches, or an empty string otherwise.
	'''
	matches = pathMatches(context['request'].path, urlName, **kwargs)
	return className if matches else ''
def current ( context , urlName , className = 'active' , * * kwargs ) : matches = pathMatches ( context [ 'request' ] . path , urlName , * * kwargs ) return className if matches else ''
Return a class name (string) if the current URL matches the route name specified in ``className``.
	If any URL keyword arguments are provided, they must be matched as well.

	:param urlName: The route name that the current URL should match. Example: 'accounts:login'.
	:param className: The string that is returned if the current URL matches the specified one.
	:param kwargs: Any extra URL keyword arguments that must also be present in the current URL for it to match.
	:returns: ``className`` if the current URL matches, or an empty string otherwise.
Return a class name ( string ) if the current URL matches the route name specified in className . If any URL keyword arguments are provided they must be matched as well .