diff --git a/fet2020/fet2020/utils.py b/fet2020/fet2020/utils.py index e4e87df4..abea0648 100644 --- a/fet2020/fet2020/utils.py +++ b/fet2020/fet2020/utils.py @@ -1,4 +1,6 @@ # util functions for all apps +import uuid + from django.contrib.admin.models import ADDITION, CHANGE, LogEntry from django.contrib.admin.utils import construct_change_message from django.contrib.contenttypes.models import ContentType @@ -22,3 +24,6 @@ def add_log_action(request, form, app_label, model, add=True): action_flag=action_flag, change_message=change_message, ) + +def create_random_id(): + return str(uuid.uuid4())[:8]