import random


def get_prefixed_str(original_str):
    """
    Returns a new string that is prefixed
    with a random number (range 0-10000)

    This function is used to go around the uniqueness
    of certain fields when creating more instances of the model,
    most notably the django.contrib.auth.models.User.username field
    will throw IntegrityError if two users will share the same username

    :returns: str
    """
    return "{prefix}__{original_str}".format(
        prefix=random.randint(0, 10000),
        original_str=original_str,
    )