1

I am making an app, how can I issue and call UUID when first running the app? I'm using Python, Django . And I have to make a call to the URL for the front.

import uuid
print uuid.uuid4()
2eec67d5-450a-48d4-a92f-e387530b1b8b

How to make it is like this.

Need to create a model?

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97
pydjango
  • 37
  • 9
  • 4
    What do you want to do? Your question is not very descriptive... _"I have to make a call to the URL for the front"_ does not exactly describe whatever you want to do... For what purpose do you want a uuid would be a good place to start. – Abdul Aziz Barkat Feb 25 '21 at 07:42

1 Answers1

2

just like that, calling the method uuid.uuid4() will return an object that you can assign to a variable and use it in the code...

import uuid
myUuid = uuid.uuid4()

print(myUuid)

send(myUuid)
check(myUuid)
...
ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97