kumify/common/helpers.py

4 lines
142 B
Python
Raw Normal View History

2020-12-27 17:49:54 +00:00
import uuid
def get_upload_path(instance, filename):
return 'usermedia/{0}/{1}/{2}'.format(instance.user.id, str(uuid.uuid4()), filename)