2019-07-21 14:58:38 +00:00
|
|
|
from django.utils.crypto import get_random_string
|
2018-12-30 01:41:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
def create_token(length=25):
|
2019-07-21 14:58:38 +00:00
|
|
|
return get_random_string(length=length)
|
2019-02-02 22:31:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
def objects_list_to_json(obj_list):
|
|
|
|
json_list = []
|
|
|
|
|
|
|
|
for obj in obj_list:
|
|
|
|
json_list.append(obj.json)
|
|
|
|
|
|
|
|
return json_list
|