utils.timezone.get_fixed_timezone()

get_fixed_timezone(offset) [source] Returns a tzinfo instance that represents a time zone with a fixed offset from UTC. offset is a datetime.timedelta or an integer number of minutes. Use positive values for time zones east of UTC and negative values for west of UTC.

utils.timezone.get_default_timezone_name()

get_default_timezone_name() [source] Returns the name of the default time zone.

utils.timezone.get_default_timezone()

get_default_timezone() [source] Returns a tzinfo instance that represents the default time zone.

utils.timezone.get_current_timezone_name()

get_current_timezone_name() [source] Returns the name of the current time zone.

utils.timezone.get_current_timezone()

get_current_timezone() [source] Returns a tzinfo instance that represents the current time zone.

utils.timezone.FixedOffset

class FixedOffset(offset=None, name=None) [source] A tzinfo subclass modeling a fixed offset from UTC. offset is an integer number of minutes east of UTC.

utils.timezone.deactivate()

deactivate() [source] Unsets the current time zone.

utils.timezone.activate()

activate(timezone) [source] Sets the current time zone. The timezone argument must be an instance of a tzinfo subclass or, if pytz is available, a time zone name.

utils.text.slugify()

slugify(allow_unicode=False) [source] Converts to ASCII if allow_unicode is False (default). Converts spaces to hyphens. Removes characters that aren’t alphanumerics, underscores, or hyphens. Converts to lowercase. Also strips leading and trailing whitespace. For example: slugify(value) If value is "Joel is a slug", the output will be "joel-is-a-slug". You can set the allow_unicode parameter to True, if you want to allow Unicode characters: slugify(value, allow_unicode=True) If value is "你

utils.safestring.SafeUnicode

class SafeUnicode Historical name of SafeText. Only available under Python 2.