MCPcopy Index your code
hub / github.com/encode/django-rest-framework / generate_key

Method generate_key

rest_framework/authtoken/models.py:44–45  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

42
43 @classmethod
44 def generate_key(cls):
45 return secrets.token_hex(20)
46
47 def __str__(self):
48 return self.key

Calls

no outgoing calls