custom_filters

Attributes

register

Functions

beginswith(value, arg)

get_columns_with_value(instance, value)

get_columns_with_value_dic(instance, value)

get_item_from_dic(dictionary, key)

get_seshat_expert(user)

Custom filter to get the Seshat_Expert object associated with a user.

give_me_a_color(value)

in_group(user, group_name)

Checks if a user is in a given group.

is_user_real(user)

Check if the username has an underscore and if the part after the underscore

make_references_look_nicer(value)

min_max_years(values)

replace_underscore_and_capitalize(value)

replace_underscore_and_capitalize_for_long_vars(value)

textincludes(value, arg)

Check if a string includes a given substring.

unique_descriptions(values)

username_from_email(email)

zip_lists(a, b)

Module Contents

custom_filters.beginswith(value, arg)
custom_filters.get_columns_with_value(instance, value)
custom_filters.get_columns_with_value_dic(instance, value)
custom_filters.get_item_from_dic(dictionary, key)
custom_filters.get_seshat_expert(user)

Custom filter to get the Seshat_Expert object associated with a user.

custom_filters.give_me_a_color(value)
custom_filters.in_group(user, group_name)

Checks if a user is in a given group.

custom_filters.is_user_real(user)

Check if the username has an underscore and if the part after the underscore matches the domain part of the email.

Parameters:
  • username (str) – The username to check.

  • email (str) – The email to check against.

Returns:

True if the username is valid, False otherwise.

Return type:

bool

custom_filters.make_references_look_nicer(value)
custom_filters.min_max_years(values)
custom_filters.replace_underscore_and_capitalize(value)
custom_filters.replace_underscore_and_capitalize_for_long_vars(value)
custom_filters.textincludes(value, arg)

Check if a string includes a given substring.

custom_filters.unique_descriptions(values)
custom_filters.username_from_email(email)
custom_filters.zip_lists(a, b)
custom_filters.register