djblets.urls.staticfiles¶
Utility functions for looking up static media URLs.
- static_lazy(path)[source]¶
Lazily look up a static media URL.
This is used to reference static media URLs in a class attribute, in a global variable, or some other definition that would be evaluated upon loading the module. Calling
static()
will immediately perform a lookup, which may be too early in the startup sequence of the consuming application. By lazily referencing the URL, the lookup can be performed later when needed, and not on module load.- Parameters:
path (
unicode
) – The static media path.- Returns:
A proxy that evaluates to the static media URL (as a unicode string).
- Return type:
django.utils.functional.__proxy__