13 lines
323 B
Python
13 lines
323 B
Python
from rest_framework.decorators import api_view
|
|
from rest_framework.response import Response
|
|
import secrets
|
|
|
|
# Create your views here.
|
|
|
|
@api_view(['GET'])
|
|
def HexaGenerator(request):
|
|
if request.method == 'GET':
|
|
hexa_id = secrets.token_hex(16)
|
|
return Response({"message": "Search id:", "data": hexa_id})
|
|
|